From 944ddcf768d14de8e6613fa3758ee56852152119 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 18 Dec 2018 12:36:38 +0100 Subject: [PATCH] all: Become a Go module (fixes #5148) (#5384) * go mod init; rm -rf vendor * tweak proto files and generation * go mod vendor * clean up build.go * protobuf literals in tests * downgrade gogo/protobuf --- .gitignore | 1 + build.go | 160 +- cmd/stdiscosrv/database.go | 2 +- cmd/stdiscosrv/database.pb.go | 32 +- cmd/stdiscosrv/database.proto | 2 +- go.mod | 52 + go.sum | 100 + lib/db/benchmark_test.go | 2 +- lib/db/structs.go | 2 +- lib/db/structs.pb.go | 86 +- lib/db/structs.proto | 4 +- lib/discover/local.go | 2 +- lib/discover/local.pb.go | 30 +- lib/discover/local.proto | 2 +- lib/protocol/bep.pb.go | 225 +- lib/protocol/bep.proto | 2 +- lib/protocol/bep_extensions.go | 2 +- lib/protocol/conflict_test.go | 2 +- lib/protocol/deviceid_test.go | 4 +- lib/protocol/deviceid_test.pb.go | 20 +- lib/protocol/deviceid_test.proto | 2 +- lib/protocol/hello_v0.13.go | 2 +- lib/protocol/vector.go | 8 +- lib/protocol/vector_test.go | 178 +- lib/relay/protocol/packets.go | 2 +- vendor/code.cloudfoundry.org/bytefmt/LICENSE | 201 - vendor/code.cloudfoundry.org/bytefmt/bytes.go | 105 - .../code.cloudfoundry.org/bytefmt/package.go | 1 - .../AudriusButkevicius/cli/.travis.yml | 6 + .../AudriusButkevicius/cli/README.md | 280 + .../AudriusButkevicius/go-nat-pmp/README.md | 48 + .../AudriusButkevicius/pfilter/LICENSE | 21 - .../AudriusButkevicius/pfilter/conn.go | 97 - .../AudriusButkevicius/pfilter/filter.go | 135 - .../AudriusButkevicius/pfilter/misc.go | 51 - vendor/github.com/BurntSushi/toml/COPYING | 21 - .../toml/cmd/toml-test-decoder/main.go | 90 - .../toml/cmd/toml-test-encoder/main.go | 131 - .../BurntSushi/toml/cmd/tomlv/main.go | 61 - vendor/github.com/BurntSushi/toml/decode.go | 509 - .../github.com/BurntSushi/toml/decode_meta.go | 121 - vendor/github.com/BurntSushi/toml/doc.go | 27 - vendor/github.com/BurntSushi/toml/encode.go | 568 - .../BurntSushi/toml/encoding_types.go | 19 - .../BurntSushi/toml/encoding_types_1.1.go | 18 - vendor/github.com/BurntSushi/toml/lex.go | 953 - vendor/github.com/BurntSushi/toml/parse.go | 592 - .../github.com/BurntSushi/toml/type_check.go | 91 - .../github.com/BurntSushi/toml/type_fields.go | 242 - vendor/github.com/a8m/mark/LICENSE | 9 - vendor/github.com/a8m/mark/cmd/mark/main.go | 94 - vendor/github.com/a8m/mark/grammar.go | 92 - vendor/github.com/a8m/mark/lexer.go | 568 - vendor/github.com/a8m/mark/mark.go | 60 - vendor/github.com/a8m/mark/node.go | 614 - vendor/github.com/a8m/mark/parser.go | 436 - .../beorn7/perks/{quantile => }/LICENSE | 0 .../beorn7/perks/quantile/exampledata.txt | 2388 + vendor/github.com/bkaradzic/go-lz4/.gitignore | 1 + .../github.com/bkaradzic/go-lz4/.travis.yml | 9 + vendor/github.com/bkaradzic/go-lz4/README.md | 76 + .../bkaradzic/go-lz4/fuzzer/main.go | 74 - .../bkaradzic/go-lz4/lz4-example/main.go | 94 - vendor/github.com/calmh/du/README.md | 14 + vendor/github.com/calmh/du/cmd/du/main.go | 21 - vendor/github.com/calmh/xdr/.gitignore | 1 + vendor/github.com/calmh/xdr/.travis.yml | 19 + vendor/github.com/calmh/xdr/README.md | 18 + vendor/github.com/calmh/xdr/circle.yml | 3 + .../github.com/calmh/xdr/cmd/genxdr/main.go | 586 - vendor/github.com/calmh/xdr/generate.sh | 4 + vendor/github.com/cheggaaa/pb/LICENSE | 12 - vendor/github.com/cheggaaa/pb/format.go | 118 - vendor/github.com/cheggaaa/pb/pb.go | 469 - vendor/github.com/cheggaaa/pb/pb_appengine.go | 11 - vendor/github.com/cheggaaa/pb/pb_win.go | 141 - vendor/github.com/cheggaaa/pb/pb_x.go | 108 - vendor/github.com/cheggaaa/pb/pool.go | 82 - vendor/github.com/cheggaaa/pb/pool_win.go | 45 - vendor/github.com/cheggaaa/pb/pool_x.go | 29 - vendor/github.com/cheggaaa/pb/reader.go | 25 - vendor/github.com/cheggaaa/pb/runecount.go | 17 - vendor/github.com/cheggaaa/pb/termios_bsd.go | 9 - vendor/github.com/cheggaaa/pb/termios_sysv.go | 13 - .../chmduquesne/rollinghash/.travis.yml | 12 + .../chmduquesne/rollinghash/README.md | 120 + .../chmduquesne/rollinghash/roll/main.go | 140 - .../d4l3k/messagediff/.coveralls.yml | 1 + .../github.com/d4l3k/messagediff/.gitignore | 24 + .../github.com/d4l3k/messagediff/.travis.yml | 26 + .../github.com/d4l3k/messagediff/CHANGELOG.md | 14 + vendor/github.com/d4l3k/messagediff/README.md | 90 + .../d4l3k/messagediff/example/example.go | 1 - vendor/github.com/dustin/go-humanize/LICENSE | 21 - vendor/github.com/dustin/go-humanize/big.go | 31 - .../github.com/dustin/go-humanize/bigbytes.go | 173 - vendor/github.com/dustin/go-humanize/bytes.go | 143 - vendor/github.com/dustin/go-humanize/comma.go | 108 - .../github.com/dustin/go-humanize/commaf.go | 40 - .../dustin/go-humanize/english/words.go | 96 - vendor/github.com/dustin/go-humanize/ftoa.go | 23 - .../github.com/dustin/go-humanize/humanize.go | 8 - .../github.com/dustin/go-humanize/number.go | 192 - .../github.com/dustin/go-humanize/ordinals.go | 25 - vendor/github.com/dustin/go-humanize/si.go | 113 - vendor/github.com/dustin/go-humanize/times.go | 117 - vendor/github.com/gernest/wow/LICENSE | 21 - .../gernest/wow/example/all/main.go | 21 - .../gernest/wow/example/doge/main.go | 18 - vendor/github.com/gernest/wow/magefile.go | 228 - .../github.com/gernest/wow/spin/spinners.go | 625 - vendor/github.com/gernest/wow/symbols.go | 41 - vendor/github.com/gernest/wow/wow.go | 122 - vendor/github.com/go-ini/ini/LICENSE | 191 - vendor/github.com/go-ini/ini/error.go | 32 - vendor/github.com/go-ini/ini/file.go | 398 - vendor/github.com/go-ini/ini/ini.go | 194 - vendor/github.com/go-ini/ini/key.go | 751 - vendor/github.com/go-ini/ini/parser.go | 401 - vendor/github.com/go-ini/ini/section.go | 257 - vendor/github.com/go-ini/ini/struct.go | 512 - vendor/github.com/gobwas/glob/.gitignore | 8 + vendor/github.com/gobwas/glob/.travis.yml | 9 + vendor/github.com/gobwas/glob/bench.sh | 26 + .../gobwas/glob/cmd/globdraw/main.go | 44 - .../gobwas/glob/cmd/globtest/main.go | 82 - .../gobwas/glob/match/debug/debug.go | 55 - vendor/github.com/gobwas/glob/readme.md | 148 + vendor/github.com/gogo/protobuf/.gitignore | 3 - vendor/github.com/gogo/protobuf/.mailmap | 8 - vendor/github.com/gogo/protobuf/.travis.yml | 20 - vendor/github.com/gogo/protobuf/Makefile | 162 - vendor/github.com/gogo/protobuf/README | 258 - vendor/github.com/gogo/protobuf/Readme.md | 129 - .../gogo/protobuf/_conformance/Makefile | 40 - .../gogo/protobuf/_conformance/conformance.go | 161 - .../conformance_proto/conformance.pb.go | 1889 - .../conformance_proto/conformance.proto | 285 - vendor/github.com/gogo/protobuf/bench.md | 190 - .../github.com/gogo/protobuf/codec/codec.go | 91 - .../gogo/protobuf/codec/codec_test.go | 54 - .../github.com/gogo/protobuf/custom_types.md | 68 - vendor/github.com/gogo/protobuf/extensions.md | 162 - .../gogo/protobuf/gogoreplace/main.go | 25 - .../gogo/protobuf/install-protobuf.sh | 28 - vendor/github.com/gogo/protobuf/io/io_test.go | 221 - .../gogo/protobuf/io/uint32_test.go | 38 - .../gogo/protobuf/jsonpb/jsonpb_test.go | 890 - .../gogo/protobuf/proto/all_test.go | 2278 - .../gogo/protobuf/proto/any_test.go | 300 - .../gogo/protobuf/proto/clone_test.go | 300 - .../gogo/protobuf/proto/decode_test.go | 262 - .../github.com/gogo/protobuf/proto/discard.go | 151 + .../gogo/protobuf/proto/encode_test.go | 84 - .../gogo/protobuf/proto/equal_test.go | 224 - .../gogo/protobuf/proto/extensions_test.go | 538 - .../gogo/protobuf/proto/map_test.go | 46 - .../gogo/protobuf/proto/message_set_test.go | 66 - .../gogo/protobuf/proto/proto3_test.go | 135 - .../gogo/protobuf/proto/size2_test.go | 63 - .../gogo/protobuf/proto/size_test.go | 164 - .../protobuf/proto/testdata/golden_test.go | 86 - .../gogo/protobuf/proto/text_parser_test.go | 673 - .../gogo/protobuf/proto/text_test.go | 474 - .../gogo/protobuf/protobuf/Makefile | 35 - .../protobuf/google/protobuf/any.proto | 149 - .../google/protobuf/compiler/plugin.proto | 167 - .../protobuf/google/protobuf/descriptor.proto | 870 - .../protobuf/google/protobuf/duration.proto | 117 - .../protobuf/google/protobuf/empty.proto | 52 - .../protobuf/google/protobuf/field_mask.proto | 246 - .../protobuf/google/protobuf/struct.proto | 96 - .../protobuf/google/protobuf/timestamp.proto | 133 - .../protobuf/google/protobuf/wrappers.proto | 118 - .../gogo/protobuf/protoc-gen-combo/combo.go | 182 - .../gogo/protobuf/protoc-gen-gofast/main.go | 48 - .../descriptor/descriptor_test.go | 31 - .../gogo/protobuf/protoc-gen-gogo/doc.go | 51 - .../protoc-gen-gogo/generator/name_test.go | 114 - .../gogo/protobuf/protoc-gen-gogo/main.go | 57 - .../protoc-gen-gogo/testdata/Makefile | 64 - .../testdata/extension_base.proto | 46 - .../testdata/extension_extra.proto | 38 - .../testdata/extension_test.go | 210 - .../testdata/extension_user.proto | 100 - .../protoc-gen-gogo/testdata/grpc.proto | 59 - .../protoc-gen-gogo/testdata/imp.pb.go.golden | 113 - .../protoc-gen-gogo/testdata/imp.proto | 70 - .../protoc-gen-gogo/testdata/imp2.proto | 43 - .../protoc-gen-gogo/testdata/imp3.proto | 38 - .../protoc-gen-gogo/testdata/main_test.go | 46 - .../protoc-gen-gogo/testdata/multi/.gitignore | 1 - .../testdata/multi/multi1.proto | 44 - .../testdata/multi/multi2.proto | 46 - .../testdata/multi/multi3.proto | 43 - .../testdata/my_test/test.pb.go | 953 - .../testdata/my_test/test.proto | 156 - .../protoc-gen-gogo/testdata/proto3.proto | 53 - .../gogo/protobuf/protoc-gen-gogofast/main.go | 47 - .../protobuf/protoc-gen-gogofaster/main.go | 50 - .../protobuf/protoc-gen-gogoslick/main.go | 59 - .../protobuf/protoc-gen-gogotypes/main.go | 75 - .../gogo/protobuf/protoc-gen-gostring/main.go | 42 - .../protobuf/protoc-min-version/minversion.go | 65 - .../protobuf/test/asymetric-issue125/Makefile | 30 - .../test/asymetric-issue125/asym.pb.go | 595 - .../test/asymetric-issue125/asym.proto | 52 - .../test/asymetric-issue125/asym_test.go | 40 - .../test/asymetric-issue125/asympb_test.go | 184 - .../protobuf/test/asymetric-issue125/pop.go | 64 - .../github.com/gogo/protobuf/test/bug_test.go | 252 - .../test/casttype/combos/both/casttype.pb.go | 2534 - .../test/casttype/combos/both/casttype.proto | 80 - .../casttype/combos/both/casttypepb_test.go | 511 - .../casttype/combos/marshaler/casttype.pb.go | 1590 - .../casttype/combos/marshaler/casttype.proto | 80 - .../combos/marshaler/casttypepb_test.go | 511 - .../casttype/combos/neither/casttype.pb.go | 1385 - .../casttype/combos/neither/casttype.proto | 80 - .../combos/neither/casttypepb_test.go | 455 - .../combos/unmarshaler/casttype.pb.go | 2330 - .../combos/unmarshaler/casttype.proto | 80 - .../combos/unmarshaler/casttypepb_test.go | 455 - .../gogo/protobuf/test/castvalue/Makefile | 40 - .../protobuf/test/castvalue/castvalue.pb.go | 856 - .../protobuf/test/castvalue/castvalue.proto | 66 - .../test/castvalue/castvaluepb_test.go | 455 - .../castvalue/combos/both/castvalue.pb.go | 1417 - .../castvalue/combos/both/castvalue.proto | 66 - .../castvalue/combos/both/castvaluepb_test.go | 511 - .../test/castvalue/combos/both/mytypes.go | 31 - .../combos/marshaler/castvalue.pb.go | 965 - .../combos/marshaler/castvalue.proto | 66 - .../combos/marshaler/castvaluepb_test.go | 511 - .../castvalue/combos/marshaler/mytypes.go | 31 - .../combos/unmarshaler/castvalue.pb.go | 1309 - .../combos/unmarshaler/castvalue.proto | 66 - .../combos/unmarshaler/castvaluepb_test.go | 455 - .../castvalue/combos/unmarshaler/mytypes.go | 31 - .../gogo/protobuf/test/castvalue/mytypes.go | 31 - .../protobuf/test/combos/both/bug_test.go | 252 - .../test/combos/both/thetestpb_test.go | 17949 ------ .../test/combos/marshaler/bug_test.go | 252 - .../gogo/protobuf/test/combos/marshaler/t.go | 77 - .../test/combos/marshaler/thetest.pb.go | 29504 --------- .../test/combos/marshaler/thetest.proto | 649 - .../test/combos/marshaler/thetestpb_test.go | 17949 ------ .../protobuf/test/combos/marshaler/uuid.go | 133 - .../test/combos/unmarshaler/bug_test.go | 252 - .../protobuf/test/combos/unmarshaler/t.go | 73 - .../test/combos/unmarshaler/thetest.pb.go | 39266 ------------ .../test/combos/unmarshaler/thetest.proto | 649 - .../test/combos/unmarshaler/thetestpb_test.go | 16045 ----- .../protobuf/test/combos/unmarshaler/uuid.go | 133 - .../gogo/protobuf/test/custom/custom_test.go | 43 - .../test/custombytesnonstruct/Makefile | 30 - .../custombytesnonstruct_test.go | 34 - .../test/custombytesnonstruct/customtype.go | 36 - .../test/custombytesnonstruct/proto.pb.go | 281 - .../test/custombytesnonstruct/proto.proto | 39 - .../test/dashfilename/dash-filename.proto | 38 - .../protobuf/test/dashfilename/df_test.go | 48 - .../gogo/protobuf/test/dashfilename/doc.go | 1 - .../gogo/protobuf/test/data/Makefile | 33 - .../gogo/protobuf/test/data/data.pb.go | 466 - .../gogo/protobuf/test/data/data.proto | 49 - .../gogo/protobuf/test/data/datapb_test.go | 261 - .../protobuf/test/defaultconflict/df.proto | 40 - .../protobuf/test/defaultconflict/dg.proto | 39 - .../gogo/protobuf/test/defaultconflict/doc.go | 1 - .../protobuf/test/defaultconflict/nc.proto | 37 - .../protobuf/test/defaultconflict/nc_test.go | 68 - .../protobuf/test/defaultconflict/ne.proto | 42 - .../protobuf/test/defaultconflict/nx.proto | 41 - .../protobuf/test/embedconflict/.gitignore | 1 - .../gogo/protobuf/test/embedconflict/doc.go | 1 - .../gogo/protobuf/test/embedconflict/eb.proto | 38 - .../gogo/protobuf/test/embedconflict/ec.proto | 40 - .../protobuf/test/embedconflict/ec_test.go | 119 - .../gogo/protobuf/test/embedconflict/ee.proto | 41 - .../gogo/protobuf/test/embedconflict/em.proto | 42 - .../gogo/protobuf/test/embedconflict/en.proto | 40 - .../gogo/protobuf/test/embedconflict/er.proto | 41 - .../gogo/protobuf/test/empty-issue70/Makefile | 30 - .../protobuf/test/empty-issue70/empty.pb.go | 211 - .../protobuf/test/empty-issue70/empty.proto | 39 - .../protobuf/test/empty-issue70/empty_test.go | 37 - .../protobuf/test/enumcustomname/Makefile | 30 - .../test/enumcustomname/enumcustomname.pb.go | 312 - .../test/enumcustomname/enumcustomname.proto | 75 - .../gogo/protobuf/test/enumdecl/Makefile | 3 - .../protobuf/test/enumdecl/enumdecl.pb.go | 446 - .../protobuf/test/enumdecl/enumdecl.proto | 27 - .../protobuf/test/enumdecl/enumdeclpb_test.go | 237 - .../gogo/protobuf/test/enumdecl/models.go | 8 - .../gogo/protobuf/test/enumdecl_all/Makefile | 3 - .../test/enumdecl_all/enumdeclall.pb.go | 514 - .../test/enumdecl_all/enumdeclall.proto | 35 - .../test/enumdecl_all/enumdeclallpb_test.go | 237 - .../gogo/protobuf/test/enumdecl_all/models.go | 8 - .../gogo/protobuf/test/enumprefix/Makefile | 30 - .../protobuf/test/enumprefix/enumprefix.pb.go | 67 - .../protobuf/test/enumprefix/enumprefix.proto | 37 - .../gogo/protobuf/test/enumstringer/Makefile | 30 - .../test/enumstringer/enumstringer.pb.go | 561 - .../test/enumstringer/enumstringer.proto | 62 - .../test/enumstringer/enumstringerpb_test.go | 449 - .../gogo/protobuf/test/enumstringer/string.go | 41 - .../protobuf/test/example/example_test.go | 35 - .../protobuf/test/example/examplepb_test.go | 1670 - .../gogo/protobuf/test/extension_test.go | 164 - .../gogo/protobuf/test/filedotname/Makefile | 31 - .../protobuf/test/filedotname/file.dot.pb.go | 574 - .../protobuf/test/filedotname/file.dot.proto | 62 - .../test/filedotname/file.dotpb_test.go | 244 - .../gogo/protobuf/test/fuzztests/Makefile | 31 - .../gogo/protobuf/test/fuzztests/fuzz.pb.go | 2747 - .../gogo/protobuf/test/fuzztests/fuzz.proto | 86 - .../gogo/protobuf/test/fuzztests/fuzz_test.go | 136 - .../gogo/protobuf/test/group/Makefile | 30 - .../gogo/protobuf/test/group/group.pb.go | 952 - .../gogo/protobuf/test/group/group.proto | 65 - .../gogo/protobuf/test/group/grouppb_test.go | 539 - .../gogo/protobuf/test/importdedup/Makefile | 31 - .../test/importdedup/importdedup_test.go | 34 - .../protobuf/test/importdedup/proto.pb.go | 71 - .../protobuf/test/importdedup/proto.proto | 40 - .../protobuf/test/importduplicate/Makefile | 40 - .../importduplicate/importduplicate.pb.go | 258 - .../importduplicate/importduplicate.proto | 45 - .../importduplicate/importduplicate_test.go | 34 - .../importduplicate/importduplicatepb_test.go | 123 - .../importduplicate/proto/protopb_test.go | 121 - .../sortkeys/sortablepb_test.go | 121 - .../test/indeximport-issue72/Makefile | 31 - .../indeximport-issue72/index/indexpb_test.go | 153 - .../indeximport-issue72/indeximport.pb.go | 447 - .../indeximport-issue72/indeximport.proto | 46 - .../indeximport-issue72/indeximportpb_test.go | 154 - .../gogo/protobuf/test/int64support/Makefile | 30 - .../protobuf/test/int64support/object.pb.go | 489 - .../protobuf/test/int64support/object.proto | 24 - .../protobuf/test/int64support/object_js.go | 63 - .../test/int64support/object_js_test.go | 47 - .../test/int64support/objectpb_test.go | 261 - .../gogo/protobuf/test/issue260/Makefile | 3 - .../gogo/protobuf/test/issue260/README.md | 11 - .../protobuf/test/issue260/issue260.pb.go | 991 - .../protobuf/test/issue260/issue260.proto | 36 - .../protobuf/test/issue260/issue260pb_test.go | 656 - .../gogo/protobuf/test/issue260/models.go | 40 - .../gogo/protobuf/test/issue261/Makefile | 7 - .../protobuf/test/issue261/issue261.pb.go | 521 - .../protobuf/test/issue261/issue261.proto | 11 - .../gogo/protobuf/test/issue262/Makefile | 5 - .../protobuf/test/issue262/timefail.pb.go | 389 - .../protobuf/test/issue262/timefail.proto | 10 - .../gogo/protobuf/test/issue270/a/a1.proto | 12 - .../gogo/protobuf/test/issue270/a/a2.proto | 12 - .../gogo/protobuf/test/issue270/b/b.proto | 6 - .../gogo/protobuf/test/issue270/doc.go | 1 - .../protobuf/test/issue270/issue270_test.go | 51 - .../protobuf/test/issue312/events/Makefile | 4 - .../test/issue312/events/events.pb.go | 213 - .../test/issue312/events/events.proto | 17 - .../test/issue312/events/eventspb_test.go | 122 - .../gogo/protobuf/test/issue322/Makefile | 3 - .../protobuf/test/issue322/issue322.pb.go | 580 - .../protobuf/test/issue322/issue322.proto | 15 - .../protobuf/test/issue322/issue322pb_test.go | 167 - .../gogo/protobuf/test/issue330/Makefile | 3 - .../protobuf/test/issue330/issue330.pb.go | 398 - .../protobuf/test/issue330/issue330.proto | 17 - .../protobuf/test/issue330/issue330pb_test.go | 207 - .../gogo/protobuf/test/issue330/type.go | 17 - .../gogo/protobuf/test/issue34/Makefile | 30 - .../protobuf/test/issue34/issue34_test.go | 82 - .../gogo/protobuf/test/issue34/proto.pb.go | 351 - .../gogo/protobuf/test/issue34/proto.proto | 43 - .../gogo/protobuf/test/issue42order/Makefile | 30 - .../protobuf/test/issue42order/issue42.pb.go | 598 - .../protobuf/test/issue42order/issue42.proto | 48 - .../protobuf/test/issue42order/order_test.go | 56 - .../gogo/protobuf/test/issue8/Makefile | 30 - .../gogo/protobuf/test/issue8/proto.pb.go | 362 - .../gogo/protobuf/test/issue8/proto.proto | 42 - .../gogo/protobuf/test/issue8/protopb_test.go | 106 - .../protobuf/test/jsonpb-gogo/jsonpb_gogo.go | 1 - .../test/jsonpb-gogo/jsonpb_gogo_test.go | 36 - .../gogo/protobuf/test/mapdefaults/Makefile | 33 - .../test/mapdefaults/combos/both/map.pb.go | 1435 - .../test/mapdefaults/combos/both/map.proto | 70 - .../test/mapdefaults/combos/both/map_test.go | 180 - .../mapdefaults/combos/both/mappb_test.go | 564 - .../mapdefaults/combos/marshaler/map.pb.go | 943 - .../mapdefaults/combos/marshaler/map.proto | 70 - .../mapdefaults/combos/marshaler/map_test.go | 180 - .../combos/marshaler/mappb_test.go | 564 - .../test/mapdefaults/combos/neither/map.pb.go | 833 - .../test/mapdefaults/combos/neither/map.proto | 70 - .../mapdefaults/combos/neither/map_test.go | 180 - .../mapdefaults/combos/neither/mappb_test.go | 480 - .../mapdefaults/combos/unmarshaler/map.pb.go | 1325 - .../mapdefaults/combos/unmarshaler/map.proto | 70 - .../combos/unmarshaler/map_test.go | 180 - .../combos/unmarshaler/mappb_test.go | 480 - .../gogo/protobuf/test/mapdefaults/map.pb.go | 414 - .../gogo/protobuf/test/mapdefaults/map.proto | 70 - .../protobuf/test/mapdefaults/map_test.go.in | 180 - .../gogo/protobuf/test/mapsproto2/Makefile | 35 - .../mapsproto2/combos/both/mapsproto2.pb.go | 8627 --- .../mapsproto2/combos/both/mapsproto2.proto | 124 - .../mapsproto2/combos/both/mapsproto2_test.go | 104 - .../combos/both/mapsproto2pb_test.go | 989 - .../combos/marshaler/mapsproto2.pb.go | 4487 -- .../combos/marshaler/mapsproto2.proto | 124 - .../combos/marshaler/mapsproto2_test.go | 104 - .../combos/marshaler/mapsproto2pb_test.go | 989 - .../combos/neither/mapsproto2.pb.go | 3588 -- .../combos/neither/mapsproto2.proto | 124 - .../combos/neither/mapsproto2_test.go | 104 - .../combos/neither/mapsproto2pb_test.go | 877 - .../combos/unmarshaler/mapsproto2.pb.go | 7728 --- .../combos/unmarshaler/mapsproto2.proto | 124 - .../combos/unmarshaler/mapsproto2_test.go | 104 - .../combos/unmarshaler/mapsproto2pb_test.go | 877 - .../gogo/protobuf/test/mapsproto2/doc.go | 1 - .../protobuf/test/mapsproto2/header.proto | 76 - .../protobuf/test/mapsproto2/mapsproto2.proto | 124 - .../test/mapsproto2/mapsproto2_test.go.in | 104 - .../gogo/protobuf/test/mixbench/.gitignore | 1 - .../gogo/protobuf/test/mixbench/marshal.txt | 73 - .../gogo/protobuf/test/mixbench/marshaler.txt | 73 - .../gogo/protobuf/test/mixbench/mixbench.go | 58 - .../protobuf/test/mixbench/oldmarshaler.txt | 73 - .../protobuf/test/mixbench/oldunmarshaler.txt | 73 - .../gogo/protobuf/test/mixbench/unmarshal.txt | 73 - .../protobuf/test/mixbench/unmarshaler.txt | 73 - .../test/mixbench/unsafe_marshaler.txt | 73 - .../test/mixbench/unsafe_unmarshaler.txt | 73 - .../gogo/protobuf/test/moredefaults/Makefile | 30 - .../gogo/protobuf/test/moredefaults/md.pb.go | 331 - .../gogo/protobuf/test/moredefaults/md.proto | 53 - .../protobuf/test/moredefaults/md_test.go | 61 - .../protobuf/test/moredefaults/mdpb_test.go | 185 - .../gogo/protobuf/test/nopackage/Makefile | 30 - .../protobuf/test/nopackage/nopackage.pb.go | 392 - .../protobuf/test/nopackage/nopackage.proto | 33 - .../protobuf/test/nopackage/nopackage_test.go | 38 - .../gogo/protobuf/test/oneof/Makefile | 32 - .../protobuf/test/oneof/combos/both/one.pb.go | 5440 -- .../protobuf/test/oneof/combos/both/one.proto | 103 - .../test/oneof/combos/both/onepb_test.go | 741 - .../test/oneof/combos/marshaler/one.pb.go | 4565 -- .../test/oneof/combos/marshaler/one.proto | 103 - .../test/oneof/combos/marshaler/onepb_test.go | 741 - .../test/oneof/combos/neither/one.pb.go | 4193 -- .../test/oneof/combos/neither/one.proto | 103 - .../test/oneof/combos/neither/onepb_test.go | 629 - .../test/oneof/combos/unmarshaler/one.pb.go | 5069 -- .../test/oneof/combos/unmarshaler/one.proto | 103 - .../oneof/combos/unmarshaler/onepb_test.go | 629 - .../gogo/protobuf/test/oneof/doc.go | 1 - .../gogo/protobuf/test/oneof/one.proto | 103 - .../gogo/protobuf/test/oneof3/Makefile | 32 - .../test/oneof3/combos/both/one.pb.go | 3274 - .../test/oneof3/combos/both/one.proto | 82 - .../test/oneof3/combos/both/onepb_test.go | 387 - .../test/oneof3/combos/marshaler/one.pb.go | 2739 - .../test/oneof3/combos/marshaler/one.proto | 82 - .../oneof3/combos/marshaler/onepb_test.go | 387 - .../test/oneof3/combos/neither/one.pb.go | 2542 - .../test/oneof3/combos/neither/one.proto | 82 - .../test/oneof3/combos/neither/onepb_test.go | 331 - .../test/oneof3/combos/unmarshaler/one.pb.go | 3078 - .../test/oneof3/combos/unmarshaler/one.proto | 82 - .../oneof3/combos/unmarshaler/onepb_test.go | 331 - .../gogo/protobuf/test/oneof3/doc.go | 1 - .../gogo/protobuf/test/oneof3/one.proto | 82 - .../gogo/protobuf/test/oneofembed/Makefile | 31 - .../protobuf/test/oneofembed/oneofembed.pb.go | 390 - .../protobuf/test/oneofembed/oneofembed.proto | 46 - .../test/oneofembed/oneofembedpb_test.go | 184 - .../gogo/protobuf/test/packed/Makefile | 30 - .../gogo/protobuf/test/packed/doc.go | 1 - .../gogo/protobuf/test/packed/packed.pb.go | 4221 -- .../gogo/protobuf/test/packed/packed.proto | 103 - .../gogo/protobuf/test/packed/packed_test.go | 328 - .../protobuf/test/proto3extension/Makefile | 32 - .../test/proto3extension/proto3ext.pb.go | 66 - .../test/proto3extension/proto3ext.proto | 11 - .../gogo/protobuf/test/protosize/Makefile | 30 - .../protobuf/test/protosize/protosize.pb.go | 595 - .../protobuf/test/protosize/protosize.proto | 46 - .../protobuf/test/protosize/protosize_test.go | 37 - .../test/protosize/protosizepb_test.go | 153 - .../protobuf/test/registration/.gitignore | 2 - .../gogo/protobuf/test/registration/Makefile | 33 - .../test/registration/registration.proto | 45 - .../test/registration/registration_test.go.in | 85 - .../gogo/protobuf/test/required/Makefile | 30 - .../test/required/requiredexample.pb.go | 2148 - .../test/required/requiredexample.proto | 83 - .../test/required/requiredexamplepb_test.go | 181 - .../gogo/protobuf/test/sizerconflict/doc.go | 1 - .../test/sizerconflict/sizerconflict.proto | 43 - .../test/sizerconflict/sizerconflict_test.go | 48 - .../protobuf/test/sizeunderscore/Makefile | 30 - .../test/sizeunderscore/sizeunderscore.pb.go | 542 - .../test/sizeunderscore/sizeunderscore.proto | 45 - .../sizeunderscore/sizeunderscorepb_test.go | 153 - .../gogo/protobuf/test/stdtypes/Makefile | 39 - .../test/stdtypes/concurrency_test.go | 31 - .../protobuf/test/stdtypes/stdtypes.pb.go | 1313 - .../protobuf/test/stdtypes/stdtypes.proto | 78 - .../protobuf/test/stdtypes/stdtypespb_test.go | 807 - .../gogo/protobuf/test/tags/Makefile | 30 - .../github.com/gogo/protobuf/test/tags/doc.go | 1 - .../gogo/protobuf/test/tags/tags.pb.go | 188 - .../gogo/protobuf/test/tags/tags.proto | 44 - .../gogo/protobuf/test/tags/tags_test.go | 119 - .../gogo/protobuf/test/theproto3/Makefile | 36 - .../test/theproto3/combos/both/proto3_test.go | 159 - .../theproto3/combos/both/theproto3.pb.go | 11056 ---- .../theproto3/combos/both/theproto3.proto | 168 - .../theproto3/combos/both/theproto3pb_test.go | 2423 - .../theproto3/combos/marshaler/proto3_test.go | 159 - .../combos/marshaler/theproto3.pb.go | 6021 -- .../combos/marshaler/theproto3.proto | 168 - .../combos/marshaler/theproto3pb_test.go | 2423 - .../theproto3/combos/neither/proto3_test.go | 159 - .../theproto3/combos/neither/theproto3.pb.go | 4877 -- .../theproto3/combos/neither/theproto3.proto | 168 - .../combos/neither/theproto3pb_test.go | 2143 - .../combos/unmarshaler/proto3_test.go | 159 - .../combos/unmarshaler/theproto3.pb.go | 9914 --- .../combos/unmarshaler/theproto3.proto | 168 - .../combos/unmarshaler/theproto3pb_test.go | 2143 - .../gogo/protobuf/test/theproto3/doc.go | 1 - .../gogo/protobuf/test/theproto3/footer.proto | 25 - .../gogo/protobuf/test/theproto3/header.proto | 95 - .../gogo/protobuf/test/theproto3/maps.proto | 48 - .../protobuf/test/theproto3/proto3_test.go.in | 159 - .../protobuf/test/theproto3/theproto3.proto | 168 - .../gogo/protobuf/test/thetestpb_test.go | 16045 ----- .../gogo/protobuf/test/typedecl/Makefile | 3 - .../gogo/protobuf/test/typedecl/models.go | 41 - .../protobuf/test/typedecl/typedecl.pb.go | 934 - .../protobuf/test/typedecl/typedecl.proto | 34 - .../protobuf/test/typedecl/typedeclpb_test.go | 655 - .../gogo/protobuf/test/typedecl_all/Makefile | 3 - .../gogo/protobuf/test/typedecl_all/models.go | 41 - .../test/typedecl_all/typedeclall.pb.go | 934 - .../test/typedecl_all/typedeclall.proto | 34 - .../test/typedecl_all/typedeclallpb_test.go | 655 - .../protobuf/test/typedeclimport/Makefile | 4 - .../protobuf/test/typedeclimport/models.go | 7 - .../test/typedeclimport/typedeclimport.pb.go | 384 - .../test/typedeclimport/typedeclimport.proto | 18 - .../typedeclimport/typedeclimport_test.go | 7 - .../gogo/protobuf/test/types/Makefile | 39 - .../test/types/combos/both/types.pb.go | 5819 -- .../test/types/combos/both/types.proto | 131 - .../test/types/combos/both/types_test.go | 242 - .../test/types/combos/both/typespb_test.go | 1984 - .../test/types/combos/marshaler/types.pb.go | 3380 - .../test/types/combos/marshaler/types.proto | 131 - .../test/types/combos/marshaler/types_test.go | 242 - .../types/combos/marshaler/typespb_test.go | 1984 - .../test/types/combos/neither/types.pb.go | 2651 - .../test/types/combos/neither/types.proto | 131 - .../test/types/combos/neither/types_test.go | 242 - .../test/types/combos/neither/typespb_test.go | 1732 - .../test/types/combos/unmarshaler/types.pb.go | 5090 -- .../test/types/combos/unmarshaler/types.proto | 131 - .../types/combos/unmarshaler/types_test.go | 242 - .../types/combos/unmarshaler/typespb_test.go | 1732 - .../gogo/protobuf/test/types/types.proto | 131 - .../gogo/protobuf/test/types/types_test.go.in | 243 - .../protobuf/test/unmarshalmerge/Makefile | 30 - .../test/unmarshalmerge/unmarshalmerge.pb.go | 1521 - .../test/unmarshalmerge/unmarshalmerge.proto | 75 - .../unmarshalmerge/unmarshalmerge_test.go | 99 - .../unmarshalmerge/unmarshalmergepb_test.go | 703 - .../gogo/protobuf/test/unrecognized/Makefile | 30 - .../protobuf/test/unrecognized/oldnew_test.go | 200 - .../test/unrecognized/unrecognized.pb.go | 4047 -- .../test/unrecognized/unrecognized.proto | 131 - .../test/unrecognized/unrecognizedpb_test.go | 1880 - .../protobuf/test/unrecognizedgroup/Makefile | 30 - .../test/unrecognizedgroup/oldnew_test.go | 128 - .../unrecognizedgroup/unrecognizedgroup.pb.go | 1700 - .../unrecognizedgroup/unrecognizedgroup.proto | 77 - .../unrecognizedgrouppb_test.go | 766 - .../gogo/protobuf/test/uuid_test.go | 51 - .../gogo/protobuf/types/any_test.go | 112 - .../gogo/protobuf/types/duration_test.go | 120 - .../gogo/protobuf/types/timestamp_test.go | 152 - .../gogo/protobuf/vanity/test/Makefile | 46 - .../gogo/protobuf/vanity/test/doc.go | 1 - .../protobuf/vanity/test/gofast/.gitignore | 1 - .../protobuf/vanity/test/gogovanity.proto | 39 - .../gogo/protobuf/vanity/test/proto3.proto | 35 - .../gogo/protobuf/vanity/test/vanity.proto | 36 - .../gogo/protobuf/vanity/test/vanity_test.go | 93 - .../golang/groupcache/{lru => }/LICENSE | 0 vendor/github.com/golang/protobuf/AUTHORS | 3 + .../protobuf/CONTRIBUTORS} | 4 +- .../golang/protobuf/{proto => }/LICENSE | 0 .../protobuf/proto}/Makefile | 14 +- .../protobuf/proto/proto3_proto/proto3.pb.go | 347 - .../golang/protobuf/ptypes/any/LICENSE | 31 - .../golang/protobuf/ptypes/any/any.pb.go | 178 - vendor/github.com/golang/snappy/.gitignore | 16 + vendor/github.com/golang/snappy/AUTHORS | 15 + vendor/github.com/golang/snappy/CONTRIBUTORS | 37 + vendor/github.com/golang/snappy/README | 107 + .../golang/snappy/cmd/snappytool/main.cpp | 77 - vendor/github.com/jackpal/gateway/.travis.yml | 13 + vendor/github.com/jackpal/gateway/README.md | 18 + .../github.com/kballard/go-shellquote/README | 36 + vendor/github.com/klauspost/cpuid/LICENSE | 22 - vendor/github.com/klauspost/cpuid/cpuid.go | 1030 - vendor/github.com/klauspost/cpuid/cpuid_386.s | 42 - .../github.com/klauspost/cpuid/cpuid_amd64.s | 42 - .../klauspost/cpuid/detect_intel.go | 17 - .../github.com/klauspost/cpuid/detect_ref.go | 23 - vendor/github.com/klauspost/cpuid/generate.go | 4 - .../github.com/klauspost/cpuid/private-gen.go | 476 - .../klauspost/cpuid/private/cpuid.go | 1024 - .../klauspost/cpuid/private/cpuid_386.s | 42 - .../klauspost/cpuid/private/cpuid_amd64.s | 42 - .../cpuid/private/cpuid_detect_intel.go | 17 - .../cpuid/private/cpuid_detect_ref.go | 23 - vendor/github.com/lib/pq/.gitignore | 4 + vendor/github.com/lib/pq/.travis.sh | 86 + vendor/github.com/lib/pq/.travis.yml | 50 + vendor/github.com/lib/pq/CONTRIBUTING.md | 29 + vendor/github.com/lib/pq/README.md | 95 + vendor/github.com/lib/pq/TESTS.md | 33 + .../github.com/lib/pq/example/listen/doc.go | 98 - vendor/github.com/lib/pq/go.mod | 1 + vendor/github.com/lib/pq/hstore/hstore.go | 118 - vendor/github.com/magefile/mage/mg/deps.go | 166 - vendor/github.com/magefile/mage/mg/errors.go | 51 - vendor/github.com/magefile/mage/mg/runtime.go | 36 - vendor/github.com/magefile/mage/sh/LICENSE | 201 - vendor/github.com/magefile/mage/sh/cmd.go | 165 - vendor/github.com/magefile/mage/sh/helpers.go | 16 - vendor/github.com/magefile/mage/types/LICENSE | 201 - .../github.com/magefile/mage/types/funcs.go | 58 - vendor/github.com/mattn/go-runewidth/LICENSE | 21 - .../mattn/go-runewidth/runewidth.go | 1224 - .../mattn/go-runewidth/runewidth_js.go | 8 - .../mattn/go-runewidth/runewidth_posix.go | 77 - .../mattn/go-runewidth/runewidth_windows.go | 25 - .../golang_protobuf_extensions}/LICENSE | 0 .../golang_protobuf_extensions/NOTICE | 1 + .../pbutil/.gitignore | 1 + .../golang_protobuf_extensions/pbutil/LICENSE | 201 - .../pbutil/Makefile | 7 + vendor/github.com/minio/cli/LICENSE | 21 - vendor/github.com/minio/cli/altsrc/altsrc.go | 3 - vendor/github.com/minio/cli/altsrc/flag.go | 261 - .../minio/cli/altsrc/flag_generated.go | 347 - .../minio/cli/altsrc/input_source_context.go | 21 - .../minio/cli/altsrc/map_input_source.go | 262 - .../minio/cli/altsrc/toml_file_loader.go | 113 - .../minio/cli/altsrc/yaml_file_loader.go | 92 - vendor/github.com/minio/cli/app.go | 504 - vendor/github.com/minio/cli/category.go | 44 - vendor/github.com/minio/cli/cli.go | 21 - vendor/github.com/minio/cli/command.go | 316 - vendor/github.com/minio/cli/context.go | 276 - vendor/github.com/minio/cli/errors.go | 115 - vendor/github.com/minio/cli/flag.go | 799 - vendor/github.com/minio/cli/flag_generated.go | 627 - vendor/github.com/minio/cli/funcs.go | 28 - vendor/github.com/minio/cli/help.go | 337 - .../github.com/minio/sha256-simd/.travis.yml | 21 + vendor/github.com/minio/sha256-simd/README.md | 120 + .../github.com/minio/sha256-simd/appveyor.yml | 32 + .../sha256-simd/sha256blockAvx512_amd64.asm | 686 + .../github.com/mitchellh/go-homedir/LICENSE | 21 - .../mitchellh/go-homedir/homedir.go | 137 - vendor/github.com/onsi/ginkgo/LICENSE | 20 - .../github.com/onsi/ginkgo/config/config.go | 193 - .../onsi/ginkgo/extensions/table/table.go | 98 - .../ginkgo/extensions/table/table_entry.go | 81 - .../onsi/ginkgo/ginkgo/bootstrap_command.go | 202 - .../onsi/ginkgo/ginkgo/build_command.go | 68 - .../ginkgo/ginkgo/convert/ginkgo_ast_nodes.go | 123 - .../onsi/ginkgo/ginkgo/convert/import.go | 91 - .../ginkgo/ginkgo/convert/package_rewriter.go | 127 - .../onsi/ginkgo/ginkgo/convert/test_finder.go | 56 - .../ginkgo/convert/testfile_rewriter.go | 163 - .../ginkgo/convert/testing_t_rewriter.go | 130 - .../onsi/ginkgo/ginkgo/convert_command.go | 45 - .../onsi/ginkgo/ginkgo/generate_command.go | 167 - .../onsi/ginkgo/ginkgo/help_command.go | 31 - .../interrupthandler/interrupt_handler.go | 52 - .../sigquit_swallower_unix.go | 14 - .../sigquit_swallower_windows.go | 7 - vendor/github.com/onsi/ginkgo/ginkgo/main.go | 300 - .../onsi/ginkgo/ginkgo/nodot/nodot.go | 194 - .../onsi/ginkgo/ginkgo/nodot_command.go | 77 - .../onsi/ginkgo/ginkgo/notifications.go | 141 - .../onsi/ginkgo/ginkgo/run_command.go | 269 - .../run_watch_and_build_command_flags.go | 167 - .../onsi/ginkgo/ginkgo/suite_runner.go | 173 - .../ginkgo/ginkgo/testrunner/log_writer.go | 52 - .../ginkgo/ginkgo/testrunner/run_result.go | 27 - .../ginkgo/ginkgo/testrunner/test_runner.go | 554 - .../ginkgo/ginkgo/testsuite/test_suite.go | 115 - .../ginkgo/testsuite/vendor_check_go15.go | 16 - .../ginkgo/testsuite/vendor_check_go16.go | 15 - .../onsi/ginkgo/ginkgo/unfocus_command.go | 38 - .../onsi/ginkgo/ginkgo/version_command.go | 24 - .../onsi/ginkgo/ginkgo/watch/delta.go | 22 - .../onsi/ginkgo/ginkgo/watch/delta_tracker.go | 75 - .../onsi/ginkgo/ginkgo/watch/dependencies.go | 91 - .../onsi/ginkgo/ginkgo/watch/package_hash.go | 104 - .../ginkgo/ginkgo/watch/package_hashes.go | 85 - .../onsi/ginkgo/ginkgo/watch/suite.go | 87 - .../onsi/ginkgo/ginkgo/watch_command.go | 175 - vendor/github.com/onsi/ginkgo/ginkgo_dsl.go | 573 - .../onsi/ginkgo/integration/integration.go | 1 - .../internal/codelocation/code_location.go | 32 - .../internal/containernode/container_node.go | 151 - .../onsi/ginkgo/internal/failer/failer.go | 92 - .../ginkgo/internal/leafnodes/benchmarker.go | 103 - .../ginkgo/internal/leafnodes/interfaces.go | 19 - .../onsi/ginkgo/internal/leafnodes/it_node.go | 47 - .../ginkgo/internal/leafnodes/measure_node.go | 62 - .../onsi/ginkgo/internal/leafnodes/runner.go | 114 - .../ginkgo/internal/leafnodes/setup_nodes.go | 42 - .../ginkgo/internal/leafnodes/suite_nodes.go | 55 - .../synchronized_after_suite_node.go | 90 - .../synchronized_before_suite_node.go | 181 - .../onsi/ginkgo/internal/remote/aggregator.go | 249 - .../internal/remote/forwarding_reporter.go | 90 - .../internal/remote/output_interceptor.go | 10 - .../remote/output_interceptor_unix.go | 55 - .../internal/remote/output_interceptor_win.go | 33 - .../onsi/ginkgo/internal/remote/server.go | 224 - .../remote/syscall_dup_linux_arm64.go | 11 - .../internal/remote/syscall_dup_solaris.go | 9 - .../internal/remote/syscall_dup_unix.go | 11 - .../onsi/ginkgo/internal/spec/spec.go | 206 - .../onsi/ginkgo/internal/spec/specs.go | 123 - .../internal/spec_iterator/index_computer.go | 55 - .../spec_iterator/parallel_spec_iterator.go | 59 - .../spec_iterator/serial_spec_iterator.go | 45 - .../sharded_parallel_spec_iterator.go | 47 - .../internal/spec_iterator/spec_iterator.go | 20 - .../ginkgo/internal/specrunner/random_id.go | 15 - .../ginkgo/internal/specrunner/spec_runner.go | 408 - .../onsi/ginkgo/internal/suite/suite.go | 183 - .../internal/testingtproxy/testing_t_proxy.go | 76 - .../ginkgo/internal/writer/fake_writer.go | 36 - .../onsi/ginkgo/internal/writer/writer.go | 81 - .../onsi/ginkgo/reporters/default_reporter.go | 84 - .../onsi/ginkgo/reporters/fake_reporter.go | 59 - .../onsi/ginkgo/reporters/junit_reporter.go | 147 - .../onsi/ginkgo/reporters/reporter.go | 15 - .../reporters/stenographer/console_logging.go | 64 - .../stenographer/fake_stenographer.go | 142 - .../reporters/stenographer/stenographer.go | 573 - .../support/go-colorable/colorable_others.go | 24 - .../support/go-colorable/colorable_windows.go | 783 - .../support/go-colorable/noncolorable.go | 57 - .../stenographer/support/go-isatty/doc.go | 2 - .../support/go-isatty/isatty_appengine.go | 9 - .../support/go-isatty/isatty_bsd.go | 18 - .../support/go-isatty/isatty_linux.go | 18 - .../support/go-isatty/isatty_solaris.go | 16 - .../support/go-isatty/isatty_windows.go | 19 - .../ginkgo/reporters/teamcity_reporter.go | 93 - .../onsi/ginkgo/types/code_location.go | 15 - .../onsi/ginkgo/types/synchronization.go | 30 - vendor/github.com/onsi/ginkgo/types/types.go | 173 - vendor/github.com/onsi/gomega/LICENSE | 20 - .../github.com/onsi/gomega/format/format.go | 379 - .../github.com/onsi/gomega/gbytes/buffer.go | 245 - .../onsi/gomega/gbytes/io_wrappers.go | 85 - .../onsi/gomega/gbytes/say_matcher.go | 105 - vendor/github.com/onsi/gomega/gexec/build.go | 112 - .../onsi/gomega/gexec/exit_matcher.go | 86 - .../onsi/gomega/gexec/prefixed_writer.go | 53 - .../github.com/onsi/gomega/gexec/session.go | 304 - .../github.com/onsi/gomega/ghttp/handlers.go | 313 - .../onsi/gomega/ghttp/protobuf/protobuf.go | 3 - .../ghttp/protobuf/simple_message.pb.go | 55 - .../onsi/gomega/ghttp/test_server.go | 381 - vendor/github.com/onsi/gomega/gomega_dsl.go | 396 - .../onsi/gomega/gstruct/elements.go | 145 - .../gomega/gstruct/errors/nested_types.go | 72 - .../github.com/onsi/gomega/gstruct/fields.go | 141 - .../github.com/onsi/gomega/gstruct/ignore.go | 37 - .../github.com/onsi/gomega/gstruct/pointer.go | 56 - .../github.com/onsi/gomega/gstruct/types.go | 15 - .../gomega/internal/assertion/assertion.go | 98 - .../asyncassertion/async_assertion.go | 189 - .../internal/fakematcher/fake_matcher.go | 23 - .../internal/oraclematcher/oracle_matcher.go | 25 - .../testingtsupport/testing_t_support.go | 40 - vendor/github.com/onsi/gomega/matchers.go | 427 - vendor/github.com/onsi/gomega/matchers/and.go | 63 - .../matchers/assignable_to_type_of_matcher.go | 31 - .../onsi/gomega/matchers/attributes_slice.go | 14 - .../onsi/gomega/matchers/be_a_directory.go | 54 - .../onsi/gomega/matchers/be_a_regular_file.go | 54 - .../gomega/matchers/be_an_existing_file.go | 38 - .../onsi/gomega/matchers/be_closed_matcher.go | 46 - .../onsi/gomega/matchers/be_empty_matcher.go | 27 - .../matchers/be_equivalent_to_matcher.go | 34 - .../onsi/gomega/matchers/be_false_matcher.go | 26 - .../onsi/gomega/matchers/be_identical_to.go | 37 - .../onsi/gomega/matchers/be_nil_matcher.go | 18 - .../gomega/matchers/be_numerically_matcher.go | 120 - .../onsi/gomega/matchers/be_sent_matcher.go | 71 - .../gomega/matchers/be_temporally_matcher.go | 66 - .../onsi/gomega/matchers/be_true_matcher.go | 26 - .../onsi/gomega/matchers/be_zero_matcher.go | 28 - .../onsi/gomega/matchers/consist_of.go | 80 - .../matchers/contain_element_matcher.go | 56 - .../matchers/contain_substring_matcher.go | 38 - .../onsi/gomega/matchers/equal_matcher.go | 42 - .../onsi/gomega/matchers/have_cap_matcher.go | 28 - .../onsi/gomega/matchers/have_key_matcher.go | 54 - .../matchers/have_key_with_value_matcher.go | 74 - .../onsi/gomega/matchers/have_len_matcher.go | 28 - .../gomega/matchers/have_occurred_matcher.go | 33 - .../gomega/matchers/have_prefix_matcher.go | 36 - .../gomega/matchers/have_suffix_matcher.go | 36 - .../gomega/matchers/match_error_matcher.go | 51 - .../gomega/matchers/match_json_matcher.go | 135 - .../gomega/matchers/match_regexp_matcher.go | 43 - .../onsi/gomega/matchers/match_xml_matcher.go | 134 - .../gomega/matchers/match_yaml_matcher.go | 74 - vendor/github.com/onsi/gomega/matchers/not.go | 30 - vendor/github.com/onsi/gomega/matchers/or.go | 67 - .../onsi/gomega/matchers/panic_matcher.go | 46 - .../onsi/gomega/matchers/receive_matcher.go | 122 - .../onsi/gomega/matchers/succeed_matcher.go | 33 - .../goraph/bipartitegraph/bipartitegraph.go | 41 - .../bipartitegraph/bipartitegraphmatching.go | 159 - .../matchers/support/goraph/edge/edge.go | 61 - .../matchers/support/goraph/node/node.go | 7 - .../matchers/support/goraph/util/util.go | 7 - .../onsi/gomega/matchers/type_support.go | 173 - .../onsi/gomega/matchers/with_transform.go | 72 - vendor/github.com/onsi/gomega/types/types.go | 17 - .../oschwald/geoip2-golang/.gitignore | 3 + .../oschwald/geoip2-golang/.gitmodules | 3 + .../oschwald/geoip2-golang/.travis.yml | 24 + .../oschwald/geoip2-golang/README.md | 90 + .../oschwald/maxminddb-golang/.gitignore | 4 + .../oschwald/maxminddb-golang/.gitmodules | 3 + .../oschwald/maxminddb-golang/.travis.yml | 23 + .../oschwald/maxminddb-golang/README.md | 38 + .../oschwald/maxminddb-golang/appveyor.yml | 19 + vendor/github.com/petermattis/goid/.gitignore | 4 + .../github.com/petermattis/goid/.travis.yml | 10 + vendor/github.com/petermattis/goid/README.md | 4 + vendor/github.com/pkg/errors/.gitignore | 24 + vendor/github.com/pkg/errors/.travis.yml | 13 + vendor/github.com/pkg/errors/README.md | 52 + vendor/github.com/pkg/errors/appveyor.yml | 32 + .../client_golang/{prometheus => }/LICENSE | 0 .../prometheus/client_golang/NOTICE | 23 + .../client_golang/prometheus/.gitignore | 1 + .../client_golang/prometheus/README.md | 1 + .../prometheus/graphite/bridge.go | 282 - .../client_golang/prometheus/promauto/auto.go | 223 - .../prometheus/push/deprecated.go | 172 - .../client_golang/prometheus/push/push.go | 236 - .../prometheus/testutil/testutil.go | 184 - .../prometheus/client_model/{go => }/LICENSE | 0 .../github.com/prometheus/client_model/NOTICE | 5 + .../prometheus/common/{expfmt => }/LICENSE | 0 vendor/github.com/prometheus/common/NOTICE | 5 + .../bitbucket.org/ww/goautoneg/LICENSE | 201 - .../bitbucket.org/ww/goautoneg/README.txt | 67 + .../prometheus/common/model/LICENSE | 201 - .../github.com/prometheus/procfs/.travis.yml | 9 + .../prometheus/procfs/CONTRIBUTING.md | 18 + .../prometheus/procfs/MAINTAINERS.md | 1 + vendor/github.com/prometheus/procfs/Makefile | 18 + vendor/github.com/prometheus/procfs/NOTICE | 7 + vendor/github.com/prometheus/procfs/README.md | 11 + .../prometheus/procfs/bcache/bcache.go | 84 - .../prometheus/procfs/bcache/get.go | 330 - .../github.com/prometheus/procfs/sysfs/doc.go | 16 - .../github.com/prometheus/procfs/sysfs/fs.go | 108 - vendor/github.com/prometheus/procfs/ttar | 264 + .../github.com/rcrowley/go-metrics/.gitignore | 9 + .../rcrowley/go-metrics/.travis.yml | 18 + .../github.com/rcrowley/go-metrics/README.md | 166 + .../cmd/metrics-bench/metrics-bench.go | 20 - .../cmd/metrics-example/metrics-example.go | 154 - .../go-metrics/cmd/never-read/never-read.go | 22 - .../github.com/rcrowley/go-metrics/exp/exp.go | 156 - .../rcrowley/go-metrics/librato/client.go | 102 - .../rcrowley/go-metrics/librato/librato.go | 235 - .../github.com/rcrowley/go-metrics/memory.md | 285 + .../rcrowley/go-metrics/stathat/stathat.go | 69 - .../rcrowley/go-metrics/validate.sh | 10 + .../sasha-s/go-deadlock/.travis.yml | 10 + .../github.com/sasha-s/go-deadlock/Readme.md | 117 + vendor/github.com/sirupsen/logrus/LICENSE | 21 - vendor/github.com/sirupsen/logrus/alt_exit.go | 64 - vendor/github.com/sirupsen/logrus/doc.go | 26 - vendor/github.com/sirupsen/logrus/entry.go | 279 - vendor/github.com/sirupsen/logrus/exported.go | 193 - .../github.com/sirupsen/logrus/formatter.go | 45 - vendor/github.com/sirupsen/logrus/hooks.go | 34 - .../sirupsen/logrus/hooks/syslog/syslog.go | 55 - .../sirupsen/logrus/hooks/test/test.go | 95 - .../sirupsen/logrus/json_formatter.go | 79 - vendor/github.com/sirupsen/logrus/logger.go | 323 - vendor/github.com/sirupsen/logrus/logrus.go | 143 - .../sirupsen/logrus/terminal_bsd.go | 10 - .../logrus/terminal_check_appengine.go | 11 - .../logrus/terminal_check_notappengine.go | 19 - .../sirupsen/logrus/terminal_linux.go | 14 - .../sirupsen/logrus/text_formatter.go | 178 - vendor/github.com/sirupsen/logrus/writer.go | 62 - vendor/github.com/stathat/go/LICENSE | 19 - vendor/github.com/stathat/go/stathat.go | 605 - vendor/github.com/syncthing/notify/.gitignore | 92 + .../github.com/syncthing/notify/.travis.yml | 32 + vendor/github.com/syncthing/notify/AUTHORS | 10 + vendor/github.com/syncthing/notify/README.md | 22 + .../github.com/syncthing/notify/appveyor.yml | 27 + vendor/github.com/syncthing/notify/go.mod | 3 + .../syndtr/goleveldb/{leveldb => }/LICENSE | 0 .../syndtr/goleveldb/leveldb/testutil/db.go | 222 - .../goleveldb/leveldb/testutil/ginkgo.go | 21 - .../syndtr/goleveldb/leveldb/testutil/iter.go | 327 - .../syndtr/goleveldb/leveldb/testutil/kv.go | 352 - .../goleveldb/leveldb/testutil/kvtest.go | 212 - .../goleveldb/leveldb/testutil/storage.go | 693 - .../syndtr/goleveldb/leveldb/testutil/util.go | 171 - vendor/github.com/templexxx/cpufeat/LICENSE | 27 - vendor/github.com/templexxx/cpufeat/cpu.go | 32 - .../github.com/templexxx/cpufeat/cpu_arm.go | 7 - .../github.com/templexxx/cpufeat/cpu_arm64.go | 7 - .../github.com/templexxx/cpufeat/cpu_mips.go | 7 - .../templexxx/cpufeat/cpu_mips64.go | 7 - .../templexxx/cpufeat/cpu_mips64le.go | 7 - .../templexxx/cpufeat/cpu_mipsle.go | 7 - .../github.com/templexxx/cpufeat/cpu_ppc64.go | 7 - .../templexxx/cpufeat/cpu_ppc64le.go | 7 - .../github.com/templexxx/cpufeat/cpu_s390x.go | 7 - .../github.com/templexxx/cpufeat/cpu_x86.go | 59 - vendor/github.com/templexxx/cpufeat/cpu_x86.s | 32 - vendor/github.com/thejerf/suture/.travis.yml | 9 + vendor/github.com/thejerf/suture/README.md | 91 + vendor/github.com/thejerf/suture/gml | 47 + vendor/github.com/thejerf/suture/pre-commit | 17 + vendor/github.com/tjfoc/gmsm/sm4/LICENSE | 201 - vendor/github.com/tjfoc/gmsm/sm4/sm4.go | 342 - .../vitrun/qart/{coding => }/LICENSE | 0 .../vitrun/qart/LICENSE.bsd} | 2 - vendor/github.com/vitrun/qart/gf256/LICENSE | 201 - vendor/github.com/vitrun/qart/qr/LICENSE | 201 - vendor/golang.org/x/crypto/AUTHORS | 3 + vendor/golang.org/x/crypto/CONTRIBUTORS | 3 + .../golang.org/x/crypto/{bcrypt => }/LICENSE | 0 vendor/golang.org/x/crypto/PATENTS | 22 + vendor/golang.org/x/crypto/cast5/cast5.go | 526 - vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 77 - .../x/crypto/salsa20/salsa/hsalsa20.go | 144 - .../x/crypto/salsa20/salsa/salsa2020_amd64.s | 889 - .../x/crypto/salsa20/salsa/salsa208.go | 199 - .../x/crypto/salsa20/salsa/salsa20_amd64.go | 24 - .../x/crypto/salsa20/salsa/salsa20_ref.go | 234 - vendor/golang.org/x/crypto/salsa20/salsa20.go | 54 - .../golang.org/x/crypto/ssh/terminal/LICENSE | 27 - .../x/crypto/ssh/terminal/terminal.go | 951 - .../golang.org/x/crypto/ssh/terminal/util.go | 116 - .../x/crypto/ssh/terminal/util_bsd.go | 12 - .../x/crypto/ssh/terminal/util_linux.go | 10 - .../x/crypto/ssh/terminal/util_plan9.go | 58 - .../x/crypto/ssh/terminal/util_solaris.go | 128 - .../x/crypto/ssh/terminal/util_windows.go | 97 - vendor/golang.org/x/crypto/tea/LICENSE | 27 - vendor/golang.org/x/crypto/tea/cipher.go | 108 - vendor/golang.org/x/crypto/twofish/twofish.go | 342 - vendor/golang.org/x/crypto/xtea/LICENSE | 27 - vendor/golang.org/x/crypto/xtea/block.go | 66 - vendor/golang.org/x/crypto/xtea/cipher.go | 82 - vendor/golang.org/x/net/AUTHORS | 3 + vendor/golang.org/x/net/CONTRIBUTORS | 3 + .../x/{crypto/blowfish => net}/LICENSE | 0 vendor/golang.org/x/net/PATENTS | 22 + vendor/golang.org/x/net/bpf/LICENSE | 27 - vendor/golang.org/x/net/context/context.go | 56 + vendor/golang.org/x/net/context/go17.go | 72 + vendor/golang.org/x/net/context/go19.go | 20 + vendor/golang.org/x/net/context/pre_go17.go | 300 + vendor/golang.org/x/net/context/pre_go19.go | 109 + vendor/golang.org/x/net/html/LICENSE | 27 - vendor/golang.org/x/net/html/atom/atom.go | 78 - vendor/golang.org/x/net/html/atom/gen.go | 709 - vendor/golang.org/x/net/html/atom/table.go | 777 - .../golang.org/x/net/html/charset/charset.go | 257 - vendor/golang.org/x/net/html/const.go | 104 - vendor/golang.org/x/net/html/doc.go | 106 - vendor/golang.org/x/net/html/doctype.go | 156 - vendor/golang.org/x/net/html/entity.go | 2253 - vendor/golang.org/x/net/html/escape.go | 258 - vendor/golang.org/x/net/html/foreign.go | 226 - vendor/golang.org/x/net/html/node.go | 193 - vendor/golang.org/x/net/html/parse.go | 2094 - vendor/golang.org/x/net/html/render.go | 271 - vendor/golang.org/x/net/html/token.go | 1219 - vendor/golang.org/x/net/internal/iana/LICENSE | 27 - .../golang.org/x/net/internal/socket/LICENSE | 27 - vendor/golang.org/x/net/ipv4/LICENSE | 27 - vendor/golang.org/x/net/ipv6/LICENSE | 27 - vendor/golang.org/x/net/proxy/LICENSE | 27 - vendor/golang.org/x/sys/AUTHORS | 3 + vendor/golang.org/x/sys/CONTRIBUTORS | 3 + .../x/{crypto/cast5 => sys}/LICENSE | 0 vendor/golang.org/x/sys/PATENTS | 22 + vendor/golang.org/x/sys/unix/.gitignore | 2 + vendor/golang.org/x/sys/unix/LICENSE | 27 - vendor/golang.org/x/sys/unix/README.md | 173 + .../golang.org/x/sys/unix/affinity_linux.go | 124 + vendor/golang.org/x/sys/unix/aliases.go | 14 + vendor/golang.org/x/sys/unix/asm_aix_ppc64.s | 17 + .../x/sys/unix/asm_dragonfly_amd64.s | 10 +- vendor/golang.org/x/sys/unix/asm_linux_386.s | 36 +- .../golang.org/x/sys/unix/asm_linux_amd64.s | 30 +- vendor/golang.org/x/sys/unix/asm_linux_arm.s | 35 +- .../golang.org/x/sys/unix/asm_linux_arm64.s | 30 +- .../golang.org/x/sys/unix/asm_linux_mips64x.s | 36 +- .../golang.org/x/sys/unix/asm_linux_mipsx.s | 33 +- .../golang.org/x/sys/unix/asm_linux_ppc64x.s | 36 +- .../golang.org/x/sys/unix/asm_linux_s390x.s | 28 + vendor/golang.org/x/sys/unix/cap_freebsd.go | 30 +- vendor/golang.org/x/sys/unix/constants.go | 2 +- vendor/golang.org/x/sys/unix/dev_aix_ppc.go | 27 + vendor/golang.org/x/sys/unix/dev_aix_ppc64.go | 29 + vendor/golang.org/x/sys/unix/dirent.go | 91 +- vendor/golang.org/x/sys/unix/env_unix.go | 6 +- vendor/golang.org/x/sys/unix/env_unset.go | 14 - .../x/sys/unix/{flock.go => fcntl.go} | 10 + ...ck_linux_32bit.go => fcntl_linux_32bit.go} | 0 vendor/golang.org/x/sys/unix/gccgo.go | 16 + vendor/golang.org/x/sys/unix/gccgo_c.c | 10 +- vendor/golang.org/x/sys/unix/ioctl.go | 30 + vendor/golang.org/x/sys/unix/linux/mkall.go | 482 - vendor/golang.org/x/sys/unix/linux/types.go | 596 - vendor/golang.org/x/sys/unix/mkall.sh | 204 + vendor/golang.org/x/sys/unix/mkerrors.sh | 658 + vendor/golang.org/x/sys/unix/mkpost.go | 31 +- vendor/golang.org/x/sys/unix/mksyscall.go | 367 + .../x/sys/unix/mksyscall_aix_ppc.pl | 384 + .../x/sys/unix/mksyscall_aix_ppc64.pl | 579 + .../x/sys/unix/mksyscall_solaris.pl | 294 + .../golang.org/x/sys/unix/mksysctl_openbsd.pl | 265 + .../golang.org/x/sys/unix/mksysnum_darwin.pl | 39 + .../x/sys/unix/mksysnum_dragonfly.pl | 50 + .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 50 + .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 58 + .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 50 + .../golang.org/x/sys/unix/openbsd_pledge.go | 154 +- .../golang.org/x/sys/unix/openbsd_unveil.go | 44 + vendor/golang.org/x/sys/unix/pagesize_unix.go | 2 +- vendor/golang.org/x/sys/unix/race0.go | 2 +- vendor/golang.org/x/sys/unix/sockcmsg_unix.go | 29 +- vendor/golang.org/x/sys/unix/str.go | 2 +- vendor/golang.org/x/sys/unix/syscall.go | 13 +- vendor/golang.org/x/sys/unix/syscall_aix.go | 540 + .../golang.org/x/sys/unix/syscall_aix_ppc.go | 34 + .../x/sys/unix/syscall_aix_ppc64.go | 34 + vendor/golang.org/x/sys/unix/syscall_bsd.go | 49 +- .../golang.org/x/sys/unix/syscall_darwin.go | 140 +- .../x/sys/unix/syscall_dragonfly.go | 33 +- .../golang.org/x/sys/unix/syscall_freebsd.go | 581 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 446 +- .../x/sys/unix/syscall_linux_386.go | 16 +- .../x/sys/unix/syscall_linux_amd64.go | 53 +- .../x/sys/unix/syscall_linux_arm.go | 18 +- .../x/sys/unix/syscall_linux_arm64.go | 71 +- .../golang.org/x/sys/unix/syscall_linux_gc.go | 14 + .../x/sys/unix/syscall_linux_gc_386.go | 16 + .../x/sys/unix/syscall_linux_gccgo_386.go | 30 + .../x/sys/unix/syscall_linux_gccgo_arm.go | 20 + .../x/sys/unix/syscall_linux_mips64x.go | 12 +- .../x/sys/unix/syscall_linux_mipsx.go | 20 +- .../x/sys/unix/syscall_linux_ppc64x.go | 30 +- .../x/sys/unix/syscall_linux_riscv64.go | 209 + .../x/sys/unix/syscall_linux_s390x.go | 17 + .../x/sys/unix/syscall_linux_sparc64.go | 3 + .../golang.org/x/sys/unix/syscall_netbsd.go | 63 +- .../golang.org/x/sys/unix/syscall_openbsd.go | 66 +- .../x/sys/unix/syscall_openbsd_386.go | 4 + .../x/sys/unix/syscall_openbsd_amd64.go | 4 + .../x/sys/unix/syscall_openbsd_arm.go | 4 + .../golang.org/x/sys/unix/syscall_solaris.go | 44 +- .../x/sys/unix/syscall_solaris_amd64.go | 5 - vendor/golang.org/x/sys/unix/syscall_unix.go | 120 +- .../golang.org/x/sys/unix/syscall_unix_gc.go | 2 +- .../x/sys/unix/syscall_unix_gc_ppc64x.go | 24 + vendor/golang.org/x/sys/unix/timestruct.go | 2 +- vendor/golang.org/x/sys/unix/types_aix.go | 236 + vendor/golang.org/x/sys/unix/types_darwin.go | 12 +- .../golang.org/x/sys/unix/types_dragonfly.go | 29 +- vendor/golang.org/x/sys/unix/types_freebsd.go | 92 +- vendor/golang.org/x/sys/unix/types_netbsd.go | 31 +- vendor/golang.org/x/sys/unix/types_openbsd.go | 40 +- vendor/golang.org/x/sys/unix/types_solaris.go | 29 +- vendor/golang.org/x/sys/unix/xattr_bsd.go | 240 + .../golang.org/x/sys/unix/zerrors_aix_ppc.go | 1372 + .../x/sys/unix/zerrors_aix_ppc64.go | 1373 + .../x/sys/unix/zerrors_darwin_386.go | 292 +- .../x/sys/unix/zerrors_darwin_amd64.go | 292 +- .../x/sys/unix/zerrors_darwin_arm.go | 292 +- .../x/sys/unix/zerrors_darwin_arm64.go | 292 +- .../x/sys/unix/zerrors_dragonfly_amd64.go | 347 +- .../x/sys/unix/zerrors_freebsd_386.go | 299 +- .../x/sys/unix/zerrors_freebsd_amd64.go | 299 +- .../x/sys/unix/zerrors_freebsd_arm.go | 299 +- .../x/sys/unix/zerrors_linux_386.go | 835 +- .../x/sys/unix/zerrors_linux_amd64.go | 834 +- .../x/sys/unix/zerrors_linux_arm.go | 836 +- .../x/sys/unix/zerrors_linux_arm64.go | 835 +- .../x/sys/unix/zerrors_linux_mips.go | 838 +- .../x/sys/unix/zerrors_linux_mips64.go | 838 +- .../x/sys/unix/zerrors_linux_mips64le.go | 838 +- .../x/sys/unix/zerrors_linux_mipsle.go | 838 +- .../x/sys/unix/zerrors_linux_ppc64.go | 834 +- .../x/sys/unix/zerrors_linux_ppc64le.go | 834 +- .../x/sys/unix/zerrors_linux_riscv64.go | 2725 + .../x/sys/unix/zerrors_linux_s390x.go | 833 +- .../x/sys/unix/zerrors_linux_sparc64.go | 350 +- .../x/sys/unix/zerrors_netbsd_386.go | 313 +- .../x/sys/unix/zerrors_netbsd_amd64.go | 313 +- .../x/sys/unix/zerrors_netbsd_arm.go | 313 +- .../x/sys/unix/zerrors_openbsd_386.go | 313 +- .../x/sys/unix/zerrors_openbsd_amd64.go | 563 +- .../x/sys/unix/zerrors_openbsd_arm.go | 313 +- .../x/sys/unix/zerrors_solaris_amd64.go | 371 +- .../golang.org/x/sys/unix/zsyscall_aix_ppc.go | 1450 + .../x/sys/unix/zsyscall_aix_ppc64.go | 1408 + .../x/sys/unix/zsyscall_aix_ppc64_gc.go | 1162 + .../x/sys/unix/zsyscall_aix_ppc64_gccgo.go | 1042 + .../x/sys/unix/zsyscall_darwin_386.go | 151 +- .../x/sys/unix/zsyscall_darwin_amd64.go | 151 +- .../x/sys/unix/zsyscall_darwin_arm.go | 151 +- .../x/sys/unix/zsyscall_darwin_arm64.go | 151 +- .../x/sys/unix/zsyscall_dragonfly_amd64.go | 163 +- .../x/sys/unix/zsyscall_freebsd_386.go | 123 +- .../x/sys/unix/zsyscall_freebsd_amd64.go | 123 +- .../x/sys/unix/zsyscall_freebsd_arm.go | 123 +- .../x/sys/unix/zsyscall_linux_386.go | 381 +- .../x/sys/unix/zsyscall_linux_amd64.go | 405 +- .../x/sys/unix/zsyscall_linux_arm.go | 393 +- .../x/sys/unix/zsyscall_linux_arm64.go | 306 +- .../x/sys/unix/zsyscall_linux_mips.go | 439 +- .../x/sys/unix/zsyscall_linux_mips64.go | 357 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 357 +- .../x/sys/unix/zsyscall_linux_mipsle.go | 439 +- .../x/sys/unix/zsyscall_linux_ppc64.go | 394 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 394 +- .../x/sys/unix/zsyscall_linux_riscv64.go | 2191 + .../x/sys/unix/zsyscall_linux_s390x.go | 362 +- .../x/sys/unix/zsyscall_linux_sparc64.go | 697 +- .../x/sys/unix/zsyscall_netbsd_386.go | 444 +- .../x/sys/unix/zsyscall_netbsd_amd64.go | 444 +- .../x/sys/unix/zsyscall_netbsd_arm.go | 444 +- .../x/sys/unix/zsyscall_openbsd_386.go | 252 +- .../x/sys/unix/zsyscall_openbsd_amd64.go | 252 +- .../x/sys/unix/zsyscall_openbsd_arm.go | 252 +- .../x/sys/unix/zsyscall_solaris_amd64.go | 300 + .../x/sys/unix/zsysctl_openbsd_386.go | 2 +- .../x/sys/unix/zsysctl_openbsd_amd64.go | 40 +- .../x/sys/unix/zsysctl_openbsd_arm.go | 2 +- .../x/sys/unix/zsysnum_freebsd_386.go | 736 +- .../x/sys/unix/zsysnum_freebsd_amd64.go | 736 +- .../x/sys/unix/zsysnum_freebsd_arm.go | 736 +- .../x/sys/unix/zsysnum_linux_386.go | 4 +- .../x/sys/unix/zsysnum_linux_amd64.go | 4 +- .../x/sys/unix/zsysnum_linux_arm.go | 4 +- .../x/sys/unix/zsysnum_linux_arm64.go | 4 +- .../x/sys/unix/zsysnum_linux_mips.go | 4 +- .../x/sys/unix/zsysnum_linux_mips64.go | 4 +- .../x/sys/unix/zsysnum_linux_mips64le.go | 4 +- .../x/sys/unix/zsysnum_linux_mipsle.go | 4 +- .../x/sys/unix/zsysnum_linux_ppc64.go | 7 +- .../x/sys/unix/zsysnum_linux_ppc64le.go | 7 +- .../x/sys/unix/zsysnum_linux_riscv64.go | 287 + .../x/sys/unix/zsysnum_linux_s390x.go | 50 +- .../x/sys/unix/zsysnum_linux_sparc64.go | 2 +- .../x/sys/unix/zsysnum_netbsd_386.go | 2 +- .../x/sys/unix/zsysnum_netbsd_amd64.go | 2 +- .../x/sys/unix/zsysnum_netbsd_arm.go | 2 +- .../x/sys/unix/zsysnum_openbsd_386.go | 25 +- .../x/sys/unix/zsysnum_openbsd_amd64.go | 25 +- .../x/sys/unix/zsysnum_openbsd_arm.go | 13 +- .../golang.org/x/sys/unix/ztypes_aix_ppc.go | 345 + .../golang.org/x/sys/unix/ztypes_aix_ppc64.go | 354 + .../x/sys/unix/ztypes_darwin_386.go | 122 +- .../x/sys/unix/ztypes_darwin_amd64.go | 168 +- .../x/sys/unix/ztypes_darwin_arm.go | 122 +- .../x/sys/unix/ztypes_darwin_arm64.go | 168 +- .../x/sys/unix/ztypes_dragonfly_amd64.go | 127 +- .../x/sys/unix/ztypes_freebsd_386.go | 276 +- .../x/sys/unix/ztypes_freebsd_amd64.go | 294 +- .../x/sys/unix/ztypes_freebsd_arm.go | 298 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 1513 +- .../x/sys/unix/ztypes_linux_amd64.go | 1523 +- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 1532 +- .../x/sys/unix/ztypes_linux_arm64.go | 1525 +- .../x/sys/unix/ztypes_linux_mips.go | 1496 +- .../x/sys/unix/ztypes_linux_mips64.go | 1521 +- .../x/sys/unix/ztypes_linux_mips64le.go | 1521 +- .../x/sys/unix/ztypes_linux_mipsle.go | 1496 +- .../x/sys/unix/ztypes_linux_ppc64.go | 1531 +- .../x/sys/unix/ztypes_linux_ppc64le.go | 1531 +- .../x/sys/unix/ztypes_linux_riscv64.go | 2019 + .../x/sys/unix/ztypes_linux_s390x.go | 1431 +- .../x/sys/unix/ztypes_linux_sparc64.go | 218 +- .../x/sys/unix/ztypes_netbsd_386.go | 36 +- .../x/sys/unix/ztypes_netbsd_amd64.go | 36 +- .../x/sys/unix/ztypes_netbsd_arm.go | 36 +- .../x/sys/unix/ztypes_openbsd_386.go | 120 +- .../x/sys/unix/ztypes_openbsd_amd64.go | 211 +- .../x/sys/unix/ztypes_openbsd_arm.go | 204 +- .../x/sys/unix/ztypes_solaris_amd64.go | 201 +- vendor/golang.org/x/sys/windows/LICENSE | 27 - vendor/golang.org/x/sys/windows/aliases.go | 13 + .../x/sys/windows/asm_windows_386.s | 4 +- .../x/sys/windows/asm_windows_amd64.s | 2 +- .../x/sys/windows/asm_windows_arm.s | 11 + vendor/golang.org/x/sys/windows/env_unset.go | 15 - .../golang.org/x/sys/windows/env_windows.go | 4 + .../golang.org/x/sys/windows/registry/key.go | 200 - .../x/sys/windows/registry/mksyscall.go | 7 - .../x/sys/windows/registry/syscall.go | 32 - .../x/sys/windows/registry/value.go | 384 - .../sys/windows/registry/zsyscall_windows.go | 120 - .../x/sys/windows/security_windows.go | 4 +- vendor/golang.org/x/sys/windows/service.go | 19 + .../golang.org/x/sys/windows/svc/debug/log.go | 56 - .../x/sys/windows/svc/debug/service.go | 45 - vendor/golang.org/x/sys/windows/svc/event.go | 48 - .../x/sys/windows/svc/eventlog/install.go | 80 - .../x/sys/windows/svc/eventlog/log.go | 70 - .../x/sys/windows/svc/example/beep.go | 22 - .../x/sys/windows/svc/example/install.go | 92 - .../x/sys/windows/svc/example/main.go | 76 - .../x/sys/windows/svc/example/manage.go | 62 - .../x/sys/windows/svc/example/service.go | 82 - vendor/golang.org/x/sys/windows/svc/go12.c | 24 - vendor/golang.org/x/sys/windows/svc/go12.go | 11 - vendor/golang.org/x/sys/windows/svc/go13.go | 31 - .../x/sys/windows/svc/mgr/config.go | 139 - .../golang.org/x/sys/windows/svc/mgr/mgr.go | 162 - .../x/sys/windows/svc/mgr/service.go | 72 - .../golang.org/x/sys/windows/svc/security.go | 62 - .../golang.org/x/sys/windows/svc/service.go | 363 - vendor/golang.org/x/sys/windows/svc/sys_386.s | 68 - .../golang.org/x/sys/windows/svc/sys_amd64.s | 42 - vendor/golang.org/x/sys/windows/syscall.go | 3 + .../x/sys/windows/syscall_windows.go | 60 +- .../golang.org/x/sys/windows/types_windows.go | 176 +- .../x/sys/windows/types_windows_arm.go | 22 + .../x/sys/windows/zsyscall_windows.go | 15 +- vendor/golang.org/x/text/AUTHORS | 3 + vendor/golang.org/x/text/CONTRIBUTORS | 3 + .../x/{crypto/pbkdf2 => text}/LICENSE | 0 vendor/golang.org/x/text/PATENTS | 22 + vendor/golang.org/x/text/encoding/LICENSE | 27 - .../x/text/encoding/charmap/charmap.go | 249 - .../x/text/encoding/charmap/maketables.go | 556 - .../x/text/encoding/charmap/tables.go | 7410 --- vendor/golang.org/x/text/encoding/encoding.go | 335 - .../x/text/encoding/htmlindex/gen.go | 173 - .../x/text/encoding/htmlindex/htmlindex.go | 86 - .../x/text/encoding/htmlindex/map.go | 105 - .../x/text/encoding/htmlindex/tables.go | 352 - .../x/text/encoding/ianaindex/gen.go | 192 - .../x/text/encoding/ianaindex/ianaindex.go | 209 - .../x/text/encoding/ianaindex/tables.go | 2348 - .../text/encoding/internal/enctest/enctest.go | 180 - .../text/encoding/internal/identifier/gen.go | 137 - .../internal/identifier/identifier.go | 81 - .../text/encoding/internal/identifier/mib.go | 1621 - .../x/text/encoding/internal/internal.go | 75 - .../x/text/encoding/japanese/all.go | 12 - .../x/text/encoding/japanese/eucjp.go | 225 - .../x/text/encoding/japanese/iso2022jp.go | 299 - .../x/text/encoding/japanese/maketables.go | 161 - .../x/text/encoding/japanese/shiftjis.go | 189 - .../x/text/encoding/japanese/tables.go | 26971 -------- .../x/text/encoding/korean/euckr.go | 177 - .../x/text/encoding/korean/maketables.go | 143 - .../x/text/encoding/korean/tables.go | 34152 ---------- .../x/text/encoding/simplifiedchinese/all.go | 12 - .../x/text/encoding/simplifiedchinese/gbk.go | 269 - .../encoding/simplifiedchinese/hzgb2312.go | 245 - .../encoding/simplifiedchinese/maketables.go | 161 - .../text/encoding/simplifiedchinese/tables.go | 43999 ------------- .../text/encoding/traditionalchinese/big5.go | 199 - .../encoding/traditionalchinese/maketables.go | 140 - .../encoding/traditionalchinese/tables.go | 37142 ----------- .../x/text/encoding/unicode/override.go | 82 - .../x/text/encoding/unicode/unicode.go | 434 - .../x/text/encoding/unicode/utf32/utf32.go | 296 - .../golang.org/x/text/internal/format/LICENSE | 27 - .../x/text/internal/format/format.go | 41 - .../x/text/internal/format/parser.go | 357 - vendor/golang.org/x/text/internal/gen/LICENSE | 27 - vendor/golang.org/x/text/internal/gen/code.go | 369 - vendor/golang.org/x/text/internal/gen/gen.go | 333 - vendor/golang.org/x/text/internal/tag/LICENSE | 27 - vendor/golang.org/x/text/internal/tag/tag.go | 100 - .../x/text/internal/triegen/LICENSE | 27 - .../x/text/internal/triegen/compact.go | 58 - .../x/text/internal/triegen/print.go | 251 - .../x/text/internal/triegen/triegen.go | 494 - vendor/golang.org/x/text/internal/ucd/LICENSE | 27 - vendor/golang.org/x/text/internal/ucd/ucd.go | 371 - .../x/text/internal/utf8internal/LICENSE | 27 - .../internal/utf8internal/utf8internal.go | 87 - vendor/golang.org/x/text/language/LICENSE | 27 - vendor/golang.org/x/text/language/common.go | 16 - vendor/golang.org/x/text/language/coverage.go | 197 - .../x/text/language/display/dict.go | 92 - .../x/text/language/display/display.go | 420 - .../x/text/language/display/lookup.go | 251 - .../x/text/language/display/maketables.go | 602 - .../x/text/language/display/tables.go | 53114 ---------------- vendor/golang.org/x/text/language/doc.go | 102 - vendor/golang.org/x/text/language/gen.go | 1712 - .../golang.org/x/text/language/gen_common.go | 20 - .../golang.org/x/text/language/gen_index.go | 162 - vendor/golang.org/x/text/language/go1_1.go | 38 - vendor/golang.org/x/text/language/go1_2.go | 11 - vendor/golang.org/x/text/language/index.go | 783 - vendor/golang.org/x/text/language/language.go | 907 - vendor/golang.org/x/text/language/lookup.go | 396 - vendor/golang.org/x/text/language/match.go | 933 - vendor/golang.org/x/text/language/parse.go | 859 - vendor/golang.org/x/text/language/tables.go | 3686 -- vendor/golang.org/x/text/language/tags.go | 143 - vendor/golang.org/x/text/runes/LICENSE | 27 - vendor/golang.org/x/text/runes/cond.go | 187 - vendor/golang.org/x/text/runes/runes.go | 355 - vendor/golang.org/x/text/transform/LICENSE | 27 - vendor/golang.org/x/text/unicode/cldr/LICENSE | 27 - vendor/golang.org/x/text/unicode/cldr/base.go | 105 - vendor/golang.org/x/text/unicode/cldr/cldr.go | 130 - .../golang.org/x/text/unicode/cldr/collate.go | 359 - .../golang.org/x/text/unicode/cldr/decode.go | 171 - .../golang.org/x/text/unicode/cldr/makexml.go | 400 - .../golang.org/x/text/unicode/cldr/resolve.go | 602 - .../golang.org/x/text/unicode/cldr/slice.go | 144 - vendor/golang.org/x/text/unicode/cldr/xml.go | 1494 - vendor/golang.org/x/text/unicode/norm/LICENSE | 27 - vendor/golang.org/x/time/AUTHORS | 3 + vendor/golang.org/x/time/CONTRIBUTORS | 3 + .../x/{crypto/salsa20 => time}/LICENSE | 0 vendor/golang.org/x/time/PATENTS | 22 + vendor/golang.org/x/time/rate/LICENSE | 27 - vendor/gopkg.in/asn1-ber.v1/.travis.yml | 18 + vendor/gopkg.in/asn1-ber.v1/README.md | 24 + vendor/gopkg.in/ldap.v2/.gitignore | 0 vendor/gopkg.in/ldap.v2/.travis.yml | 31 + vendor/gopkg.in/ldap.v2/Makefile | 52 + vendor/gopkg.in/ldap.v2/README.md | 53 + vendor/gopkg.in/urfave/cli.v1/LICENSE | 21 - .../gopkg.in/urfave/cli.v1/altsrc/altsrc.go | 3 - vendor/gopkg.in/urfave/cli.v1/altsrc/flag.go | 261 - .../urfave/cli.v1/altsrc/flag_generated.go | 347 - .../cli.v1/altsrc/input_source_context.go | 21 - .../urfave/cli.v1/altsrc/map_input_source.go | 262 - .../urfave/cli.v1/altsrc/toml_file_loader.go | 113 - .../urfave/cli.v1/altsrc/yaml_file_loader.go | 92 - vendor/gopkg.in/urfave/cli.v1/app.go | 497 - vendor/gopkg.in/urfave/cli.v1/category.go | 44 - vendor/gopkg.in/urfave/cli.v1/cli.go | 22 - vendor/gopkg.in/urfave/cli.v1/command.go | 304 - vendor/gopkg.in/urfave/cli.v1/context.go | 278 - vendor/gopkg.in/urfave/cli.v1/errors.go | 115 - vendor/gopkg.in/urfave/cli.v1/flag.go | 799 - .../gopkg.in/urfave/cli.v1/flag_generated.go | 627 - vendor/gopkg.in/urfave/cli.v1/funcs.go | 28 - vendor/gopkg.in/urfave/cli.v1/help.go | 338 - vendor/gopkg.in/yaml.v2/LICENSE | 201 - vendor/gopkg.in/yaml.v2/apic.go | 742 - vendor/gopkg.in/yaml.v2/decode.go | 685 - vendor/gopkg.in/yaml.v2/emitterc.go | 1684 - vendor/gopkg.in/yaml.v2/encode.go | 306 - vendor/gopkg.in/yaml.v2/parserc.go | 1095 - vendor/gopkg.in/yaml.v2/readerc.go | 394 - vendor/gopkg.in/yaml.v2/resolve.go | 208 - vendor/gopkg.in/yaml.v2/scannerc.go | 2711 - vendor/gopkg.in/yaml.v2/sorter.go | 104 - vendor/gopkg.in/yaml.v2/writerc.go | 89 - vendor/gopkg.in/yaml.v2/yaml.go | 357 - vendor/gopkg.in/yaml.v2/yamlh.go | 716 - vendor/gopkg.in/yaml.v2/yamlprivateh.go | 173 - vendor/manifest | 799 - vendor/modules.txt | 164 + 1410 files changed, 66232 insertions(+), 688356 deletions(-) create mode 100644 go.mod create mode 100644 go.sum delete mode 100644 vendor/code.cloudfoundry.org/bytefmt/LICENSE delete mode 100644 vendor/code.cloudfoundry.org/bytefmt/bytes.go delete mode 100644 vendor/code.cloudfoundry.org/bytefmt/package.go create mode 100644 vendor/github.com/AudriusButkevicius/cli/.travis.yml create mode 100644 vendor/github.com/AudriusButkevicius/cli/README.md create mode 100644 vendor/github.com/AudriusButkevicius/go-nat-pmp/README.md delete mode 100644 vendor/github.com/AudriusButkevicius/pfilter/LICENSE delete mode 100644 vendor/github.com/AudriusButkevicius/pfilter/conn.go delete mode 100644 vendor/github.com/AudriusButkevicius/pfilter/filter.go delete mode 100644 vendor/github.com/AudriusButkevicius/pfilter/misc.go delete mode 100644 vendor/github.com/BurntSushi/toml/COPYING delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go delete mode 100644 vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go delete mode 100644 vendor/github.com/BurntSushi/toml/decode.go delete mode 100644 vendor/github.com/BurntSushi/toml/decode_meta.go delete mode 100644 vendor/github.com/BurntSushi/toml/doc.go delete mode 100644 vendor/github.com/BurntSushi/toml/encode.go delete mode 100644 vendor/github.com/BurntSushi/toml/encoding_types.go delete mode 100644 vendor/github.com/BurntSushi/toml/encoding_types_1.1.go delete mode 100644 vendor/github.com/BurntSushi/toml/lex.go delete mode 100644 vendor/github.com/BurntSushi/toml/parse.go delete mode 100644 vendor/github.com/BurntSushi/toml/type_check.go delete mode 100644 vendor/github.com/BurntSushi/toml/type_fields.go delete mode 100644 vendor/github.com/a8m/mark/LICENSE delete mode 100644 vendor/github.com/a8m/mark/cmd/mark/main.go delete mode 100644 vendor/github.com/a8m/mark/grammar.go delete mode 100644 vendor/github.com/a8m/mark/lexer.go delete mode 100644 vendor/github.com/a8m/mark/mark.go delete mode 100644 vendor/github.com/a8m/mark/node.go delete mode 100644 vendor/github.com/a8m/mark/parser.go rename vendor/github.com/beorn7/perks/{quantile => }/LICENSE (100%) create mode 100644 vendor/github.com/beorn7/perks/quantile/exampledata.txt create mode 100644 vendor/github.com/bkaradzic/go-lz4/.gitignore create mode 100644 vendor/github.com/bkaradzic/go-lz4/.travis.yml create mode 100644 vendor/github.com/bkaradzic/go-lz4/README.md delete mode 100644 vendor/github.com/bkaradzic/go-lz4/fuzzer/main.go delete mode 100644 vendor/github.com/bkaradzic/go-lz4/lz4-example/main.go create mode 100644 vendor/github.com/calmh/du/README.md delete mode 100644 vendor/github.com/calmh/du/cmd/du/main.go create mode 100644 vendor/github.com/calmh/xdr/.gitignore create mode 100644 vendor/github.com/calmh/xdr/.travis.yml create mode 100644 vendor/github.com/calmh/xdr/README.md create mode 100644 vendor/github.com/calmh/xdr/circle.yml delete mode 100644 vendor/github.com/calmh/xdr/cmd/genxdr/main.go create mode 100644 vendor/github.com/calmh/xdr/generate.sh delete mode 100644 vendor/github.com/cheggaaa/pb/LICENSE delete mode 100644 vendor/github.com/cheggaaa/pb/format.go delete mode 100644 vendor/github.com/cheggaaa/pb/pb.go delete mode 100644 vendor/github.com/cheggaaa/pb/pb_appengine.go delete mode 100644 vendor/github.com/cheggaaa/pb/pb_win.go delete mode 100644 vendor/github.com/cheggaaa/pb/pb_x.go delete mode 100644 vendor/github.com/cheggaaa/pb/pool.go delete mode 100644 vendor/github.com/cheggaaa/pb/pool_win.go delete mode 100644 vendor/github.com/cheggaaa/pb/pool_x.go delete mode 100644 vendor/github.com/cheggaaa/pb/reader.go delete mode 100644 vendor/github.com/cheggaaa/pb/runecount.go delete mode 100644 vendor/github.com/cheggaaa/pb/termios_bsd.go delete mode 100644 vendor/github.com/cheggaaa/pb/termios_sysv.go create mode 100644 vendor/github.com/chmduquesne/rollinghash/.travis.yml create mode 100644 vendor/github.com/chmduquesne/rollinghash/README.md delete mode 100644 vendor/github.com/chmduquesne/rollinghash/roll/main.go create mode 100644 vendor/github.com/d4l3k/messagediff/.coveralls.yml create mode 100644 vendor/github.com/d4l3k/messagediff/.gitignore create mode 100644 vendor/github.com/d4l3k/messagediff/.travis.yml create mode 100644 vendor/github.com/d4l3k/messagediff/CHANGELOG.md create mode 100644 vendor/github.com/d4l3k/messagediff/README.md delete mode 100644 vendor/github.com/d4l3k/messagediff/example/example.go delete mode 100644 vendor/github.com/dustin/go-humanize/LICENSE delete mode 100644 vendor/github.com/dustin/go-humanize/big.go delete mode 100644 vendor/github.com/dustin/go-humanize/bigbytes.go delete mode 100644 vendor/github.com/dustin/go-humanize/bytes.go delete mode 100644 vendor/github.com/dustin/go-humanize/comma.go delete mode 100644 vendor/github.com/dustin/go-humanize/commaf.go delete mode 100644 vendor/github.com/dustin/go-humanize/english/words.go delete mode 100644 vendor/github.com/dustin/go-humanize/ftoa.go delete mode 100644 vendor/github.com/dustin/go-humanize/humanize.go delete mode 100644 vendor/github.com/dustin/go-humanize/number.go delete mode 100644 vendor/github.com/dustin/go-humanize/ordinals.go delete mode 100644 vendor/github.com/dustin/go-humanize/si.go delete mode 100644 vendor/github.com/dustin/go-humanize/times.go delete mode 100644 vendor/github.com/gernest/wow/LICENSE delete mode 100644 vendor/github.com/gernest/wow/example/all/main.go delete mode 100644 vendor/github.com/gernest/wow/example/doge/main.go delete mode 100644 vendor/github.com/gernest/wow/magefile.go delete mode 100644 vendor/github.com/gernest/wow/spin/spinners.go delete mode 100644 vendor/github.com/gernest/wow/symbols.go delete mode 100644 vendor/github.com/gernest/wow/wow.go delete mode 100644 vendor/github.com/go-ini/ini/LICENSE delete mode 100644 vendor/github.com/go-ini/ini/error.go delete mode 100644 vendor/github.com/go-ini/ini/file.go delete mode 100644 vendor/github.com/go-ini/ini/ini.go delete mode 100644 vendor/github.com/go-ini/ini/key.go delete mode 100644 vendor/github.com/go-ini/ini/parser.go delete mode 100644 vendor/github.com/go-ini/ini/section.go delete mode 100644 vendor/github.com/go-ini/ini/struct.go create mode 100644 vendor/github.com/gobwas/glob/.gitignore create mode 100644 vendor/github.com/gobwas/glob/.travis.yml create mode 100644 vendor/github.com/gobwas/glob/bench.sh delete mode 100644 vendor/github.com/gobwas/glob/cmd/globdraw/main.go delete mode 100644 vendor/github.com/gobwas/glob/cmd/globtest/main.go delete mode 100644 vendor/github.com/gobwas/glob/match/debug/debug.go create mode 100644 vendor/github.com/gobwas/glob/readme.md delete mode 100644 vendor/github.com/gogo/protobuf/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/.mailmap delete mode 100644 vendor/github.com/gogo/protobuf/.travis.yml delete mode 100644 vendor/github.com/gogo/protobuf/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/README delete mode 100644 vendor/github.com/gogo/protobuf/Readme.md delete mode 100644 vendor/github.com/gogo/protobuf/_conformance/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/_conformance/conformance.go delete mode 100644 vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.proto delete mode 100644 vendor/github.com/gogo/protobuf/bench.md delete mode 100644 vendor/github.com/gogo/protobuf/codec/codec.go delete mode 100644 vendor/github.com/gogo/protobuf/codec/codec_test.go delete mode 100644 vendor/github.com/gogo/protobuf/custom_types.md delete mode 100644 vendor/github.com/gogo/protobuf/extensions.md delete mode 100644 vendor/github.com/gogo/protobuf/gogoreplace/main.go delete mode 100644 vendor/github.com/gogo/protobuf/install-protobuf.sh delete mode 100644 vendor/github.com/gogo/protobuf/io/io_test.go delete mode 100644 vendor/github.com/gogo/protobuf/io/uint32_test.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/all_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/any_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/clone_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/decode_test.go create mode 100644 vendor/github.com/gogo/protobuf/proto/discard.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/encode_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/equal_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/extensions_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/map_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/message_set_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/size2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/size_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text_parser_test.go delete mode 100644 vendor/github.com/gogo/protobuf/proto/text_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto delete mode 100644 vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go delete mode 100644 vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go delete mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go delete mode 100644 vendor/github.com/gogo/protobuf/test/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go delete mode 100644 vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custom/custom_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/dashfilename/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/data/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/data/data.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/data/data.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/data/datapb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/em.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/en.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/embedconflict/er.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl/models.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumprefix/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/enumstringer/string.go delete mode 100644 vendor/github.com/gogo/protobuf/test/example/example_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/example/examplepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/extension_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/group/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/group/group.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/group/group.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/group/grouppb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importdedup/proto.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/int64support/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/int64support/object.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/int64support/object.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/int64support/object_js.go delete mode 100644 vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue260/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue260/README.md delete mode 100644 vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue260/issue260.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue260/models.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue261/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue261/issue261.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue262/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue262/timefail.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue270/b/b.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue270/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue312/events/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue312/events/events.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue322/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue322/issue322.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue330/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue330/issue330.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue330/type.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue34/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue34/proto.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue42order/order_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue8/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/issue8/proto.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/map.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt delete mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/md.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneof3/one.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/packed/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/packed/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/packed/packed.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/packed/packed.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/packed/packed_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/proto3extension/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/protosize/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosize.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/registration/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/test/registration/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/registration/registration.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in delete mode 100644 vendor/github.com/gogo/protobuf/test/required/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/required/requiredexample.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/sizerconflict/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/stdtypes/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/tags/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/tags/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/tags/tags.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/tags/tags.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/tags/tags_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/footer.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/header.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/maps.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in delete mode 100644 vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/thetestpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl/models.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl_all/models.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/typedeclimport/models.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/types/types.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/types/types_test.go.in delete mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto delete mode 100644 vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go delete mode 100644 vendor/github.com/gogo/protobuf/test/uuid_test.go delete mode 100644 vendor/github.com/gogo/protobuf/types/any_test.go delete mode 100644 vendor/github.com/gogo/protobuf/types/duration_test.go delete mode 100644 vendor/github.com/gogo/protobuf/types/timestamp_test.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/Makefile delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/proto3.proto delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/vanity.proto delete mode 100644 vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go rename vendor/github.com/golang/groupcache/{lru => }/LICENSE (100%) create mode 100644 vendor/github.com/golang/protobuf/AUTHORS rename vendor/github.com/{gogo/protobuf/GOLANG_CONTRIBUTORS => golang/protobuf/CONTRIBUTORS} (55%) rename vendor/github.com/golang/protobuf/{proto => }/LICENSE (100%) rename vendor/github.com/{gogo/protobuf/protoc-gen-gogo => golang/protobuf/proto}/Makefile (84%) delete mode 100644 vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/LICENSE delete mode 100644 vendor/github.com/golang/protobuf/ptypes/any/any.pb.go create mode 100644 vendor/github.com/golang/snappy/.gitignore create mode 100644 vendor/github.com/golang/snappy/AUTHORS create mode 100644 vendor/github.com/golang/snappy/CONTRIBUTORS create mode 100644 vendor/github.com/golang/snappy/README delete mode 100644 vendor/github.com/golang/snappy/cmd/snappytool/main.cpp create mode 100644 vendor/github.com/jackpal/gateway/.travis.yml create mode 100644 vendor/github.com/jackpal/gateway/README.md create mode 100644 vendor/github.com/kballard/go-shellquote/README delete mode 100644 vendor/github.com/klauspost/cpuid/LICENSE delete mode 100644 vendor/github.com/klauspost/cpuid/cpuid.go delete mode 100644 vendor/github.com/klauspost/cpuid/cpuid_386.s delete mode 100644 vendor/github.com/klauspost/cpuid/cpuid_amd64.s delete mode 100644 vendor/github.com/klauspost/cpuid/detect_intel.go delete mode 100644 vendor/github.com/klauspost/cpuid/detect_ref.go delete mode 100644 vendor/github.com/klauspost/cpuid/generate.go delete mode 100644 vendor/github.com/klauspost/cpuid/private-gen.go delete mode 100644 vendor/github.com/klauspost/cpuid/private/cpuid.go delete mode 100644 vendor/github.com/klauspost/cpuid/private/cpuid_386.s delete mode 100644 vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s delete mode 100644 vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go delete mode 100644 vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go create mode 100644 vendor/github.com/lib/pq/.gitignore create mode 100644 vendor/github.com/lib/pq/.travis.sh create mode 100644 vendor/github.com/lib/pq/.travis.yml create mode 100644 vendor/github.com/lib/pq/CONTRIBUTING.md create mode 100644 vendor/github.com/lib/pq/README.md create mode 100644 vendor/github.com/lib/pq/TESTS.md delete mode 100644 vendor/github.com/lib/pq/example/listen/doc.go create mode 100644 vendor/github.com/lib/pq/go.mod delete mode 100644 vendor/github.com/lib/pq/hstore/hstore.go delete mode 100644 vendor/github.com/magefile/mage/mg/deps.go delete mode 100644 vendor/github.com/magefile/mage/mg/errors.go delete mode 100644 vendor/github.com/magefile/mage/mg/runtime.go delete mode 100644 vendor/github.com/magefile/mage/sh/LICENSE delete mode 100644 vendor/github.com/magefile/mage/sh/cmd.go delete mode 100644 vendor/github.com/magefile/mage/sh/helpers.go delete mode 100644 vendor/github.com/magefile/mage/types/LICENSE delete mode 100644 vendor/github.com/magefile/mage/types/funcs.go delete mode 100644 vendor/github.com/mattn/go-runewidth/LICENSE delete mode 100644 vendor/github.com/mattn/go-runewidth/runewidth.go delete mode 100644 vendor/github.com/mattn/go-runewidth/runewidth_js.go delete mode 100644 vendor/github.com/mattn/go-runewidth/runewidth_posix.go delete mode 100644 vendor/github.com/mattn/go-runewidth/runewidth_windows.go rename vendor/github.com/{magefile/mage/mg => matttproud/golang_protobuf_extensions}/LICENSE (100%) create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore delete mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/LICENSE create mode 100644 vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile delete mode 100644 vendor/github.com/minio/cli/LICENSE delete mode 100644 vendor/github.com/minio/cli/altsrc/altsrc.go delete mode 100644 vendor/github.com/minio/cli/altsrc/flag.go delete mode 100644 vendor/github.com/minio/cli/altsrc/flag_generated.go delete mode 100644 vendor/github.com/minio/cli/altsrc/input_source_context.go delete mode 100644 vendor/github.com/minio/cli/altsrc/map_input_source.go delete mode 100644 vendor/github.com/minio/cli/altsrc/toml_file_loader.go delete mode 100644 vendor/github.com/minio/cli/altsrc/yaml_file_loader.go delete mode 100644 vendor/github.com/minio/cli/app.go delete mode 100644 vendor/github.com/minio/cli/category.go delete mode 100644 vendor/github.com/minio/cli/cli.go delete mode 100644 vendor/github.com/minio/cli/command.go delete mode 100644 vendor/github.com/minio/cli/context.go delete mode 100644 vendor/github.com/minio/cli/errors.go delete mode 100644 vendor/github.com/minio/cli/flag.go delete mode 100644 vendor/github.com/minio/cli/flag_generated.go delete mode 100644 vendor/github.com/minio/cli/funcs.go delete mode 100644 vendor/github.com/minio/cli/help.go create mode 100644 vendor/github.com/minio/sha256-simd/.travis.yml create mode 100644 vendor/github.com/minio/sha256-simd/README.md create mode 100644 vendor/github.com/minio/sha256-simd/appveyor.yml create mode 100644 vendor/github.com/minio/sha256-simd/sha256blockAvx512_amd64.asm delete mode 100644 vendor/github.com/mitchellh/go-homedir/LICENSE delete mode 100644 vendor/github.com/mitchellh/go-homedir/homedir.go delete mode 100644 vendor/github.com/onsi/ginkgo/LICENSE delete mode 100644 vendor/github.com/onsi/ginkgo/config/config.go delete mode 100644 vendor/github.com/onsi/ginkgo/extensions/table/table.go delete mode 100644 vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/bootstrap_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/build_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert/ginkgo_ast_nodes.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert/import.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert/package_rewriter.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert/test_finder.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert/testfile_rewriter.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert/testing_t_rewriter.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/convert_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/generate_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/help_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/interrupt_handler.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/main.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/nodot_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/notifications.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/run_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/suite_runner.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testrunner/log_writer.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go15.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go16.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/unfocus_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/version_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch/delta.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch/delta_tracker.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hash.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hashes.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch/suite.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo/watch_command.go delete mode 100644 vendor/github.com/onsi/ginkgo/ginkgo_dsl.go delete mode 100644 vendor/github.com/onsi/ginkgo/integration/integration.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/failer/failer.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/server.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/spec.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec/specs.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/suite/suite.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go delete mode 100644 vendor/github.com/onsi/ginkgo/internal/writer/writer.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/default_reporter.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/reporter.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_windows.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go delete mode 100644 vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go delete mode 100644 vendor/github.com/onsi/ginkgo/types/code_location.go delete mode 100644 vendor/github.com/onsi/ginkgo/types/synchronization.go delete mode 100644 vendor/github.com/onsi/ginkgo/types/types.go delete mode 100644 vendor/github.com/onsi/gomega/LICENSE delete mode 100644 vendor/github.com/onsi/gomega/format/format.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/buffer.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/io_wrappers.go delete mode 100644 vendor/github.com/onsi/gomega/gbytes/say_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/build.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/exit_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/prefixed_writer.go delete mode 100644 vendor/github.com/onsi/gomega/gexec/session.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/handlers.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/protobuf/protobuf.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/protobuf/simple_message.pb.go delete mode 100644 vendor/github.com/onsi/gomega/ghttp/test_server.go delete mode 100644 vendor/github.com/onsi/gomega/gomega_dsl.go delete mode 100644 vendor/github.com/onsi/gomega/gstruct/elements.go delete mode 100644 vendor/github.com/onsi/gomega/gstruct/errors/nested_types.go delete mode 100644 vendor/github.com/onsi/gomega/gstruct/fields.go delete mode 100644 vendor/github.com/onsi/gomega/gstruct/ignore.go delete mode 100644 vendor/github.com/onsi/gomega/gstruct/pointer.go delete mode 100644 vendor/github.com/onsi/gomega/gstruct/types.go delete mode 100644 vendor/github.com/onsi/gomega/internal/assertion/assertion.go delete mode 100644 vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go delete mode 100644 vendor/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/internal/oraclematcher/oracle_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go delete mode 100644 vendor/github.com/onsi/gomega/matchers.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/and.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/attributes_slice.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_directory.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_false_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_identical_to.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_true_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/consist_of.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/equal_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_key_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_len_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_error_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_json_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/not.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/or.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/panic_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/receive_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/succeed_matcher.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/type_support.go delete mode 100644 vendor/github.com/onsi/gomega/matchers/with_transform.go delete mode 100644 vendor/github.com/onsi/gomega/types/types.go create mode 100644 vendor/github.com/oschwald/geoip2-golang/.gitignore create mode 100644 vendor/github.com/oschwald/geoip2-golang/.gitmodules create mode 100644 vendor/github.com/oschwald/geoip2-golang/.travis.yml create mode 100644 vendor/github.com/oschwald/geoip2-golang/README.md create mode 100644 vendor/github.com/oschwald/maxminddb-golang/.gitignore create mode 100644 vendor/github.com/oschwald/maxminddb-golang/.gitmodules create mode 100644 vendor/github.com/oschwald/maxminddb-golang/.travis.yml create mode 100644 vendor/github.com/oschwald/maxminddb-golang/README.md create mode 100644 vendor/github.com/oschwald/maxminddb-golang/appveyor.yml create mode 100644 vendor/github.com/petermattis/goid/.gitignore create mode 100644 vendor/github.com/petermattis/goid/.travis.yml create mode 100644 vendor/github.com/petermattis/goid/README.md create mode 100644 vendor/github.com/pkg/errors/.gitignore create mode 100644 vendor/github.com/pkg/errors/.travis.yml create mode 100644 vendor/github.com/pkg/errors/README.md create mode 100644 vendor/github.com/pkg/errors/appveyor.yml rename vendor/github.com/prometheus/client_golang/{prometheus => }/LICENSE (100%) create mode 100644 vendor/github.com/prometheus/client_golang/NOTICE create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/.gitignore create mode 100644 vendor/github.com/prometheus/client_golang/prometheus/README.md delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/promauto/auto.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/push/push.go delete mode 100644 vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go rename vendor/github.com/prometheus/client_model/{go => }/LICENSE (100%) create mode 100644 vendor/github.com/prometheus/client_model/NOTICE rename vendor/github.com/prometheus/common/{expfmt => }/LICENSE (100%) create mode 100644 vendor/github.com/prometheus/common/NOTICE delete mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/LICENSE create mode 100644 vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt delete mode 100644 vendor/github.com/prometheus/common/model/LICENSE create mode 100644 vendor/github.com/prometheus/procfs/.travis.yml create mode 100644 vendor/github.com/prometheus/procfs/CONTRIBUTING.md create mode 100644 vendor/github.com/prometheus/procfs/MAINTAINERS.md create mode 100644 vendor/github.com/prometheus/procfs/Makefile create mode 100644 vendor/github.com/prometheus/procfs/NOTICE create mode 100644 vendor/github.com/prometheus/procfs/README.md delete mode 100644 vendor/github.com/prometheus/procfs/bcache/bcache.go delete mode 100644 vendor/github.com/prometheus/procfs/bcache/get.go delete mode 100644 vendor/github.com/prometheus/procfs/sysfs/doc.go delete mode 100644 vendor/github.com/prometheus/procfs/sysfs/fs.go create mode 100644 vendor/github.com/prometheus/procfs/ttar create mode 100644 vendor/github.com/rcrowley/go-metrics/.gitignore create mode 100644 vendor/github.com/rcrowley/go-metrics/.travis.yml create mode 100644 vendor/github.com/rcrowley/go-metrics/README.md delete mode 100644 vendor/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go delete mode 100644 vendor/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go delete mode 100644 vendor/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go delete mode 100644 vendor/github.com/rcrowley/go-metrics/exp/exp.go delete mode 100644 vendor/github.com/rcrowley/go-metrics/librato/client.go delete mode 100644 vendor/github.com/rcrowley/go-metrics/librato/librato.go create mode 100644 vendor/github.com/rcrowley/go-metrics/memory.md delete mode 100644 vendor/github.com/rcrowley/go-metrics/stathat/stathat.go create mode 100644 vendor/github.com/rcrowley/go-metrics/validate.sh create mode 100644 vendor/github.com/sasha-s/go-deadlock/.travis.yml create mode 100644 vendor/github.com/sasha-s/go-deadlock/Readme.md delete mode 100644 vendor/github.com/sirupsen/logrus/LICENSE delete mode 100644 vendor/github.com/sirupsen/logrus/alt_exit.go delete mode 100644 vendor/github.com/sirupsen/logrus/doc.go delete mode 100644 vendor/github.com/sirupsen/logrus/entry.go delete mode 100644 vendor/github.com/sirupsen/logrus/exported.go delete mode 100644 vendor/github.com/sirupsen/logrus/formatter.go delete mode 100644 vendor/github.com/sirupsen/logrus/hooks.go delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go delete mode 100644 vendor/github.com/sirupsen/logrus/hooks/test/test.go delete mode 100644 vendor/github.com/sirupsen/logrus/json_formatter.go delete mode 100644 vendor/github.com/sirupsen/logrus/logger.go delete mode 100644 vendor/github.com/sirupsen/logrus/logrus.go delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_bsd.go delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_appengine.go delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go delete mode 100644 vendor/github.com/sirupsen/logrus/terminal_linux.go delete mode 100644 vendor/github.com/sirupsen/logrus/text_formatter.go delete mode 100644 vendor/github.com/sirupsen/logrus/writer.go delete mode 100644 vendor/github.com/stathat/go/LICENSE delete mode 100644 vendor/github.com/stathat/go/stathat.go create mode 100644 vendor/github.com/syncthing/notify/.gitignore create mode 100644 vendor/github.com/syncthing/notify/.travis.yml create mode 100644 vendor/github.com/syncthing/notify/AUTHORS create mode 100644 vendor/github.com/syncthing/notify/README.md create mode 100644 vendor/github.com/syncthing/notify/appveyor.yml create mode 100644 vendor/github.com/syncthing/notify/go.mod rename vendor/github.com/syndtr/goleveldb/{leveldb => }/LICENSE (100%) delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/db.go delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/ginkgo.go delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/iter.go delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/kv.go delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/kvtest.go delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/storage.go delete mode 100644 vendor/github.com/syndtr/goleveldb/leveldb/testutil/util.go delete mode 100644 vendor/github.com/templexxx/cpufeat/LICENSE delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_arm.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_arm64.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_mips.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_mips64.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_mips64le.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_mipsle.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_ppc64.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_ppc64le.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_s390x.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_x86.go delete mode 100644 vendor/github.com/templexxx/cpufeat/cpu_x86.s create mode 100644 vendor/github.com/thejerf/suture/.travis.yml create mode 100644 vendor/github.com/thejerf/suture/README.md create mode 100644 vendor/github.com/thejerf/suture/gml create mode 100644 vendor/github.com/thejerf/suture/pre-commit delete mode 100644 vendor/github.com/tjfoc/gmsm/sm4/LICENSE delete mode 100644 vendor/github.com/tjfoc/gmsm/sm4/sm4.go rename vendor/github.com/vitrun/qart/{coding => }/LICENSE (100%) rename vendor/{golang.org/x/crypto/twofish/LICENSE => github.com/vitrun/qart/LICENSE.bsd} (96%) delete mode 100644 vendor/github.com/vitrun/qart/gf256/LICENSE delete mode 100644 vendor/github.com/vitrun/qart/qr/LICENSE create mode 100644 vendor/golang.org/x/crypto/AUTHORS create mode 100644 vendor/golang.org/x/crypto/CONTRIBUTORS rename vendor/golang.org/x/crypto/{bcrypt => }/LICENSE (100%) create mode 100644 vendor/golang.org/x/crypto/PATENTS delete mode 100644 vendor/golang.org/x/crypto/cast5/cast5.go delete mode 100644 vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go delete mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go delete mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s delete mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go delete mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go delete mode 100644 vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go delete mode 100644 vendor/golang.org/x/crypto/salsa20/salsa20.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/LICENSE delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/terminal.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_linux.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go delete mode 100644 vendor/golang.org/x/crypto/ssh/terminal/util_windows.go delete mode 100644 vendor/golang.org/x/crypto/tea/LICENSE delete mode 100644 vendor/golang.org/x/crypto/tea/cipher.go delete mode 100644 vendor/golang.org/x/crypto/twofish/twofish.go delete mode 100644 vendor/golang.org/x/crypto/xtea/LICENSE delete mode 100644 vendor/golang.org/x/crypto/xtea/block.go delete mode 100644 vendor/golang.org/x/crypto/xtea/cipher.go create mode 100644 vendor/golang.org/x/net/AUTHORS create mode 100644 vendor/golang.org/x/net/CONTRIBUTORS rename vendor/golang.org/x/{crypto/blowfish => net}/LICENSE (100%) create mode 100644 vendor/golang.org/x/net/PATENTS delete mode 100644 vendor/golang.org/x/net/bpf/LICENSE create mode 100644 vendor/golang.org/x/net/context/context.go create mode 100644 vendor/golang.org/x/net/context/go17.go create mode 100644 vendor/golang.org/x/net/context/go19.go create mode 100644 vendor/golang.org/x/net/context/pre_go17.go create mode 100644 vendor/golang.org/x/net/context/pre_go19.go delete mode 100644 vendor/golang.org/x/net/html/LICENSE delete mode 100644 vendor/golang.org/x/net/html/atom/atom.go delete mode 100644 vendor/golang.org/x/net/html/atom/gen.go delete mode 100644 vendor/golang.org/x/net/html/atom/table.go delete mode 100644 vendor/golang.org/x/net/html/charset/charset.go delete mode 100644 vendor/golang.org/x/net/html/const.go delete mode 100644 vendor/golang.org/x/net/html/doc.go delete mode 100644 vendor/golang.org/x/net/html/doctype.go delete mode 100644 vendor/golang.org/x/net/html/entity.go delete mode 100644 vendor/golang.org/x/net/html/escape.go delete mode 100644 vendor/golang.org/x/net/html/foreign.go delete mode 100644 vendor/golang.org/x/net/html/node.go delete mode 100644 vendor/golang.org/x/net/html/parse.go delete mode 100644 vendor/golang.org/x/net/html/render.go delete mode 100644 vendor/golang.org/x/net/html/token.go delete mode 100644 vendor/golang.org/x/net/internal/iana/LICENSE delete mode 100644 vendor/golang.org/x/net/internal/socket/LICENSE delete mode 100644 vendor/golang.org/x/net/ipv4/LICENSE delete mode 100644 vendor/golang.org/x/net/ipv6/LICENSE delete mode 100644 vendor/golang.org/x/net/proxy/LICENSE create mode 100644 vendor/golang.org/x/sys/AUTHORS create mode 100644 vendor/golang.org/x/sys/CONTRIBUTORS rename vendor/golang.org/x/{crypto/cast5 => sys}/LICENSE (100%) create mode 100644 vendor/golang.org/x/sys/PATENTS create mode 100644 vendor/golang.org/x/sys/unix/.gitignore delete mode 100644 vendor/golang.org/x/sys/unix/LICENSE create mode 100644 vendor/golang.org/x/sys/unix/README.md create mode 100644 vendor/golang.org/x/sys/unix/affinity_linux.go create mode 100644 vendor/golang.org/x/sys/unix/aliases.go create mode 100644 vendor/golang.org/x/sys/unix/asm_aix_ppc64.s create mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/dev_aix_ppc64.go delete mode 100644 vendor/golang.org/x/sys/unix/env_unset.go rename vendor/golang.org/x/sys/unix/{flock.go => fcntl.go} (70%) rename vendor/golang.org/x/sys/unix/{flock_linux_32bit.go => fcntl_linux_32bit.go} (100%) create mode 100644 vendor/golang.org/x/sys/unix/ioctl.go delete mode 100644 vendor/golang.org/x/sys/unix/linux/mkall.go delete mode 100644 vendor/golang.org/x/sys/unix/linux/types.go create mode 100644 vendor/golang.org/x/sys/unix/mkall.sh create mode 100644 vendor/golang.org/x/sys/unix/mkerrors.sh create mode 100644 vendor/golang.org/x/sys/unix/mksyscall.go create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc.pl create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_aix_ppc64.pl create mode 100644 vendor/golang.org/x/sys/unix/mksyscall_solaris.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysctl_openbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_darwin.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/mksysnum_openbsd.pl create mode 100644 vendor/golang.org/x/sys/unix/openbsd_unveil.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_aix.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_aix_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go create mode 100644 vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go create mode 100644 vendor/golang.org/x/sys/unix/types_aix.go create mode 100644 vendor/golang.org/x/sys/unix/xattr_bsd.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_aix_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gc.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64_gccgo.go create mode 100644 vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go create mode 100644 vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_aix_ppc64.go create mode 100644 vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go delete mode 100644 vendor/golang.org/x/sys/windows/LICENSE create mode 100644 vendor/golang.org/x/sys/windows/aliases.go create mode 100644 vendor/golang.org/x/sys/windows/asm_windows_arm.s delete mode 100644 vendor/golang.org/x/sys/windows/env_unset.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/key.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/mksyscall.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/syscall.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/value.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/debug/log.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/debug/service.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/event.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/eventlog/install.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/eventlog/log.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/example/beep.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/example/install.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/example/main.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/example/manage.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/example/service.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/go12.c delete mode 100644 vendor/golang.org/x/sys/windows/svc/go12.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/go13.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/config.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/mgr.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/mgr/service.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/security.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/service.go delete mode 100644 vendor/golang.org/x/sys/windows/svc/sys_386.s delete mode 100644 vendor/golang.org/x/sys/windows/svc/sys_amd64.s create mode 100644 vendor/golang.org/x/sys/windows/types_windows_arm.go create mode 100644 vendor/golang.org/x/text/AUTHORS create mode 100644 vendor/golang.org/x/text/CONTRIBUTORS rename vendor/golang.org/x/{crypto/pbkdf2 => text}/LICENSE (100%) create mode 100644 vendor/golang.org/x/text/PATENTS delete mode 100644 vendor/golang.org/x/text/encoding/LICENSE delete mode 100644 vendor/golang.org/x/text/encoding/charmap/charmap.go delete mode 100644 vendor/golang.org/x/text/encoding/charmap/maketables.go delete mode 100644 vendor/golang.org/x/text/encoding/charmap/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/encoding.go delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/gen.go delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/htmlindex.go delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/map.go delete mode 100644 vendor/golang.org/x/text/encoding/htmlindex/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/ianaindex/gen.go delete mode 100644 vendor/golang.org/x/text/encoding/ianaindex/ianaindex.go delete mode 100644 vendor/golang.org/x/text/encoding/ianaindex/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/internal/enctest/enctest.go delete mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/gen.go delete mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/identifier.go delete mode 100644 vendor/golang.org/x/text/encoding/internal/identifier/mib.go delete mode 100644 vendor/golang.org/x/text/encoding/internal/internal.go delete mode 100644 vendor/golang.org/x/text/encoding/japanese/all.go delete mode 100644 vendor/golang.org/x/text/encoding/japanese/eucjp.go delete mode 100644 vendor/golang.org/x/text/encoding/japanese/iso2022jp.go delete mode 100644 vendor/golang.org/x/text/encoding/japanese/maketables.go delete mode 100644 vendor/golang.org/x/text/encoding/japanese/shiftjis.go delete mode 100644 vendor/golang.org/x/text/encoding/japanese/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/korean/euckr.go delete mode 100644 vendor/golang.org/x/text/encoding/korean/maketables.go delete mode 100644 vendor/golang.org/x/text/encoding/korean/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/all.go delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/gbk.go delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/hzgb2312.go delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/maketables.go delete mode 100644 vendor/golang.org/x/text/encoding/simplifiedchinese/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/big5.go delete mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/maketables.go delete mode 100644 vendor/golang.org/x/text/encoding/traditionalchinese/tables.go delete mode 100644 vendor/golang.org/x/text/encoding/unicode/override.go delete mode 100644 vendor/golang.org/x/text/encoding/unicode/unicode.go delete mode 100644 vendor/golang.org/x/text/encoding/unicode/utf32/utf32.go delete mode 100644 vendor/golang.org/x/text/internal/format/LICENSE delete mode 100644 vendor/golang.org/x/text/internal/format/format.go delete mode 100644 vendor/golang.org/x/text/internal/format/parser.go delete mode 100644 vendor/golang.org/x/text/internal/gen/LICENSE delete mode 100644 vendor/golang.org/x/text/internal/gen/code.go delete mode 100644 vendor/golang.org/x/text/internal/gen/gen.go delete mode 100644 vendor/golang.org/x/text/internal/tag/LICENSE delete mode 100644 vendor/golang.org/x/text/internal/tag/tag.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/LICENSE delete mode 100644 vendor/golang.org/x/text/internal/triegen/compact.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/print.go delete mode 100644 vendor/golang.org/x/text/internal/triegen/triegen.go delete mode 100644 vendor/golang.org/x/text/internal/ucd/LICENSE delete mode 100644 vendor/golang.org/x/text/internal/ucd/ucd.go delete mode 100644 vendor/golang.org/x/text/internal/utf8internal/LICENSE delete mode 100644 vendor/golang.org/x/text/internal/utf8internal/utf8internal.go delete mode 100644 vendor/golang.org/x/text/language/LICENSE delete mode 100644 vendor/golang.org/x/text/language/common.go delete mode 100644 vendor/golang.org/x/text/language/coverage.go delete mode 100644 vendor/golang.org/x/text/language/display/dict.go delete mode 100644 vendor/golang.org/x/text/language/display/display.go delete mode 100644 vendor/golang.org/x/text/language/display/lookup.go delete mode 100644 vendor/golang.org/x/text/language/display/maketables.go delete mode 100644 vendor/golang.org/x/text/language/display/tables.go delete mode 100644 vendor/golang.org/x/text/language/doc.go delete mode 100644 vendor/golang.org/x/text/language/gen.go delete mode 100644 vendor/golang.org/x/text/language/gen_common.go delete mode 100644 vendor/golang.org/x/text/language/gen_index.go delete mode 100644 vendor/golang.org/x/text/language/go1_1.go delete mode 100644 vendor/golang.org/x/text/language/go1_2.go delete mode 100644 vendor/golang.org/x/text/language/index.go delete mode 100644 vendor/golang.org/x/text/language/language.go delete mode 100644 vendor/golang.org/x/text/language/lookup.go delete mode 100644 vendor/golang.org/x/text/language/match.go delete mode 100644 vendor/golang.org/x/text/language/parse.go delete mode 100644 vendor/golang.org/x/text/language/tables.go delete mode 100644 vendor/golang.org/x/text/language/tags.go delete mode 100644 vendor/golang.org/x/text/runes/LICENSE delete mode 100644 vendor/golang.org/x/text/runes/cond.go delete mode 100644 vendor/golang.org/x/text/runes/runes.go delete mode 100644 vendor/golang.org/x/text/transform/LICENSE delete mode 100644 vendor/golang.org/x/text/unicode/cldr/LICENSE delete mode 100644 vendor/golang.org/x/text/unicode/cldr/base.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/cldr.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/collate.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/decode.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/makexml.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/resolve.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/slice.go delete mode 100644 vendor/golang.org/x/text/unicode/cldr/xml.go delete mode 100644 vendor/golang.org/x/text/unicode/norm/LICENSE create mode 100644 vendor/golang.org/x/time/AUTHORS create mode 100644 vendor/golang.org/x/time/CONTRIBUTORS rename vendor/golang.org/x/{crypto/salsa20 => time}/LICENSE (100%) create mode 100644 vendor/golang.org/x/time/PATENTS delete mode 100644 vendor/golang.org/x/time/rate/LICENSE create mode 100644 vendor/gopkg.in/asn1-ber.v1/.travis.yml create mode 100644 vendor/gopkg.in/asn1-ber.v1/README.md create mode 100644 vendor/gopkg.in/ldap.v2/.gitignore create mode 100644 vendor/gopkg.in/ldap.v2/.travis.yml create mode 100644 vendor/gopkg.in/ldap.v2/Makefile create mode 100644 vendor/gopkg.in/ldap.v2/README.md delete mode 100644 vendor/gopkg.in/urfave/cli.v1/LICENSE delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/altsrc.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/flag.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/flag_generated.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/input_source_context.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/map_input_source.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/toml_file_loader.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/altsrc/yaml_file_loader.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/app.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/category.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/cli.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/command.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/context.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/errors.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/flag.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/flag_generated.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/funcs.go delete mode 100644 vendor/gopkg.in/urfave/cli.v1/help.go delete mode 100644 vendor/gopkg.in/yaml.v2/LICENSE delete mode 100644 vendor/gopkg.in/yaml.v2/apic.go delete mode 100644 vendor/gopkg.in/yaml.v2/decode.go delete mode 100644 vendor/gopkg.in/yaml.v2/emitterc.go delete mode 100644 vendor/gopkg.in/yaml.v2/encode.go delete mode 100644 vendor/gopkg.in/yaml.v2/parserc.go delete mode 100644 vendor/gopkg.in/yaml.v2/readerc.go delete mode 100644 vendor/gopkg.in/yaml.v2/resolve.go delete mode 100644 vendor/gopkg.in/yaml.v2/scannerc.go delete mode 100644 vendor/gopkg.in/yaml.v2/sorter.go delete mode 100644 vendor/gopkg.in/yaml.v2/writerc.go delete mode 100644 vendor/gopkg.in/yaml.v2/yaml.go delete mode 100644 vendor/gopkg.in/yaml.v2/yamlh.go delete mode 100644 vendor/gopkg.in/yaml.v2/yamlprivateh.go delete mode 100644 vendor/manifest create mode 100644 vendor/modules.txt diff --git a/.gitignore b/.gitignore index fb67d5733..d920fea7c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ parts/ stage/ *.snap *.bz2 +/repos diff --git a/build.go b/build.go index 4489dd088..8819df255 100644 --- a/build.go +++ b/build.go @@ -42,7 +42,6 @@ var ( goVersion float64 race bool debug = os.Getenv("BUILDDEBUG") != "" - noBuildGopath bool extraTags string installSuffix string pkgdir string @@ -188,6 +187,19 @@ var targets = map[string]target{ }, } +// These are repos we need to clone to run "go generate" + +type dependencyRepo struct { + path string + repo string + commit string +} + +var dependencyRepos = []dependencyRepo{ + {path: "protobuf", repo: "https://github.com/gogo/protobuf.git", commit: "v1.0.0"}, + {path: "xdr", repo: "https://github.com/calmh/xdr.git", commit: "08e072f9cb16"}, +} + func init() { // The "syncthing" target includes a few more files found in the "etc" // and "extra" dirs. @@ -216,39 +228,6 @@ func main() { }() } - if gopath := gopath(); gopath == "" { - gopath, err := temporaryBuildDir() - if err != nil { - log.Fatal(err) - } - os.Setenv("GOPATH", gopath) - log.Println("GOPATH is", gopath) - if !noBuildGopath { - if err := buildGOPATH(gopath); err != nil { - log.Fatal(err) - } - lazyRebuildAssets() - } - } else { - inside := false - wd, _ := os.Getwd() - wd, _ = filepath.EvalSymlinks(wd) - for _, p := range filepath.SplitList(gopath) { - p, _ = filepath.EvalSymlinks(p) - if filepath.Join(p, "src/github.com/syncthing/syncthing") == wd { - inside = true - break - } - } - if !inside { - fmt.Println("You seem to have GOPATH set but the Syncthing source not placed correctly within it, which may cause problems.") - } - } - - // Set path to $GOPATH/bin:$PATH so that we can for sure find tools we - // might have installed during "build.go setup". - os.Setenv("PATH", fmt.Sprintf("%s%cbin%c%s", os.Getenv("GOPATH"), os.PathSeparator, os.PathListSeparator, os.Getenv("PATH"))) - // Invoking build.go with no parameters at all builds everything (incrementally), // which is what you want for maximum error checking during development. if flag.NArg() == 0 { @@ -322,9 +301,6 @@ func runCommand(cmd string, target target) { case "snap": buildSnap(target) - case "clean": - clean() - case "vet": metalintShort() @@ -337,13 +313,6 @@ func runCommand(cmd string, target target) { case "version": fmt.Println(getVersion()) - case "gopath": - gopath, err := temporaryBuildDir() - if err != nil { - log.Fatal(err) - } - fmt.Println(gopath) - default: log.Fatalf("Unknown command %q", cmd) } @@ -355,7 +324,6 @@ func parseFlags() { flag.BoolVar(&noupgrade, "no-upgrade", noupgrade, "Disable upgrade functionality") flag.StringVar(&version, "version", getVersion(), "Set compiled in version string") flag.BoolVar(&race, "race", race, "Use race detector") - flag.BoolVar(&noBuildGopath, "no-build-gopath", noBuildGopath, "Don't build GOPATH, assume it's OK") flag.StringVar(&extraTags, "tags", extraTags, "Extra tags, space separated") flag.StringVar(&installSuffix, "installsuffix", installSuffix, "Install suffix, optional") flag.StringVar(&pkgdir, "pkgdir", "", "Set -pkgdir parameter for `go build`") @@ -787,6 +755,14 @@ func shouldRebuildAssets(target, srcdir string) bool { } func proto() { + os.MkdirAll("repos", 0755) + for _, dep := range dependencyRepos { + path := filepath.Join("repos", dep.path) + if _, err := os.Stat(path); err != nil { + runPrintInDir("repos", "git", "clone", dep.repo, dep.path) + runPrintInDir(path, "git", "checkout", dep.commit) + } + } runPrint("go", "generate", "github.com/syncthing/syncthing/lib/...", "github.com/syncthing/syncthing/cmd/stdiscosrv") } @@ -806,11 +782,6 @@ func transifex() { runPrint("go", "run", "../../../../script/transifexdl.go") } -func clean() { - rmr("bin") - rmr(filepath.Join(os.Getenv("GOPATH"), fmt.Sprintf("pkg/%s_%s/github.com/syncthing", goos, goarch))) -} - func ldflags() string { sep := '=' if goVersion > 0 && goVersion < 1.5 { @@ -1005,6 +976,10 @@ func runError(cmd string, args ...string) ([]byte, error) { } func runPrint(cmd string, args ...string) { + runPrintInDir(".", cmd, args...) +} + +func runPrintInDir(dir string, cmd string, args ...string) { if debug { t0 := time.Now() log.Println("runPrint:", cmd, strings.Join(args, " ")) @@ -1015,6 +990,7 @@ func runPrint(cmd string, args ...string) { ecmd := exec.Command(cmd, args...) ecmd.Stdout = os.Stdout ecmd.Stderr = os.Stderr + ecmd.Dir = dir err := ecmd.Run() if err != nil { log.Fatal(err) @@ -1268,90 +1244,6 @@ func temporaryBuildDir() (string, error) { return filepath.Join(tmpDir, base), nil } -func buildGOPATH(gopath string) error { - pkg := filepath.Join(gopath, "src/github.com/syncthing/syncthing") - dirs := []string{"cmd", "gui", "lib", "meta", "script", "test", "vendor"} - - if debug { - t0 := time.Now() - log.Println("build temporary GOPATH in", gopath) - defer func() { - log.Println("... in", time.Since(t0)) - }() - } - - // Walk the sources and copy the files into the temporary GOPATH. - // Remember which files are supposed to be present so we can clean - // out everything else in the next step. The copyFile() step will - // only actually copy the file if it doesn't exist or the contents - // differ. - - exists := map[string]struct{}{} - for _, dir := range dirs { - err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() { - return nil - } - - dst := filepath.Join(pkg, path) - exists[dst] = struct{}{} - - if err := copyFile(path, dst, info.Mode()); err != nil { - return err - } - - return nil - }) - if err != nil { - return err - } - } - - // Walk the temporary GOPATH and remove any files that we wouldn't - // have copied there in the previous step. - - filepath.Walk(pkg, func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - if info.IsDir() { - return nil - } - if _, ok := exists[path]; !ok { - os.Remove(path) - } - return nil - }) - - return nil -} - -func gopath() string { - if gopath := os.Getenv("GOPATH"); gopath != "" { - // The env var is set, use that. - return gopath - } - - // Ask Go what it thinks. - bs, err := runError("go", "env", "GOPATH") - if err != nil { - return "" - } - - // We got something. Check if we are in fact available in that location. - gopath := string(bs) - if _, err := os.Stat(filepath.Join(gopath, "src/github.com/syncthing/syncthing/build.go")); err == nil { - // That seems to be the gopath. - return gopath - } - - // The gopath is not valid. - return "" -} - func (t target) BinaryName() string { if goos == "windows" { return t.binaryName + ".exe" diff --git a/cmd/stdiscosrv/database.go b/cmd/stdiscosrv/database.go index 7c4619664..d4d02536f 100644 --- a/cmd/stdiscosrv/database.go +++ b/cmd/stdiscosrv/database.go @@ -5,7 +5,7 @@ // You can obtain one at https://mozilla.org/MPL/2.0/. //go:generate go run ../../script/protofmt.go database.proto -//go:generate protoc -I ../../../../../ -I ../../vendor/ -I ../../vendor/github.com/gogo/protobuf/protobuf -I . --gogofast_out=. database.proto +//go:generate protoc -I ../../ -I . --gogofast_out=. database.proto package main diff --git a/cmd/stdiscosrv/database.pb.go b/cmd/stdiscosrv/database.pb.go index d467d842a..acde0bef5 100644 --- a/cmd/stdiscosrv/database.pb.go +++ b/cmd/stdiscosrv/database.pb.go @@ -751,22 +751,22 @@ var ( func init() { proto.RegisterFile("database.proto", fileDescriptorDatabase) } var fileDescriptorDatabase = []byte{ - // 264 bytes of a gzipped FileDescriptorProto + // 258 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x49, 0x2c, 0x49, 0x4c, 0x4a, 0x2c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc, - 0x93, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, - 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4, 0xd4, - 0xcf, 0xc8, 0xc5, 0xe7, 0x02, 0x35, 0x27, 0x28, 0x35, 0x39, 0xbf, 0x28, 0x45, 0xc8, 0x92, 0x8b, - 0x33, 0x31, 0x25, 0xa5, 0x28, 0xb5, 0xb8, 0x38, 0xb5, 0x58, 0x82, 0x51, 0x81, 0x59, 0x83, 0xdb, - 0x48, 0x54, 0x0f, 0x64, 0xb6, 0x1e, 0x4c, 0xa1, 0x23, 0x44, 0xda, 0x89, 0xe5, 0xc4, 0x3d, 0x79, - 0x86, 0x20, 0x84, 0x6a, 0x21, 0x31, 0x2e, 0xb6, 0xdc, 0x4c, 0xb0, 0x3e, 0x26, 0x05, 0x46, 0x0d, - 0xd6, 0x20, 0x28, 0x4f, 0x48, 0x88, 0x8b, 0xa5, 0x38, 0x35, 0x35, 0x4f, 0x82, 0x59, 0x81, 0x51, - 0x83, 0x39, 0x08, 0xcc, 0x86, 0xab, 0x4d, 0x91, 0x60, 0x01, 0x8b, 0x42, 0x79, 0x4a, 0x25, 0x5c, - 0x82, 0x41, 0xa9, 0x05, 0x39, 0x99, 0xc9, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x50, 0x37, 0x09, 0x70, - 0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0xa8, 0xae, 0x64, - 0x22, 0xc9, 0x95, 0x58, 0x5c, 0xa3, 0xe4, 0xca, 0xc5, 0x8f, 0xa6, 0x4f, 0x48, 0x82, 0x8b, 0x1d, - 0xaa, 0x07, 0x6a, 0x2f, 0x8c, 0x0b, 0x92, 0x49, 0xad, 0x28, 0xc8, 0x2c, 0x82, 0xfa, 0x93, 0x39, - 0x08, 0xc6, 0x75, 0x12, 0x38, 0xf1, 0x50, 0x8e, 0xe1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, - 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x87, 0xb3, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, - 0x6a, 0x22, 0xa2, 0x85, 0xae, 0x01, 0x00, 0x00, + 0x93, 0x52, 0x2e, 0x4a, 0x2d, 0xc8, 0x2f, 0xd6, 0x07, 0x0b, 0x25, 0x95, 0xa6, 0xe9, 0xa7, 0xe7, + 0xa7, 0xe7, 0x83, 0x39, 0x60, 0x16, 0x44, 0xa9, 0x52, 0x3f, 0x23, 0x17, 0x9f, 0x0b, 0x54, 0x77, + 0x50, 0x6a, 0x72, 0x7e, 0x51, 0x8a, 0x90, 0x25, 0x17, 0x67, 0x62, 0x4a, 0x4a, 0x51, 0x6a, 0x71, + 0x71, 0x6a, 0xb1, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xa8, 0x1e, 0xc8, 0x44, 0x3d, 0x98, + 0x42, 0x47, 0x88, 0xb4, 0x13, 0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x08, 0xd5, 0x42, 0x62, 0x5c, + 0x6c, 0xb9, 0x99, 0x60, 0x7d, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x50, 0x9e, 0x90, 0x10, 0x17, + 0x4b, 0x71, 0x6a, 0x6a, 0x9e, 0x04, 0xb3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x98, 0x0d, 0x57, 0x9b, + 0x22, 0xc1, 0x02, 0x16, 0x85, 0xf2, 0x94, 0x4a, 0xb8, 0x04, 0x83, 0x52, 0x0b, 0x72, 0x32, 0x93, + 0x13, 0x4b, 0x32, 0xf3, 0xf3, 0xa0, 0x6e, 0x12, 0xe0, 0x62, 0xce, 0x4e, 0xad, 0x94, 0x60, 0x54, + 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x51, 0x5d, 0xc9, 0x44, 0x92, 0x2b, 0xb1, 0xb8, 0x46, 0xc9, + 0x95, 0x8b, 0x1f, 0x4d, 0x9f, 0x90, 0x04, 0x17, 0x3b, 0x54, 0x0f, 0xd4, 0x5e, 0x18, 0x17, 0x24, + 0x93, 0x5a, 0x51, 0x90, 0x59, 0x04, 0xf5, 0x27, 0x73, 0x10, 0x8c, 0xeb, 0x24, 0x70, 0xe2, 0xa1, + 0x1c, 0xc3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x98, 0xc4, + 0x06, 0x0e, 0x67, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x13, 0xba, 0x28, 0xc9, 0xa4, 0x01, + 0x00, 0x00, } diff --git a/cmd/stdiscosrv/database.proto b/cmd/stdiscosrv/database.proto index eb3c5fcdb..c663b38f6 100644 --- a/cmd/stdiscosrv/database.proto +++ b/cmd/stdiscosrv/database.proto @@ -8,7 +8,7 @@ syntax = "proto3"; package main; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "repos/protobuf/gogoproto/gogo.proto"; option (gogoproto.goproto_getters_all) = false; diff --git a/go.mod b/go.mod new file mode 100644 index 000000000..eb4d12bd5 --- /dev/null +++ b/go.mod @@ -0,0 +1,52 @@ +module github.com/syncthing/syncthing + +require ( + github.com/AudriusButkevicius/cli v0.0.0-20140727204646-7f561c78b5a4 + github.com/AudriusButkevicius/go-nat-pmp v0.0.0-20160522074932-452c97607362 + github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a // indirect + github.com/bkaradzic/go-lz4 v0.0.0-20160924222819-7224d8d8f27e + github.com/calmh/du v1.0.1 + github.com/calmh/xdr v1.1.0 + github.com/chmduquesne/rollinghash v0.0.0-20180912150627-a60f8e7142b5 + github.com/d4l3k/messagediff v1.2.1 + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/gobwas/glob v0.0.0-20170212200151-51eb1ee00b6d + github.com/gogo/protobuf v1.0.0 + github.com/golang/groupcache v0.0.0-20171101203131-84a468cf14b4 + github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf // indirect + github.com/golang/snappy v0.0.0-20170215233205-553a64147049 // indirect + github.com/jackpal/gateway v0.0.0-20161225004348-5795ac81146e + github.com/kballard/go-shellquote v0.0.0-20170619183022-cd60e84ee657 + github.com/kr/pretty v0.1.0 // indirect + github.com/lib/pq v1.0.0 + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/minio/sha256-simd v0.0.0-20171213220625-ad98a36ba0da + github.com/onsi/ginkgo v0.0.0-20171221013426-6c46eb8334b3 // indirect + github.com/onsi/gomega v0.0.0-20171227184521-ba3724c94e4d // indirect + github.com/oschwald/geoip2-golang v1.1.0 + github.com/oschwald/maxminddb-golang v0.0.0-20170901134056-26fe5ace1c70 // indirect + github.com/petermattis/goid v0.0.0-20170816195418-3db12ebb2a59 // indirect + github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v0.9.0 + github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5 // indirect + github.com/prometheus/common v0.0.0-20171117163051-2e54d0b93cba // indirect + github.com/prometheus/procfs v0.0.0-20171226183907-b15cd069a834 // indirect + github.com/rcrowley/go-metrics v0.0.0-20171128170426-e181e095bae9 + github.com/sasha-s/go-deadlock v0.2.0 + github.com/stretchr/testify v1.2.2 // indirect + github.com/syncthing/notify v0.0.0-20181107104724-4e389ea6c0d8 + github.com/syndtr/goleveldb v0.0.0-20171214120811-34011bf325bc + github.com/thejerf/suture v0.0.0-20180907184608-bf6ee6a0b047 + github.com/vitrun/qart v0.0.0-20160531060029-bf64b92db6b0 + golang.org/x/crypto v0.0.0-20171231215028-0fcca4842a8d + golang.org/x/net v0.0.0-20171212005608-d866cfc389ce + golang.org/x/sync v0.0.0-20181108010431-42b317875d0f // indirect + golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 // indirect + golang.org/x/text v0.0.0-20171227012246-e19ae1496984 + golang.org/x/time v0.0.0-20170927054726-6dc17368e09b + gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225 // indirect + gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect + gopkg.in/ldap.v2 v2.5.1 + gopkg.in/yaml.v2 v2.0.0-20171116090243-287cf08546ab // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 000000000..85a968cca --- /dev/null +++ b/go.sum @@ -0,0 +1,100 @@ +github.com/AudriusButkevicius/cli v0.0.0-20140727204646-7f561c78b5a4 h1:Cy4N5BdzSyWRnkNyzkIMKPSuzENT4AGxC+YFo0OOcCI= +github.com/AudriusButkevicius/cli v0.0.0-20140727204646-7f561c78b5a4/go.mod h1:mK5FQv1k6rd64lZeDQ+JgG5hSERyVEYeC3qXrbN+2nw= +github.com/AudriusButkevicius/go-nat-pmp v0.0.0-20160522074932-452c97607362 h1:l4qGIzSY0WhdXdR74XMYAtfc0Ri/RJVM4p6x/E/+WkA= +github.com/AudriusButkevicius/go-nat-pmp v0.0.0-20160522074932-452c97607362/go.mod h1:CEaBhA5lh1spxbPOELh5wNLKGsVQoahjUhVrJViVK8s= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a h1:BtpsbiV638WQZwhA98cEZw2BsbnQJrbd0BI7tsy0W1c= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/bkaradzic/go-lz4 v0.0.0-20160924222819-7224d8d8f27e h1:2augTYh6E+XoNrrivZJBadpThP/dsvYKj0nzqfQ8tM4= +github.com/bkaradzic/go-lz4 v0.0.0-20160924222819-7224d8d8f27e/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4= +github.com/calmh/du v1.0.1 h1:uDCrDbXVVPrzxSNRkpj6nqSfwrl5uRWH3zvrJgl7RRo= +github.com/calmh/du v1.0.1/go.mod h1:pHNccp4cXQeyDaiV3S7t5GN+eGOgynF0VSLxJjk9tLU= +github.com/calmh/xdr v1.1.0 h1:U/Dd4CXNLoo8EiQ4ulJUXkgO1/EyQLgDKLgpY1SOoJE= +github.com/calmh/xdr v1.1.0/go.mod h1:E8sz2ByAdXC8MbANf1LCRYzedSnnc+/sXXJs/PVqoeg= +github.com/chmduquesne/rollinghash v0.0.0-20180912150627-a60f8e7142b5 h1:Wg96Dh0MLTanEaPO0OkGtUIaa2jOnShAIOVUIzRHUxo= +github.com/chmduquesne/rollinghash v0.0.0-20180912150627-a60f8e7142b5/go.mod h1:Uc2I36RRfTAf7Dge82bi3RU0OQUmXT9iweIcPqvr8A0= +github.com/d4l3k/messagediff v1.2.1 h1:ZcAIMYsUg0EAp9X+tt8/enBE/Q8Yd5kzPynLyKptt9U= +github.com/d4l3k/messagediff v1.2.1/go.mod h1:Oozbb1TVXFac9FtSIxHBMnBCq2qeH/2KkEQxENCrlLo= +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/gobwas/glob v0.0.0-20170212200151-51eb1ee00b6d h1:IngNQgbqr5ZOU0exk395Szrvkzes9Ilk1fmJfkw7d+M= +github.com/gobwas/glob v0.0.0-20170212200151-51eb1ee00b6d/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang/groupcache v0.0.0-20171101203131-84a468cf14b4 h1:6o8aP0LGMKzo3NzwhhX6EJsiJ3ejmj+9yA/3p8Fjjlw= +github.com/golang/groupcache v0.0.0-20171101203131-84a468cf14b4/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf h1:pFr/u+m8QUBMW/itAczltF3guNRAL7XDs5tD3f6nSD0= +github.com/golang/protobuf v0.0.0-20171113180720-1e59b77b52bf/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049 h1:K9KHZbXKpGydfDN0aZrsoHpLJlZsBrGMFWbgLDGnPZk= +github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/jackpal/gateway v0.0.0-20161225004348-5795ac81146e h1:lS8IitpqG4RkZbEDlZg5Z7FvBdWLVjSVfsPGOKafEkI= +github.com/jackpal/gateway v0.0.0-20161225004348-5795ac81146e/go.mod h1:lTpwd4ACLXmpyiCTRtfiNyVnUmqT9RivzCDQetPfnjA= +github.com/kballard/go-shellquote v0.0.0-20170619183022-cd60e84ee657 h1:vE7J1m7cCpiRVEIr1B5ccDxRpbPsWT5JU3if2Di5nE4= +github.com/kballard/go-shellquote v0.0.0-20170619183022-cd60e84ee657/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +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/lib/pq v1.0.0 h1:X5PMW56eZitiTeO7tKzZxFCSpbFZJtkMMooicw2us9A= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/minio/sha256-simd v0.0.0-20171213220625-ad98a36ba0da h1:tazA5y1hWYJO8VSYbU36yBhXeIvruLXMUKu6WBtcJck= +github.com/minio/sha256-simd v0.0.0-20171213220625-ad98a36ba0da/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U= +github.com/onsi/ginkgo v0.0.0-20171221013426-6c46eb8334b3 h1:ZN7kHmC0iunA+4UPmERwsuMQan4lUnntO6WX6H1jOO8= +github.com/onsi/ginkgo v0.0.0-20171221013426-6c46eb8334b3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v0.0.0-20171227184521-ba3724c94e4d h1:r351oUAFgdsydkt/g+XR/iJWRwyxVpy6nkNdEl/QdAs= +github.com/onsi/gomega v0.0.0-20171227184521-ba3724c94e4d/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/oschwald/geoip2-golang v1.1.0 h1:ACVPz5YqH4/jZkQdsp/PZc9shQVZmreCzAVNss5y3bo= +github.com/oschwald/geoip2-golang v1.1.0/go.mod h1:0LTTzix/Ao1uMvOhAV4iLU0Lz7eCrP94qZWBTDKf0iE= +github.com/oschwald/maxminddb-golang v0.0.0-20170901134056-26fe5ace1c70 h1:XGLYUmodtNzThosQ8GkMvj9TiIB/uWsP8NfxKSa3aDc= +github.com/oschwald/maxminddb-golang v0.0.0-20170901134056-26fe5ace1c70/go.mod h1:3jhIUymTJ5VREKyIhWm66LJiQt04F0UCDdodShpjWsY= +github.com/petermattis/goid v0.0.0-20170816195418-3db12ebb2a59 h1:2pHcLyJYXivxVvpoCc29uo3GDU1qFfJ1ggXKGYMrM0E= +github.com/petermattis/goid v0.0.0-20170816195418-3db12ebb2a59/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= +github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e h1:+RHxT/gm0O3UF7nLJbdNzAmULvCFt4XfXHWzh3XI/zs= +github.com/pkg/errors v0.0.0-20171216070316-e881fd58d78e/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/prometheus/client_golang v0.9.0 h1:tXuTFVHC03mW0D+Ua1Q2d1EAVqLTuggX50V0VLICCzY= +github.com/prometheus/client_golang v0.9.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5 h1:cLL6NowurKLMfCeQy4tIeph12XNQWgANCNvdyrOYKV4= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/common v0.0.0-20171117163051-2e54d0b93cba h1:/MUKoJbk4oXV3uxkpfHVkmVfL+wzWW6dttaW26s07Gg= +github.com/prometheus/common v0.0.0-20171117163051-2e54d0b93cba/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/procfs v0.0.0-20171226183907-b15cd069a834 h1:HRxr4uZnx/S86wVQsfXcKhadpzdceXn2qCzCtagcI6w= +github.com/prometheus/procfs v0.0.0-20171226183907-b15cd069a834/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/rcrowley/go-metrics v0.0.0-20171128170426-e181e095bae9 h1:jmLW6izPBVlIbk4d+XgK9+sChGbVKxxOPmd9eqRHCjw= +github.com/rcrowley/go-metrics v0.0.0-20171128170426-e181e095bae9/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/sasha-s/go-deadlock v0.2.0 h1:lMqc+fUb7RrFS3gQLtoQsJ7/6TV/pAIFvBsqX73DK8Y= +github.com/sasha-s/go-deadlock v0.2.0/go.mod h1:StQn567HiB1fF2yJ44N9au7wOhrPS3iZqiDbRupzT10= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/syncthing/notify v0.0.0-20181107104724-4e389ea6c0d8 h1:ewsMW/a4xDpqHyIteoD29ayMn6GdkFZc2T0PX2K6PAg= +github.com/syncthing/notify v0.0.0-20181107104724-4e389ea6c0d8/go.mod h1:Sn4ChoS7e4FxjCN1XHPVBT43AgnRLbuaB8pEc1Zcdjg= +github.com/syndtr/goleveldb v0.0.0-20171214120811-34011bf325bc h1:yhWARKbbDg8UBRi/M5bVcVOBg2viFKcNJEAtHMYbRBo= +github.com/syndtr/goleveldb v0.0.0-20171214120811-34011bf325bc/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= +github.com/thejerf/suture v0.0.0-20180907184608-bf6ee6a0b047 h1:TRlvuQjC13jRLqqJTp8rbb5SjRTYCP/8sCIYRdEaJrg= +github.com/thejerf/suture v0.0.0-20180907184608-bf6ee6a0b047/go.mod h1:ibKwrVj+Uzf3XZdAiNWUouPaAbSoemxOHLmJmwheEMc= +github.com/vitrun/qart v0.0.0-20160531060029-bf64b92db6b0 h1:okhMind4q9H1OxF44gNegWkiP4H/gsTFLalHFa4OOUI= +github.com/vitrun/qart v0.0.0-20160531060029-bf64b92db6b0/go.mod h1:TTbGUfE+cXXceWtbTHq6lqcTvYPBKLNejBEbnUsQJtU= +golang.org/x/crypto v0.0.0-20171231215028-0fcca4842a8d h1:GrqEEc3+MtHKTsZrdIGVoYDgLpbSRzW1EF+nLu0PcHE= +golang.org/x/crypto v0.0.0-20171231215028-0fcca4842a8d/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/net v0.0.0-20171212005608-d866cfc389ce h1:4g3VPcb++AP2cNa6CQ0iACUoH7J/3Jxojq0mmJun9A4= +golang.org/x/net v0.0.0-20171212005608-d866cfc389ce/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM= +golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.0.0-20171227012246-e19ae1496984 h1:ulYJn/BqO4fMRe1xAQzWjokgjsQLPpb21GltxXHI3fQ= +golang.org/x/text v0.0.0-20171227012246-e19ae1496984/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/time v0.0.0-20170927054726-6dc17368e09b h1:3X+R0qq1+64izd8es+EttB6qcY+JDlVmAhpRXl7gpzU= +golang.org/x/time v0.0.0-20170927054726-6dc17368e09b/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225 h1:JBwmEvLfCqgPcIq8MjVMQxsF3LVL4XG/HH0qiG0+IFY= +gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +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= +gopkg.in/ldap.v2 v2.5.1 h1:wiu0okdNfjlBzg6UWvd1Hn8Y+Ux17/u/4nlk4CQr6tU= +gopkg.in/ldap.v2 v2.5.1/go.mod h1:oI0cpe/D7HRtBQl8aTg+ZmzFUAvu4lsv3eLXMLGFxWk= +gopkg.in/yaml.v2 v2.0.0-20171116090243-287cf08546ab h1:yZ6iByf7GKeJ3gsd1Dr/xaj1DyJ//wxKX1Cdh8LhoAw= +gopkg.in/yaml.v2 v2.0.0-20171116090243-287cf08546ab/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= diff --git a/lib/db/benchmark_test.go b/lib/db/benchmark_test.go index 500517ef0..746962a97 100644 --- a/lib/db/benchmark_test.go +++ b/lib/db/benchmark_test.go @@ -29,7 +29,7 @@ func lazyInitBenchFileSet() { for i := 0; i < 1000; i++ { files = append(files, protocol.FileInfo{ Name: fmt.Sprintf("file%d", i), - Version: protocol.Vector{[]protocol.Counter{{ID: myID, Value: 1000}}}, + Version: protocol.Vector{Counters: []protocol.Counter{{ID: myID, Value: 1000}}}, Blocks: genBlocks(i), }) } diff --git a/lib/db/structs.go b/lib/db/structs.go index 671337d99..e0ad73aa2 100644 --- a/lib/db/structs.go +++ b/lib/db/structs.go @@ -5,7 +5,7 @@ // You can obtain one at https://mozilla.org/MPL/2.0/. //go:generate go run ../../script/protofmt.go structs.proto -//go:generate protoc -I ../../../../../ -I ../../vendor/ -I ../../vendor/github.com/gogo/protobuf/protobuf -I . --gogofast_out=. structs.proto +//go:generate protoc -I ../../ -I . --gogofast_out=Mlib/protocol/bep.proto=github.com/syncthing/syncthing/lib/protocol:. structs.proto package db diff --git a/lib/db/structs.pb.go b/lib/db/structs.pb.go index e3a9e4b7e..3f98fe8e4 100644 --- a/lib/db/structs.pb.go +++ b/lib/db/structs.pb.go @@ -1571,47 +1571,47 @@ var ( func init() { proto.RegisterFile("structs.proto", fileDescriptorStructs) } var fileDescriptorStructs = []byte{ - // 671 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x4d, 0x6b, 0xdb, 0x4c, - 0x10, 0xb6, 0x62, 0xf9, 0x6b, 0x6c, 0xe7, 0x4d, 0x96, 0x10, 0x84, 0xe1, 0xb5, 0x85, 0xa1, 0x20, - 0x0a, 0xb5, 0xdb, 0x84, 0x5e, 0xda, 0x9b, 0x1a, 0x02, 0x86, 0xd2, 0x96, 0x75, 0xc8, 0xa9, 0x60, - 0xf4, 0xb1, 0x76, 0x96, 0xc8, 0x5a, 0x47, 0xbb, 0x4e, 0x50, 0x7e, 0x49, 0x8f, 0xf9, 0x39, 0x39, - 0xf6, 0xdc, 0x83, 0x49, 0xdd, 0x1e, 0xfa, 0x33, 0xca, 0xee, 0x4a, 0x8a, 0x9a, 0x53, 0x7b, 0x9b, - 0x67, 0x3e, 0x76, 0x9e, 0x99, 0x79, 0x16, 0xba, 0x5c, 0x24, 0xeb, 0x40, 0xf0, 0xd1, 0x2a, 0x61, - 0x82, 0xa1, 0x9d, 0xd0, 0xef, 0xbd, 0x58, 0x50, 0x71, 0xb1, 0xf6, 0x47, 0x01, 0x5b, 0x8e, 0x17, - 0x6c, 0xc1, 0xc6, 0x2a, 0xe4, 0xaf, 0xe7, 0x0a, 0x29, 0xa0, 0x2c, 0x5d, 0xd2, 0x7b, 0x5d, 0x4a, - 0xe7, 0x69, 0x1c, 0x88, 0x0b, 0x1a, 0x2f, 0x4a, 0x56, 0x44, 0x7d, 0xfd, 0x42, 0xc0, 0xa2, 0xb1, - 0x4f, 0x56, 0xba, 0x6c, 0x78, 0x05, 0xed, 0x53, 0x1a, 0x91, 0x73, 0x92, 0x70, 0xca, 0x62, 0xf4, - 0x12, 0x1a, 0xd7, 0xda, 0xb4, 0x0c, 0xdb, 0x70, 0xda, 0x47, 0x7b, 0xa3, 0xbc, 0x68, 0x74, 0x4e, - 0x02, 0xc1, 0x12, 0xd7, 0xbc, 0xdf, 0x0c, 0x2a, 0x38, 0x4f, 0x43, 0x87, 0x50, 0x0f, 0xc9, 0x35, - 0x0d, 0x88, 0xb5, 0x63, 0x1b, 0x4e, 0x07, 0x67, 0x08, 0x59, 0xd0, 0xa0, 0xf1, 0xb5, 0x17, 0xd1, - 0xd0, 0xaa, 0xda, 0x86, 0xd3, 0xc4, 0x39, 0x1c, 0x9e, 0x42, 0x3b, 0x6b, 0xf7, 0x9e, 0x72, 0x81, - 0x5e, 0x41, 0x33, 0x7b, 0x8b, 0x5b, 0x86, 0x5d, 0x75, 0xda, 0x47, 0xff, 0x8d, 0x42, 0x7f, 0x54, - 0x62, 0x95, 0xb5, 0x2c, 0xd2, 0xde, 0x98, 0x5f, 0xee, 0x06, 0x95, 0xe1, 0x83, 0x09, 0xfb, 0x32, - 0x6b, 0x12, 0xcf, 0xd9, 0x59, 0xb2, 0x8e, 0x03, 0x4f, 0x90, 0x10, 0x21, 0x30, 0x63, 0x6f, 0x49, - 0x14, 0xfd, 0x16, 0x56, 0x36, 0x7a, 0x0e, 0xa6, 0x48, 0x57, 0x9a, 0xe1, 0xee, 0xd1, 0xe1, 0xe3, - 0x48, 0x45, 0x79, 0xba, 0x22, 0x58, 0xe5, 0xc8, 0x7a, 0x4e, 0x6f, 0x89, 0x22, 0x5d, 0xc5, 0xca, - 0x46, 0x36, 0xb4, 0x57, 0x24, 0x59, 0x52, 0xae, 0x59, 0x9a, 0xb6, 0xe1, 0x74, 0x71, 0xd9, 0x85, - 0xfe, 0x07, 0x58, 0xb2, 0x90, 0xce, 0x29, 0x09, 0x67, 0xdc, 0xaa, 0xa9, 0xda, 0x56, 0xee, 0x99, - 0xca, 0x65, 0x84, 0x24, 0x22, 0x82, 0x84, 0x56, 0x5d, 0x2f, 0x23, 0x83, 0xc8, 0x79, 0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xac, 0x1a, 0xd6, 0x40, 0x3e, 0x14, 0xd2, 0x44, 0xad, 0x95, 0x12, - 0xae, 0x04, 0x56, 0xc3, 0x65, 0x97, 0xda, 0xae, 0xee, 0xcd, 0x95, 0xa6, 0x6a, 0xb8, 0xc0, 0x65, - 0x59, 0x98, 0x2a, 0x54, 0xc8, 0xe2, 0x00, 0x6a, 0x7e, 0x2a, 0x48, 0x2e, 0x25, 0x0d, 0xfe, 0xb8, - 0x54, 0xfd, 0xc9, 0xa5, 0x7a, 0xd0, 0xd4, 0x3f, 0x6f, 0x72, 0xa2, 0x66, 0xee, 0xe0, 0x02, 0xa3, - 0x3e, 0x94, 0x46, 0xb3, 0xd0, 0xd3, 0x61, 0x87, 0x1f, 0xa1, 0xa5, 0xa7, 0x9c, 0x12, 0x81, 0x1c, - 0xa8, 0x07, 0x0a, 0x64, 0xbf, 0x11, 0xe4, 0x6f, 0xd4, 0xe1, 0x4c, 0x39, 0x59, 0x5c, 0xd2, 0x0f, - 0x12, 0x22, 0x7f, 0x9d, 0x1a, 0xbc, 0x8a, 0x73, 0xe8, 0x1e, 0xdc, 0x7f, 0xef, 0x57, 0xee, 0xb7, - 0x7d, 0xe3, 0xeb, 0xb6, 0x6f, 0x3c, 0x6c, 0xfb, 0x95, 0xbb, 0x1f, 0x7d, 0xc3, 0xaf, 0xab, 0x5b, - 0x1f, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x4d, 0xd7, 0x14, 0xed, 0x04, 0x00, 0x00, + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4d, 0x6f, 0xdb, 0x38, + 0x10, 0xb5, 0x62, 0xf9, 0x6b, 0x6c, 0x67, 0x13, 0x22, 0x08, 0x04, 0x03, 0x6b, 0x0b, 0x5e, 0x2c, + 0x20, 0xec, 0x41, 0xde, 0x26, 0xb7, 0xf6, 0xa6, 0x06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0x51, 0x95, 0x97, 0x2c, 0xd3, 0x5e, 0x9b, 0x9f, 0x1f, 0x46, 0xb5, 0xf1, 0x93, 0x09, 0x87, 0x32, + 0x6b, 0x9a, 0x2c, 0xd8, 0x45, 0xba, 0x49, 0x42, 0x5f, 0x90, 0x08, 0x21, 0x30, 0x13, 0x7f, 0x45, + 0x94, 0xfc, 0x0e, 0x56, 0x31, 0xfa, 0x0f, 0x4c, 0x91, 0xad, 0xb5, 0xc2, 0xfd, 0x93, 0xe3, 0xe7, + 0x96, 0xca, 0xeb, 0xd9, 0x9a, 0x60, 0x95, 0x23, 0xef, 0x73, 0x7a, 0x4f, 0x94, 0xe8, 0x3a, 0x56, + 0x31, 0xb2, 0xa1, 0xbb, 0x26, 0xe9, 0x8a, 0x72, 0xad, 0xd2, 0xb4, 0x0d, 0xa7, 0x8f, 0xab, 0x14, + 0xfa, 0x1b, 0x60, 0xc5, 0x22, 0xba, 0xa0, 0x24, 0x9a, 0x73, 0xab, 0xa1, 0xee, 0x76, 0x0a, 0x66, + 0x26, 0x87, 0x11, 0x91, 0x98, 0x08, 0x12, 0x59, 0x4d, 0x3d, 0x8c, 0x1c, 0x22, 0xe7, 0x79, 0x4c, + 0x2d, 0x79, 0xe2, 0xed, 0xef, 0xb6, 0x23, 0xc0, 0xfe, 0xdd, 0x54, 0xb3, 0xe5, 0xd8, 0xd0, 0xbf, + 0xb0, 0x9f, 0xb0, 0x79, 0x55, 0x47, 0x5b, 0x3d, 0xd5, 0x4f, 0xd8, 0xc7, 0x8a, 0x92, 0xca, 0x06, + 0x3b, 0x7f, 0xb6, 0xc1, 0x01, 0xb4, 0x39, 0xb9, 0xd9, 0x90, 0x24, 0x24, 0x16, 0x28, 0xe5, 0x25, + 0x46, 0x23, 0xe8, 0x96, 0x7d, 0x25, 0xdc, 0xea, 0xda, 0x86, 0xd3, 0xc0, 0x65, 0xab, 0xef, 0x39, + 0xfa, 0x54, 0x49, 0x08, 0x32, 0xab, 0x67, 0x1b, 0x8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+ 0x86, 0x50, 0x69, 0xcd, 0x42, 0x2f, 0x9b, 0x1d, 0x7f, 0x80, 0x8e, 0xee, 0x72, 0x46, 0x04, 0x72, + 0xa0, 0x19, 0x2a, 0x90, 0xff, 0x46, 0x90, 0xbf, 0x51, 0x1f, 0xe7, 0xce, 0xc9, 0xcf, 0xa5, 0xfc, + 0x30, 0x25, 0xf2, 0xd7, 0xa9, 0xc6, 0xeb, 0xb8, 0x80, 0xde, 0xd1, 0xe3, 0xb7, 0x61, 0xed, 0x71, + 0x37, 0x34, 0xbe, 0xec, 0x86, 0xc6, 0xd3, 0x6e, 0x58, 0x7b, 0xf8, 0x3e, 0x34, 0x82, 0xa6, 0xda, + 0xf5, 0xe9, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0x8f, 0xd2, 0xdf, 0xc4, 0x04, 0x00, 0x00, } diff --git a/lib/db/structs.proto b/lib/db/structs.proto index 9794adb32..eb82a26b9 100644 --- a/lib/db/structs.proto +++ b/lib/db/structs.proto @@ -2,8 +2,8 @@ syntax = "proto3"; package db; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/syncthing/syncthing/lib/protocol/bep.proto"; +import "repos/protobuf/gogoproto/gogo.proto"; +import "lib/protocol/bep.proto"; option (gogoproto.goproto_getters_all) = false; option (gogoproto.sizer_all) = false; diff --git a/lib/discover/local.go b/lib/discover/local.go index 6cf1a4123..7108ef18b 100644 --- a/lib/discover/local.go +++ b/lib/discover/local.go @@ -5,7 +5,7 @@ // You can obtain one at https://mozilla.org/MPL/2.0/. //go:generate go run ../../script/protofmt.go local.proto -//go:generate protoc -I ../../vendor/ -I ../../vendor/github.com/gogo/protobuf/protobuf -I . --gogofast_out=. local.proto +//go:generate protoc -I ../../ -I . --gogofast_out=. local.proto package discover diff --git a/lib/discover/local.pb.go b/lib/discover/local.pb.go index 68614f281..50b9abae8 100644 --- a/lib/discover/local.pb.go +++ b/lib/discover/local.pb.go @@ -386,20 +386,20 @@ func init() { proto.RegisterFile("local.proto", fileDescriptorLocal) } var fileDescriptorLocal = []byte{ // 241 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8e, 0x4f, 0x4e, 0x84, 0x30, - 0x14, 0xc6, 0x29, 0x24, 0x66, 0xa6, 0x63, 0x5c, 0x10, 0x17, 0xc4, 0x98, 0x42, 0x5c, 0xb1, 0x11, - 0x16, 0x7a, 0x01, 0x09, 0x9b, 0x6e, 0xb9, 0x80, 0x81, 0xb6, 0x32, 0x2f, 0xc1, 0x3e, 0x43, 0x61, - 0x12, 0x6f, 0xe3, 0x05, 0xbc, 0x07, 0x4b, 0xd7, 0x2e, 0x1a, 0xad, 0x17, 0x31, 0xe9, 0x68, 0x86, - 0xdd, 0xf7, 0xfd, 0xf2, 0x7b, 0x7f, 0xe8, 0x6e, 0x40, 0xd1, 0x0e, 0xc5, 0xcb, 0x88, 0x13, 0xc6, - 0x1b, 0x09, 0x46, 0xe0, 0x41, 0x8d, 0x57, 0xb7, 0x3d, 0x4c, 0xfb, 0xb9, 0x2b, 0x04, 0x3e, 0x97, - 0x3d, 0xf6, 0x58, 0x7a, 0xa1, 0x9b, 0x9f, 0x7c, 0xf3, 0xc5, 0xa7, 0xe3, 0xe0, 0xcd, 0x3b, 0xa1, - 0x9b, 0x07, 0xad, 0x71, 0xd6, 0x42, 0xc5, 0x0d, 0x0d, 0x41, 0x26, 0x24, 0x23, 0xf9, 0x79, 0x55, - 0x2d, 0x36, 0x0d, 0x3e, 0x6d, 0x7a, 0xbf, 0xda, 0x67, 0x5e, 0xb5, 0x98, 0xf6, 0xa0, 0xfb, 0x55, - 0x1a, 0xa0, 0x3b, 0x9e, 0x10, 0x38, 0x14, 0xb5, 0x3a, 0x80, 0x50, 0xbc, 0x76, 0x36, 0x0d, 0x79, - 0xdd, 0x84, 0x20, 0xe3, 0x6b, 0xba, 0x6d, 0xa5, 0x1c, 0x95,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x15, 0xf7, 0x51, 0x47, 0x2c, 0x61, 0xe9, 0x79, 0x51, 0x4c, 0x73, 0xec, 0x7d, 0xcc, 0xf1, + 0x7d, 0x8b, 0xc3, 0x7e, 0x6c, 0x32, 0x45, 0xcf, 0xb9, 0x7d, 0x31, 0x6a, 0xd8, 0xa3, 0x69, 0x4f, + 0xa8, 0xc3, 0x66, 0x7d, 0xa1, 0xa8, 0xcb, 0x4a, 0x38, 0xa2, 0x02, 0x59, 0xba, 0x39, 0xf6, 0x65, + 0x59, 0xf9, 0xa8, 0xc3, 0x6b, 0xbe, 0xad, 0xb5, 0xee, 0xc1, 0x5a, 0xb0, 0x91, 0x9f, 0x04, 0xe9, + 0xb6, 0xfa, 0x17, 0x61, 0xce, 0x77, 0x68, 0xec, 0x50, 0x1b, 0x05, 0x8f, 0xa8, 0xa3, 0x20, 0x61, + 0x69, 0x50, 0x5c, 0xb8, 0x39, 0xe6, 0xf2, 0x57, 0xcb, 0xb2, 0xe2, 0x7f, 0x89, 0xd4, 0xc5, 0xe5, + 0xf4, 0x25, 0xbc, 0xc9, 0x09, 0xf6, 0xee, 0x04, 0xfb, 0x74, 0xc2, 0x7b, 0xfd, 0x16, 0xac, 0x39, + 0x5b, 0x16, 0xdc, 0xfd, 0x04, 0x00, 0x00, 0xff, 0xff, 0x6f, 0x5a, 0xdf, 0xed, 0x0a, 0x01, 0x00, 0x00, } diff --git a/lib/discover/local.proto b/lib/discover/local.proto index a2c825949..8028fbdb0 100644 --- a/lib/discover/local.proto +++ b/lib/discover/local.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package discover; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "repos/protobuf/gogoproto/gogo.proto"; option (gogoproto.goproto_getters_all) = false; option (gogoproto.sizer_all) = false; diff --git a/lib/protocol/bep.pb.go b/lib/protocol/bep.pb.go index 522f0438c..8ff8e5143 100644 --- a/lib/protocol/bep.pb.go +++ b/lib/protocol/bep.pb.go @@ -4254,118 +4254,117 @@ var ( func init() { proto.RegisterFile("bep.proto", fileDescriptorBep) } var fileDescriptorBep = []byte{ - // 1793 bytes of a gzipped FileDescriptorProto + // 1787 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x73, 0xdb, 0xc6, - 0x15, 0x17, 0x48, 0xf0, 0xdf, 0x23, 0xa5, 0x40, 0x6b, 0x5b, 0x45, 0x11, 0x85, 0x84, 0x19, 0x3b, - 0x56, 0x34, 0x89, 0xec, 0x26, 0x69, 0x3b, 0xed, 0xb4, 0x9d, 0xe1, 0x1f, 0x48, 0xe6, 0x54, 0x26, - 0xd9, 0x25, 0xe5, 0xd4, 0x39, 0x14, 0x03, 0x12, 0x4b, 0x0a, 0x63, 0x10, 0xcb, 0x02, 0xa0, 0x64, - 0xe6, 0x23, 0xf0, 0x13, 0xf4, 0xc2, 0x99, 0xcc, 0xf4, 0xd4, 0x6f, 0xe2, 0x63, 0xda, 0x43, 0x0f, - 0x3d, 0x68, 0x1a, 0xf5, 0x92, 0x63, 0x3f, 0x41, 0xa7, 0xb3, 0xbb, 0x00, 0x09, 0x4a, 0x76, 0xc6, - 0x87, 0x9c, 0xb8, 0xfb, 0xde, 0x6f, 0xdf, 0xf2, 0xfd, 0xde, 0xef, 0xbd, 0x05, 0x14, 0x06, 0x64, - 0x7a, 0x34, 0xf5, 0x69, 0x48, 0x51, 0x9e, 0xff, 0x0c, 0xa9, 0xab, 0x7d, 0x3a, 0x76, 0xc2, 0xf3, - 0xd9, 0xe0, 0x68, 0x48, 0x27, 0x8f, 0xc7, 0x74, 0x4c, 0x1f, 0x73, 0xcf, 0x60, 0x36, 0xe2, 0x3b, - 0xbe, 0xe1, 0x2b, 0x71, 0xb0, 0x3a, 0x85, 0xcc, 0x53, 0xe2, 0xba, 0x14, 0x55, 0xa0, 0x68, 0x93, - 0x0b, 0x67, 0x48, 0x4c, 0xcf, 0x9a, 0x10, 0x55, 0xd2, 0xa5, 0x83, 0x02, 0x06, 0x61, 0x6a, 0x5b, - 0x13, 0xc2, 0x00, 0x43, 0xd7, 0x21, 0x5e, 0x28, 0x00, 0x29, 0x01, 0x10, 0x26, 0x0e, 0x78, 0x08, - 0x3b, 0x11, 0xe0, 0x82, 0xf8, 0x81, 0x43, 0x3d, 0x35, 0xcd, 0x31, 0xdb, 0xc2, 0xfa, 0x5c, 0x18, - 0xab, 0x01, 0x64, 0x9f, 0x12, 0xcb, 0x26, 0x3e, 0xfa, 0x18, 0xe4, 0x70, 0x3e, 0x15, 0x77, 0xed, - 0x7c, 0x76, 0xef, 0x28, 0xce, 0xe1, 0xe8, 0x19, 0x09, 0x02, 0x6b, 0x4c, 0xfa, 0xf3, 0x29, 0xc1, - 0x1c, 0x82, 0x7e, 0x07, 0xc5, 0x21, 0x9d, 0x4c, 0x7d, 0x12, 0xf0, 0xc0, 0x29, 0x7e, 0x62, 0xff, - 0xd6, 0x89, 0xc6, 0x1a, 0x83, 0x93, 0x07, 0xaa, 0x35, 0xd8, 0x6e, 0xb8, 0xb3, 0x20, 0x24, 0x7e, - 0x83, 0x7a, 0x23, 0x67, 0x8c, 0x9e, 0x40, 0x6e, 0x44, 0x5d, 0x9b, 0xf8, 0x81, 0x2a, 0xe9, 0xe9, - 0x83, 0xe2, 0x67, 0xca, 0x3a, 0xd8, 0x31, 0x77, 0xd4, 0xe5, 0xd7, 0x57, 0x95, 0x2d, 0x1c, 0xc3, - 0xaa, 0x7f, 0x4d, 0x41, 0x56, 0x78, 0xd0, 0x1e, 0xa4, 0x1c, 0x5b, 0x50, 0x54, 0xcf, 0x5e, 0x5f, - 0x55, 0x52, 0xad, 0x26, 0x4e, 0x39, 0x36, 0xba, 0x0b, 0x19, 0xd7, 0x1a, 0x10, 0x37, 0x22, 0x47, - 0x6c, 0xd0, 0xfb, 0x50, 0xf0, 0x89, 0x65, 0x9b, 0xd4, 0x73, 0xe7, 0x9c, 0x92, 0x3c, 0xce, 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4c, 0xdb, + 0xb1, 0xa2, 0x49, 0x6d, 0x37, 0x49, 0xdb, 0x69, 0xa7, 0xed, 0x0c, 0xff, 0x40, 0x32, 0xa7, 0x32, + 0xa8, 0x2e, 0x29, 0xa7, 0xce, 0xa1, 0x18, 0x88, 0x58, 0x4a, 0x18, 0x83, 0x58, 0x16, 0x00, 0x25, + 0x33, 0x1f, 0x81, 0x9f, 0xa0, 0x17, 0xce, 0x64, 0xa6, 0xa7, 0x7e, 0x13, 0x1f, 0xd3, 0x1e, 0x7a, + 0xe8, 0x41, 0xd3, 0xa8, 0x97, 0x1c, 0xfb, 0x09, 0x3a, 0x9d, 0xdd, 0x05, 0x48, 0x50, 0xb2, 0x33, + 0x39, 0xf4, 0x84, 0xdd, 0xf7, 0x7e, 0xbb, 0x8b, 0xf7, 0x7b, 0xbf, 0xf7, 0x76, 0xa1, 0x7c, 0x4a, + 0x26, 0x8f, 0x27, 0x21, 0x8d, 0x29, 0x52, 0xf8, 0x67, 0x48, 0x7d, 0xfd, 0x7e, 0x48, 0x26, 0x34, + 0x7a, 0xc2, 0xe7, 0xa7, 0xd3, 0xd1, 0x93, 0x33, 0x7a, 0x46, 0xf9, 0x84, 0x8f, 0x04, 0xbc, 0x31, + 0x81, 0xc2, 0x33, 0xe2, 0xfb, 0x14, 0xd5, 0xa1, 0xe2, 0x92, 0x0b, 0x6f, 0x48, 0xec, 0xc0, 0x19, + 0x13, 0x4d, 0x32, 0xa4, 0xbd, 0x32, 0x06, 0x61, 0xb2, 0x9c, 0x31, 0x61, 0x80, 0xa1, 0xef, 0x91, + 0x20, 0x16, 0x80, 0x9c, 0x00, 0x08, 0x13, 0x07, 0x3c, 0x84, 0xad, 0x04, 0x70, 0x41, 0xc2, 0xc8, + 0xa3, 0x81, 0x96, 0xe7, 0x98, 0x4d, 0x61, 0x7d, 0x21, 0x8c, 0x8d, 0x08, 0x8a, 0xcf, 0x88, 0xe3, + 0x92, 0x10, 0x7d, 0x0c, 0x72, 0x3c, 0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xc8, 0x39, 0xf5, 0x89, + 0x1d, 0x93, 0xf1, 0xc4, 0xf6, 0x02, 0x97, 0xbc, 0x26, 0x91, 0x56, 0xe4, 0x58, 0x94, 0xf8, 0x06, + 0x64, 0x3c, 0xe9, 0x0a, 0x0f, 0xda, 0x81, 0xe2, 0xc4, 0x99, 0x46, 0xc4, 0xd5, 0x4a, 0x1c, 0x93, + 0xcc, 0x18, 0x4b, 0x42, 0x01, 0x91, 0xa6, 0xde, 0x64, 0xa9, 0xc3, 0x1d, 0x29, 0x4b, 0x09, 0xac, + 0xf1, 0x9f, 0x1c, 0x14, 0x85, 0x07, 0x7d, 0xb4, 0x64, 0xa9, 0xda, 0xda, 0x61, 0xa8, 0x7f, 0x5e, + 0xd5, 0x15, 0xe1, 0xeb, 0x76, 0x32, 0xac, 0x21, 0x90, 0x33, 0x8a, 0xe2, 0x63, 0xb4, 0x0b, 0x65, + 0xc7, 0x75, 0x59, 0xf6, 0x48, 0xa4, 0xe5, 0x8d, 0xfc, 0x5e, 0x19, 0xaf, 0x0c, 0xe8, 0x17, 0xeb, + 0x6a, 0x90, 0x6f, 0xea, 0xe7, 0x5d, 0x32, 0x60, 0xa9, 0x18, 0x92, 0x30, 0x51, 0x70, 0x81, 0x9f, + 0xa7, 0x30, 0x03, 0xd7, 0xef, 0x3d, 0xa8, 0x8e, 0x9d, 0xd7, 0x76, 0x44, 0xfe, 0x34, 0x25, 0xc1, + 0x90, 0x70, 0xba, 0xf2, 0xb8, 0x32, 0x76, 0x5e, 0xf7, 0x13, 0x13, 0xaa, 0x01, 0x78, 0x41, 0x1c, + 0x52, 0x77, 0x3a, 0x24, 0x61, 0xc2, 0x55, 0xc6, 0x82, 0x7e, 0x06, 0x0a, 0x27, 0xdb, 0xf6, 0x5c, + 0x4d, 0x31, 0xa4, 0x3d, 0xb9, 0xa5, 0x27, 0x81, 0x97, 0x38, 0xd5, 0x3c, 0xee, 0x74, 0x88, 0x4b, + 0x1c, 0xdb, 0x75, 0xd1, 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 0x27, 0x3a, 0xe7, 0x62, 0xaa, 0x62, 0x3e, 0x66, 0xad, 0xe2, 0x92, 0x38, 0xaf, 0x6c, 0xee, + 0x10, 0x52, 0x52, 0x98, 0xe1, 0x99, 0x13, 0x9d, 0x27, 0xe7, 0xfd, 0x06, 0x8a, 0x22, 0x55, 0xe8, + 0x33, 0x50, 0x86, 0x74, 0x1a, 0xc4, 0xab, 0xeb, 0x64, 0x3b, 0xdb, 0x8d, 0xb8, 0x27, 0x89, 0x7d, + 0x09, 0x6c, 0x1c, 0x40, 0x29, 0x71, 0xa1, 0x87, 0xcb, 0x56, 0x29, 0xb7, 0xee, 0xde, 0xc8, 0xca, + 0xfa, 0xfd, 0x72, 0xe1, 0xf8, 0x53, 0xf1, 0xf3, 0x32, 0x16, 0x93, 0xc6, 0xdf, 0x24, 0x28, 0x61, + 0xa6, 0x84, 0x28, 0xce, 0xdc, 0x4c, 0x85, 0xb5, 0x9b, 0x69, 0x55, 0xc3, 0xb9, 0xb5, 0x1a, 0x4e, + 0xcb, 0x30, 0x9f, 0x29, 0xc3, 0x15, 0x73, 0xf2, 0x5b, 0x99, 0x2b, 0xbc, 0x85, 0xb9, 0x62, 0x86, + 0xb9, 0x87, 0xb0, 0x35, 0x0a, 0xe9, 0x98, 0xdf, 0x3d, 0x34, 0x74, 0xc2, 0x59, 0xd2, 0x28, 0x37, + 0x99, 0x75, 0x90, 0x1a, 0xd7, 0x09, 0x56, 0xd6, 0x09, 0x6e, 0xd8, 0xa0, 0x60, 0x12, 0x4d, 0x68, + 0x10, 0x91, 0x77, 0xc6, 0x84, 0x40, 0x76, 0x9d, 0xd8, 0xe1, 0x11, 0x55, 0x31, 0x1f, 0xa3, 0x47, + 0x20, 0x0f, 0xa9, 0x2b, 0xe2, 0xd9, 0xca, 0x4a, 0xd0, 0x0c, 0x43, 0x1a, 0xb6, 0xa9, 0x4b, 0x30, + 0x07, 0x34, 0x26, 0xa0, 0x76, 0xe8, 0x65, 0xe0, 0x53, 0xc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, 0xd3, 0xe1, 0x39, 0xe7, 0x73, 0x9f, 0xd5, + 0xd0, 0x8b, 0xe6, 0x51, 0xb7, 0x23, 0xa0, 0x79, 0x5d, 0x9b, 0x2f, 0x8c, 0x3b, 0x4b, 0x68, 0xf2, + 0xe4, 0x61, 0xd8, 0x7d, 0x17, 0x6a, 0xdf, 0xdf, 0x98, 0x90, 0x01, 0xc5, 0xe6, 0xf1, 0xb1, 0x69, + 0x75, 0xd2, 0xbf, 0x5f, 0xf9, 0x9a, 0x93, 0x09, 0x09, 0x5c, 0x86, 0x38, 0xe8, 0xe1, 0x43, 0x73, + 0x90, 0xfe, 0xfc, 0x0a, 0x71, 0x40, 0xd9, 0x03, 0xa0, 0xb5, 0xfb, 0xe6, 0xdb, 0xda, 0xc6, 0x37, + 0xdf, 0xd6, 0x36, 0xde, 0x5c, 0xd7, 0xa4, 0x6f, 0xae, 0x6b, 0xd2, 0xbf, 0xae, 0x6b, 0x1b, 0xdf, + 0x5d, 0xd7, 0xa4, 0xaf, 0xff, 0x5d, 0x93, 0x4e, 0x8b, 0xbc, 0x91, 0x7d, 0xf6, 0xbf, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x66, 0x57, 0x60, 0x7e, 0x05, 0x0f, 0x00, 0x00, } diff --git a/lib/protocol/bep.proto b/lib/protocol/bep.proto index 812218d28..6e9159b5d 100644 --- a/lib/protocol/bep.proto +++ b/lib/protocol/bep.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package protocol; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "repos/protobuf/gogoproto/gogo.proto"; option (gogoproto.goproto_getters_all) = false; option (gogoproto.sizer_all) = false; diff --git a/lib/protocol/bep_extensions.go b/lib/protocol/bep_extensions.go index 11cfc7d83..eee6530f7 100644 --- a/lib/protocol/bep_extensions.go +++ b/lib/protocol/bep_extensions.go @@ -1,7 +1,7 @@ // Copyright (C) 2014 The Protocol Authors. //go:generate go run ../../script/protofmt.go bep.proto -//go:generate protoc -I ../../vendor/ -I ../../vendor/github.com/gogo/protobuf/protobuf -I . --gogofast_out=. bep.proto +//go:generate protoc -I ../../ -I . --gogofast_out=. bep.proto package protocol diff --git a/lib/protocol/conflict_test.go b/lib/protocol/conflict_test.go index 9f1b0f49a..b5318387f 100644 --- a/lib/protocol/conflict_test.go +++ b/lib/protocol/conflict_test.go @@ -10,7 +10,7 @@ func TestWinsConflict(t *testing.T) { {{ModifiedS: 42}, {ModifiedS: 41}}, {{ModifiedS: 41}, {ModifiedS: 42, Deleted: true}}, {{Deleted: true}, {ModifiedS: 10, RawInvalid: true}}, - {{ModifiedS: 41, Version: Vector{[]Counter{{42, 2}, {43, 1}}}}, {ModifiedS: 41, Version: Vector{[]Counter{{42, 1}, {43, 2}}}}}, + {{ModifiedS: 41, Version: Vector{Counters: []Counter{{ID: 42, Value: 2}, {ID: 43, Value: 1}}}}, {ModifiedS: 41, Version: Vector{Counters: []Counter{{ID: 42, Value: 1}, {ID: 43, Value: 2}}}}}, } for _, tc := range testcases { diff --git a/lib/protocol/deviceid_test.go b/lib/protocol/deviceid_test.go index 0f9e3527a..45f930e90 100644 --- a/lib/protocol/deviceid_test.go +++ b/lib/protocol/deviceid_test.go @@ -1,7 +1,7 @@ // Copyright (C) 2014 The Protocol Authors. //go:generate go run ../../script/protofmt.go deviceid_test.proto -//go:generate protoc -I ../../vendor/ -I ../../vendor/github.com/gogo/protobuf/protobuf -I . --gogofast_out=. deviceid_test.proto +//go:generate protoc -I ../../ -I . --gogofast_out=. deviceid_test.proto package protocol @@ -108,7 +108,7 @@ func TestNewDeviceIDMarshalling(t *testing.T) { // Create a message with a device ID in old style bytes format id0, _ := DeviceIDFromString(formatted) - msg0 := TestOldDeviceID{id0[:]} + msg0 := TestOldDeviceID{Test: id0[:]} // Marshal it diff --git a/lib/protocol/deviceid_test.pb.go b/lib/protocol/deviceid_test.pb.go index 4001c8c78..325f424ed 100644 --- a/lib/protocol/deviceid_test.pb.go +++ b/lib/protocol/deviceid_test.pb.go @@ -430,16 +430,16 @@ var ( func init() { proto.RegisterFile("deviceid_test.proto", fileDescriptorDeviceidTest) } var fileDescriptorDeviceidTest = []byte{ - // 176 bytes of a gzipped FileDescriptorProto + // 169 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4e, 0x49, 0x2d, 0xcb, 0x4c, 0x4e, 0xcd, 0x4c, 0x89, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, - 0xe2, 0x00, 0x53, 0xc9, 0xf9, 0x39, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, - 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0x99, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, - 0x01, 0xb3, 0x20, 0x1a, 0x95, 0x54, 0xb9, 0xf8, 0x43, 0x52, 0x8b, 0x4b, 0xfc, 0x73, 0x52, 0x5c, - 0xc0, 0xc6, 0x7a, 0xba, 0x08, 0x09, 0x71, 0xb1, 0x80, 0x4c, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, - 0x09, 0x02, 0xb3, 0x95, 0xcc, 0x21, 0xca, 0xfc, 0x52, 0xcb, 0xe1, 0xca, 0x54, 0x90, 0x95, 0x39, - 0x09, 0x9c, 0xb8, 0x27, 0xcf, 0x70, 0xeb, 0x9e, 0x3c, 0x07, 0x4c, 0x1e, 0xa2, 0xd1, 0x49, 0xe6, - 0xc4, 0x43, 0x39, 0x86, 0x0b, 0x0f, 0xe5, 0x18, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, - 0xf1, 0xc1, 0x23, 0x39, 0x86, 0x17, 0x8f, 0xe4, 0x18, 0x16, 0x3c, 0x96, 0x63, 0x4c, 0x62, 0x03, - 0x3b, 0xc2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x35, 0x9c, 0x00, 0x78, 0xd4, 0x00, 0x00, 0x00, + 0xe2, 0x00, 0x53, 0xc9, 0xf9, 0x39, 0x52, 0xca, 0x45, 0xa9, 0x05, 0xf9, 0xc5, 0xfa, 0x60, 0x7e, + 0x52, 0x69, 0x9a, 0x7e, 0x7a, 0x7e, 0x7a, 0x3e, 0x98, 0x03, 0x66, 0x41, 0x94, 0x2b, 0xa9, 0x72, + 0xf1, 0x87, 0xa4, 0x16, 0x97, 0xf8, 0xe7, 0xa4, 0xb8, 0x80, 0x0d, 0xf3, 0x74, 0x11, 0x12, 0xe2, + 0x62, 0x01, 0x99, 0x27, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x13, 0x04, 0x66, 0x2b, 0x99, 0x43, 0x94, + 0xf9, 0xa5, 0x96, 0xc3, 0x95, 0xa9, 0x20, 0x2b, 0x73, 0x12, 0x38, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, + 0x3d, 0x79, 0x0e, 0x98, 0x3c, 0x44, 0xa3, 0x93, 0xcc, 0x89, 0x87, 0x72, 0x0c, 0x17, 0x1e, 0xca, + 0x31, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x0c, 0x2f, 0x1e, + 0xc9, 0x31, 0x2c, 0x78, 0x2c, 0xc7, 0x98, 0xc4, 0x06, 0x76, 0x84, 0x31, 0x20, 0x00, 0x00, 0xff, + 0xff, 0x82, 0x8f, 0xec, 0x3e, 0xca, 0x00, 0x00, 0x00, } diff --git a/lib/protocol/deviceid_test.proto b/lib/protocol/deviceid_test.proto index 5451420a6..bb09c61e1 100644 --- a/lib/protocol/deviceid_test.proto +++ b/lib/protocol/deviceid_test.proto @@ -3,7 +3,7 @@ syntax = "proto3"; package protocol; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +import "repos/protobuf/gogoproto/gogo.proto"; option (gogoproto.goproto_getters_all) = false; option (gogoproto.sizer_all) = false; diff --git a/lib/protocol/hello_v0.13.go b/lib/protocol/hello_v0.13.go index e56f1d93e..ec85560fc 100644 --- a/lib/protocol/hello_v0.13.go +++ b/lib/protocol/hello_v0.13.go @@ -1,6 +1,6 @@ // Copyright (C) 2016 The Protocol Authors. -//go:generate -command genxdr go run ../../vendor/github.com/calmh/xdr/cmd/genxdr/main.go +//go:generate -command genxdr go run ../../repos/xdr/cmd/genxdr/main.go //go:generate genxdr -o hello_v0.13_xdr.go hello_v0.13.go package protocol diff --git a/lib/protocol/vector.go b/lib/protocol/vector.go index 3d02d4a34..5b8dad2c4 100644 --- a/lib/protocol/vector.go +++ b/lib/protocol/vector.go @@ -25,11 +25,11 @@ func (v Vector) Update(id ShortID) Vector { nv[i].ID = id nv[i].Value = 1 copy(nv[i+1:], v.Counters[i:]) - return Vector{nv} + return Vector{Counters: nv} } } // Append a new index - return Vector{append(v.Counters, Counter{id, 1})} + return Vector{Counters: append(v.Counters, Counter{ID: id, Value: 1})} } // Merge returns the vector containing the maximum indexes from v and b. If it @@ -40,7 +40,7 @@ func (v Vector) Merge(b Vector) Vector { for bi < len(b.Counters) { if vi == len(v.Counters) { // We've reach the end of v, all that remains are appends - return Vector{append(v.Counters, b.Counters[bi:]...)} + return Vector{Counters: append(v.Counters, b.Counters[bi:]...)} } if v.Counters[vi].ID > b.Counters[bi].ID { @@ -71,7 +71,7 @@ func (v Vector) Merge(b Vector) Vector { func (v Vector) Copy() Vector { nv := make([]Counter, len(v.Counters)) copy(nv, v.Counters) - return Vector{nv} + return Vector{Counters: nv} } // Equal returns true when the two vectors are equivalent. diff --git a/lib/protocol/vector_test.go b/lib/protocol/vector_test.go index d0f9c219e..eb700d400 100644 --- a/lib/protocol/vector_test.go +++ b/lib/protocol/vector_test.go @@ -13,7 +13,7 @@ func TestUpdate(t *testing.T) { // Append v = v.Update(42) - expected := Vector{[]Counter{{42, 1}}} + expected := Vector{Counters: []Counter{{ID: 42, Value: 1}}} if v.Compare(expected) != Equal { t.Errorf("Update error, %+v != %+v", v, expected) @@ -22,7 +22,7 @@ func TestUpdate(t *testing.T) { // Insert at front v = v.Update(36) - expected = Vector{[]Counter{{36, 1}, {42, 1}}} + expected = Vector{Counters: []Counter{{ID: 36, Value: 1}, {ID: 42, Value: 1}}} if v.Compare(expected) != Equal { t.Errorf("Update error, %+v != %+v", v, expected) @@ -31,7 +31,7 @@ func TestUpdate(t *testing.T) { // Insert in moddle v = v.Update(37) - expected = Vector{[]Counter{{36, 1}, {37, 1}, {42, 1}}} + expected = Vector{Counters: []Counter{{ID: 36, Value: 1}, {ID: 37, Value: 1}, {ID: 42, Value: 1}}} if v.Compare(expected) != Equal { t.Errorf("Update error, %+v != %+v", v, expected) @@ -40,7 +40,7 @@ func TestUpdate(t *testing.T) { // Update existing v = v.Update(37) - expected = Vector{[]Counter{{36, 1}, {37, 2}, {42, 1}}} + expected = Vector{Counters: []Counter{{ID: 36, Value: 1}, {ID: 37, Value: 2}, {ID: 42, Value: 1}}} if v.Compare(expected) != Equal { t.Errorf("Update error, %+v != %+v", v, expected) @@ -48,7 +48,7 @@ func TestUpdate(t *testing.T) { } func TestCopy(t *testing.T) { - v0 := Vector{[]Counter{{42, 1}}} + v0 := Vector{Counters: []Counter{{ID: 42, Value: 1}}} v1 := v0.Copy() v1.Update(42) if v0.Compare(v1) != Lesser { @@ -67,52 +67,52 @@ func TestMerge(t *testing.T) { Vector{}, }, { - Vector{[]Counter{{22, 1}, {42, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, }, // Appends { Vector{}, - Vector{[]Counter{{22, 1}, {42, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, }, { - Vector{[]Counter{{22, 1}}}, - Vector{[]Counter{{42, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, }, { - Vector{[]Counter{{22, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, }, // Insert { - Vector{[]Counter{{22, 1}, {42, 1}}}, - Vector{[]Counter{{22, 1}, {23, 2}, {42, 1}}}, - Vector{[]Counter{{22, 1}, {23, 2}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 23, Value: 2}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 23, Value: 2}, {ID: 42, Value: 1}}}, }, { - Vector{[]Counter{{42, 1}}}, - Vector{[]Counter{{22, 1}}}, - Vector{[]Counter{{22, 1}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 1}}}, }, // Update { - Vector{[]Counter{{22, 1}, {42, 2}}}, - Vector{[]Counter{{22, 2}, {42, 1}}}, - Vector{[]Counter{{22, 2}, {42, 2}}}, + Vector{Counters: []Counter{{ID: 22, Value: 1}, {ID: 42, Value: 2}}}, + Vector{Counters: []Counter{{ID: 22, Value: 2}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 2}, {ID: 42, Value: 2}}}, }, // All of the above { - Vector{[]Counter{{10, 1}, {20, 2}, {30, 1}}}, - Vector{[]Counter{{5, 1}, {10, 2}, {15, 1}, {20, 1}, {25, 1}, {35, 1}}}, - Vector{[]Counter{{5, 1}, {10, 2}, {15, 1}, {20, 2}, {25, 1}, {30, 1}, {35, 1}}}, + Vector{Counters: []Counter{{ID: 10, Value: 1}, {ID: 20, Value: 2}, {ID: 30, Value: 1}}}, + Vector{Counters: []Counter{{ID: 5, Value: 1}, {ID: 10, Value: 2}, {ID: 15, Value: 1}, {ID: 20, Value: 1}, {ID: 25, Value: 1}, {ID: 35, Value: 1}}}, + Vector{Counters: []Counter{{ID: 5, Value: 1}, {ID: 10, Value: 2}, {ID: 15, Value: 1}, {ID: 20, Value: 2}, {ID: 25, Value: 1}, {ID: 30, Value: 1}, {ID: 35, Value: 1}}}, }, } @@ -124,7 +124,7 @@ func TestMerge(t *testing.T) { } func TestCounterValue(t *testing.T) { - v0 := Vector{[]Counter{{42, 1}, {64, 5}}} + v0 := Vector{Counters: []Counter{{ID: 42, Value: 1}, {ID: 64, Value: 5}}} if v0.Counter(42) != 1 { t.Errorf("Counter error, %d != %d", v0.Counter(42), 1) } @@ -143,162 +143,162 @@ func TestCompare(t *testing.T) { }{ // Empty vectors are identical {Vector{}, Vector{}, Equal}, - {Vector{}, Vector{[]Counter{{42, 0}}}, Equal}, - {Vector{[]Counter{{42, 0}}}, Vector{}, Equal}, + {Vector{}, Vector{Counters: []Counter{{ID: 42, Value: 0}}}, Equal}, + {Vector{Counters: []Counter{{ID: 42, Value: 0}}}, Vector{}, Equal}, // Zero is the implied value for a missing Counter { - Vector{[]Counter{{42, 0}}}, - Vector{[]Counter{{77, 0}}}, + Vector{Counters: []Counter{{ID: 42, Value: 0}}}, + Vector{Counters: []Counter{{ID: 77, Value: 0}}}, Equal, }, // Equal vectors are equal { - Vector{[]Counter{{42, 33}}}, - Vector{[]Counter{{42, 33}}}, + Vector{Counters: []Counter{{ID: 42, Value: 33}}}, + Vector{Counters: []Counter{{ID: 42, Value: 33}}}, Equal, }, { - Vector{[]Counter{{42, 33}, {77, 24}}}, - Vector{[]Counter{{42, 33}, {77, 24}}}, + Vector{Counters: []Counter{{ID: 42, Value: 33}, {ID: 77, Value: 24}}}, + Vector{Counters: []Counter{{ID: 42, Value: 33}, {ID: 77, Value: 24}}}, Equal, }, // These a-vectors are all greater than the b-vector { - Vector{[]Counter{{42, 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, Vector{}, Greater, }, { - Vector{[]Counter{{0, 1}}}, - Vector{[]Counter{{0, 0}}}, + Vector{Counters: []Counter{{ID: 0, Value: 1}}}, + Vector{Counters: []Counter{{ID: 0, Value: 0}}}, Greater, }, { - Vector{[]Counter{{42, 1}}}, - Vector{[]Counter{{42, 0}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 0}}}, Greater, }, { - Vector{[]Counter{{math.MaxUint64, 1}}}, - Vector{[]Counter{{math.MaxUint64, 0}}}, + Vector{Counters: []Counter{{ID: math.MaxUint64, Value: 1}}}, + Vector{Counters: []Counter{{ID: math.MaxUint64, Value: 0}}}, Greater, }, { - Vector{[]Counter{{0, math.MaxUint64}}}, - Vector{[]Counter{{0, 0}}}, + Vector{Counters: []Counter{{ID: 0, Value: math.MaxUint64}}}, + Vector{Counters: []Counter{{ID: 0, Value: 0}}}, Greater, }, { - Vector{[]Counter{{42, math.MaxUint64}}}, - Vector{[]Counter{{42, 0}}}, + Vector{Counters: []Counter{{ID: 42, Value: math.MaxUint64}}}, + Vector{Counters: []Counter{{ID: 42, Value: 0}}}, Greater, }, { - Vector{[]Counter{{math.MaxUint64, math.MaxUint64}}}, - Vector{[]Counter{{math.MaxUint64, 0}}}, + Vector{Counters: []Counter{{ID: math.MaxUint64, Value: math.MaxUint64}}}, + Vector{Counters: []Counter{{ID: math.MaxUint64, Value: 0}}}, Greater, }, { - Vector{[]Counter{{0, math.MaxUint64}}}, - Vector{[]Counter{{0, math.MaxUint64 - 1}}}, + Vector{Counters: []Counter{{ID: 0, Value: math.MaxUint64}}}, + Vector{Counters: []Counter{{ID: 0, Value: math.MaxUint64 - 1}}}, Greater, }, { - Vector{[]Counter{{42, math.MaxUint64}}}, - Vector{[]Counter{{42, math.MaxUint64 - 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: math.MaxUint64}}}, + Vector{Counters: []Counter{{ID: 42, Value: math.MaxUint64 - 1}}}, Greater, }, { - Vector{[]Counter{{math.MaxUint64, math.MaxUint64}}}, - Vector{[]Counter{{math.MaxUint64, math.MaxUint64 - 1}}}, + Vector{Counters: []Counter{{ID: math.MaxUint64, Value: math.MaxUint64}}}, + Vector{Counters: []Counter{{ID: math.MaxUint64, Value: math.MaxUint64 - 1}}}, Greater, }, { - Vector{[]Counter{{42, 2}}}, - Vector{[]Counter{{42, 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 2}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, Greater, }, { - Vector{[]Counter{{22, 22}, {42, 2}}}, - Vector{[]Counter{{22, 22}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 2}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}}}, Greater, }, { - Vector{[]Counter{{42, 2}, {77, 3}}}, - Vector{[]Counter{{42, 1}, {77, 3}}}, + Vector{Counters: []Counter{{ID: 42, Value: 2}, {ID: 77, Value: 3}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}, {ID: 77, Value: 3}}}, Greater, }, { - Vector{[]Counter{{22, 22}, {42, 2}, {77, 3}}}, - Vector{[]Counter{{22, 22}, {42, 1}, {77, 3}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 2}, {ID: 77, Value: 3}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}, {ID: 77, Value: 3}}}, Greater, }, { - Vector{[]Counter{{22, 23}, {42, 2}, {77, 4}}}, - Vector{[]Counter{{22, 22}, {42, 1}, {77, 3}}}, + Vector{Counters: []Counter{{ID: 22, Value: 23}, {ID: 42, Value: 2}, {ID: 77, Value: 4}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}, {ID: 77, Value: 3}}}, Greater, }, // These a-vectors are all lesser than the b-vector - {Vector{}, Vector{[]Counter{{42, 1}}}, Lesser}, + {Vector{}, Vector{Counters: []Counter{{ID: 42, Value: 1}}}, Lesser}, { - Vector{[]Counter{{42, 0}}}, - Vector{[]Counter{{42, 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 0}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, Lesser, }, { - Vector{[]Counter{{42, 1}}}, - Vector{[]Counter{{42, 2}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 2}}}, Lesser, }, { - Vector{[]Counter{{22, 22}, {42, 1}}}, - Vector{[]Counter{{22, 22}, {42, 2}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 2}}}, Lesser, }, { - Vector{[]Counter{{42, 1}, {77, 3}}}, - Vector{[]Counter{{42, 2}, {77, 3}}}, + Vector{Counters: []Counter{{ID: 42, Value: 1}, {ID: 77, Value: 3}}}, + Vector{Counters: []Counter{{ID: 42, Value: 2}, {ID: 77, Value: 3}}}, Lesser, }, { - Vector{[]Counter{{22, 22}, {42, 1}, {77, 3}}}, - Vector{[]Counter{{22, 22}, {42, 2}, {77, 3}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}, {ID: 77, Value: 3}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 2}, {ID: 77, Value: 3}}}, Lesser, }, { - Vector{[]Counter{{22, 22}, {42, 1}, {77, 3}}}, - Vector{[]Counter{{22, 23}, {42, 2}, {77, 4}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}, {ID: 77, Value: 3}}}, + Vector{Counters: []Counter{{ID: 22, Value: 23}, {ID: 42, Value: 2}, {ID: 77, Value: 4}}}, Lesser, }, // These are all in conflict { - Vector{[]Counter{{42, 2}}}, - Vector{[]Counter{{43, 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 2}}}, + Vector{Counters: []Counter{{ID: 43, Value: 1}}}, ConcurrentGreater, }, { - Vector{[]Counter{{43, 1}}}, - Vector{[]Counter{{42, 2}}}, + Vector{Counters: []Counter{{ID: 43, Value: 1}}}, + Vector{Counters: []Counter{{ID: 42, Value: 2}}}, ConcurrentLesser, }, { - Vector{[]Counter{{22, 23}, {42, 1}}}, - Vector{[]Counter{{22, 22}, {42, 2}}}, + Vector{Counters: []Counter{{ID: 22, Value: 23}, {ID: 42, Value: 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 2}}}, ConcurrentGreater, }, { - Vector{[]Counter{{22, 21}, {42, 2}}}, - Vector{[]Counter{{22, 22}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 21}, {ID: 42, Value: 2}}}, + Vector{Counters: []Counter{{ID: 22, Value: 22}, {ID: 42, Value: 1}}}, ConcurrentLesser, }, { - Vector{[]Counter{{22, 21}, {42, 2}, {43, 1}}}, - Vector{[]Counter{{20, 1}, {22, 22}, {42, 1}}}, + Vector{Counters: []Counter{{ID: 22, Value: 21}, {ID: 42, Value: 2}, {ID: 43, Value: 1}}}, + Vector{Counters: []Counter{{ID: 20, Value: 1}, {ID: 22, Value: 22}, {ID: 42, Value: 1}}}, ConcurrentLesser, }, } diff --git a/lib/relay/protocol/packets.go b/lib/relay/protocol/packets.go index 0a7091ef6..9c329ec00 100644 --- a/lib/relay/protocol/packets.go +++ b/lib/relay/protocol/packets.go @@ -1,6 +1,6 @@ // Copyright (C) 2015 Audrius Butkevicius and Contributors (see the CONTRIBUTORS file). -//go:generate -command genxdr go run ../../../vendor/github.com/calmh/xdr/cmd/genxdr/main.go +//go:generate -command genxdr go run ../../../repos/xdr/cmd/genxdr/main.go //go:generate genxdr -o packets_xdr.go packets.go package protocol diff --git a/vendor/code.cloudfoundry.org/bytefmt/LICENSE b/vendor/code.cloudfoundry.org/bytefmt/LICENSE deleted file mode 100644 index f49a4e16e..000000000 --- a/vendor/code.cloudfoundry.org/bytefmt/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/code.cloudfoundry.org/bytefmt/bytes.go b/vendor/code.cloudfoundry.org/bytefmt/bytes.go deleted file mode 100644 index be47b64a9..000000000 --- a/vendor/code.cloudfoundry.org/bytefmt/bytes.go +++ /dev/null @@ -1,105 +0,0 @@ -// Package bytefmt contains helper methods and constants for converting to and from a human-readable byte format. -// -// bytefmt.ByteSize(100.5*bytefmt.MEGABYTE) // "100.5M" -// bytefmt.ByteSize(uint64(1024)) // "1K" -// -package bytefmt - -import ( - "errors" - "fmt" - "regexp" - "strconv" - "strings" -) - -const ( - BYTE = 1.0 - KILOBYTE = 1024 * BYTE - MEGABYTE = 1024 * KILOBYTE - GIGABYTE = 1024 * MEGABYTE - TERABYTE = 1024 * GIGABYTE -) - -var bytesPattern *regexp.Regexp = regexp.MustCompile(`(?i)^(-?\d+(?:\.\d+)?)([KMGT]i?B?|B)$`) - -var invalidByteQuantityError = errors.New("Byte quantity must be a positive integer with a unit of measurement like M, MB, MiB, G, GiB, or GB") - -// ByteSize returns a human-readable byte string of the form 10M, 12.5K, and so forth. The following units are available: -// T: Terabyte -// G: Gigabyte -// M: Megabyte -// K: Kilobyte -// B: Byte -// The unit that results in the smallest number greater than or equal to 1 is always chosen. -func ByteSize(bytes uint64) string { - unit := "" - value := float32(bytes) - - switch { - case bytes >= TERABYTE: - unit = "T" - value = value / TERABYTE - case bytes >= GIGABYTE: - unit = "G" - value = value / GIGABYTE - case bytes >= MEGABYTE: - unit = "M" - value = value / MEGABYTE - case bytes >= KILOBYTE: - unit = "K" - value = value / KILOBYTE - case bytes >= BYTE: - unit = "B" - case bytes == 0: - return "0" - } - - stringValue := fmt.Sprintf("%.1f", value) - stringValue = strings.TrimSuffix(stringValue, ".0") - return fmt.Sprintf("%s%s", stringValue, unit) -} - -// ToMegabytes parses a string formatted by ByteSize as megabytes. -func ToMegabytes(s string) (uint64, error) { - bytes, err := ToBytes(s) - if err != nil { - return 0, err - } - - return bytes / MEGABYTE, nil -} - -// ToBytes parses a string formatted by ByteSize as bytes. Note binary-prefixed and SI prefixed units both mean a base-2 units -// KB = K = KiB = 1024 -// MB = M = MiB = 1024 * K -// GB = G = GiB = 1024 * M -// TB = T = TiB = 1024 * G -func ToBytes(s string) (uint64, error) { - parts := bytesPattern.FindStringSubmatch(strings.TrimSpace(s)) - if len(parts) < 3 { - return 0, invalidByteQuantityError - } - - value, err := strconv.ParseFloat(parts[1], 64) - if err != nil || value <= 0 { - return 0, invalidByteQuantityError - } - - var bytes uint64 - unit := strings.ToUpper(parts[2]) - switch unit[:1] { - case "T": - bytes = uint64(value * TERABYTE) - case "G": - bytes = uint64(value * GIGABYTE) - case "M": - bytes = uint64(value * MEGABYTE) - case "K": - bytes = uint64(value * KILOBYTE) - case "B": - bytes = uint64(value * BYTE) - } - - return bytes, nil -} diff --git a/vendor/code.cloudfoundry.org/bytefmt/package.go b/vendor/code.cloudfoundry.org/bytefmt/package.go deleted file mode 100644 index 03429300b..000000000 --- a/vendor/code.cloudfoundry.org/bytefmt/package.go +++ /dev/null @@ -1 +0,0 @@ -package bytefmt // import "code.cloudfoundry.org/bytefmt" diff --git a/vendor/github.com/AudriusButkevicius/cli/.travis.yml b/vendor/github.com/AudriusButkevicius/cli/.travis.yml new file mode 100644 index 000000000..baf46abc6 --- /dev/null +++ b/vendor/github.com/AudriusButkevicius/cli/.travis.yml @@ -0,0 +1,6 @@ +language: go +go: 1.1 + +script: +- go vet ./... +- go test -v ./... diff --git a/vendor/github.com/AudriusButkevicius/cli/README.md b/vendor/github.com/AudriusButkevicius/cli/README.md new file mode 100644 index 000000000..2453c1af2 --- /dev/null +++ b/vendor/github.com/AudriusButkevicius/cli/README.md @@ -0,0 +1,280 @@ +[![Build Status](https://travis-ci.org/codegangsta/cli.png?branch=master)](https://travis-ci.org/codegangsta/cli) + +# cli.go +cli.go is simple, fast, and fun package for building command line apps in Go. The goal is to enable developers to write fast and distributable command line applications in an expressive way. + +You can view the API docs here: +http://godoc.org/github.com/codegangsta/cli + +## Overview +Command line apps are usually so tiny that there is absolutely no reason why your code should *not* be self-documenting. Things like generating help text and parsing command flags/options should not hinder productivity when writing a command line app. + +This is where cli.go comes into play. cli.go makes command line programming fun, organized, and expressive! + +## Installation +Make sure you have a working Go environment (go 1.1 is *required*). [See the install instructions](http://golang.org/doc/install.html). + +To install cli.go, simply run: +``` +$ go get github.com/codegangsta/cli +``` + +Make sure your PATH includes to the `$GOPATH/bin` directory so your commands can be easily used: +``` +export PATH=$PATH:$GOPATH/bin +``` + +## Getting Started +One of the philosophies behind cli.go is that an API should be playful and full of discovery. So a cli.go app can be as little as one line of code in `main()`. + +``` go +package main + +import ( + "os" + "github.com/codegangsta/cli" +) + +func main() { + cli.NewApp().Run(os.Args) +} +``` + +This app will run and show help text, but is not very useful. Let's give an action to execute and some help documentation: + +``` go +package main + +import ( + "os" + "github.com/codegangsta/cli" +) + +func main() { + app := cli.NewApp() + app.Name = "boom" + app.Usage = "make an explosive entrance" + app.Action = func(c *cli.Context) { + println("boom! I say!") + } + + app.Run(os.Args) +} +``` + +Running this already gives you a ton of functionality, plus support for things like subcommands and flags, which are covered below. + +## Example + +Being a programmer can be a lonely job. Thankfully by the power of automation that is not the case! Let's create a greeter app to fend off our demons of loneliness! + +``` go +/* greet.go */ +package main + +import ( + "os" + "github.com/codegangsta/cli" +) + +func main() { + app := cli.NewApp() + app.Name = "greet" + app.Usage = "fight the loneliness!" + app.Action = func(c *cli.Context) { + println("Hello friend!") + } + + app.Run(os.Args) +} +``` + +Install our command to the `$GOPATH/bin` directory: + +``` +$ go install +``` + +Finally run our new command: + +``` +$ greet +Hello friend! +``` + +cli.go also generates some bitchass help text: +``` +$ greet help +NAME: + greet - fight the loneliness! + +USAGE: + greet [global options] command [command options] [arguments...] + +VERSION: + 0.0.0 + +COMMANDS: + help, h Shows a list of commands or help for one command + +GLOBAL OPTIONS + --version Shows version information +``` + +### Arguments +You can lookup arguments by calling the `Args` function on cli.Context. + +``` go +... +app.Action = func(c *cli.Context) { + println("Hello", c.Args()[0]) +} +... +``` + +### Flags +Setting and querying flags is simple. +``` go +... +app.Flags = []cli.Flag { + cli.StringFlag{ + Name: "lang", + Value: "english", + Usage: "language for the greeting", + }, +} +app.Action = func(c *cli.Context) { + name := "someone" + if len(c.Args()) > 0 { + name = c.Args()[0] + } + if c.String("lang") == "spanish" { + println("Hola", name) + } else { + println("Hello", name) + } +} +... +``` + +#### Alternate Names + +You can set alternate (or short) names for flags by providing a comma-delimited list for the Name. e.g. + +``` go +app.Flags = []cli.Flag { + cli.StringFlag{ + Name: "lang, l", + Value: "english", + Usage: "language for the greeting", + }, +} +``` + +#### Values from the Environment + +You can also have the default value set from the environment via EnvVar. e.g. + +``` go +app.Flags = []cli.Flag { + cli.StringFlag{ + Name: "lang, l", + Value: "english", + Usage: "language for the greeting", + EnvVar: "APP_LANG", + }, +} +``` + +That flag can then be set with `--lang spanish` or `-l spanish`. Note that giving two different forms of the same flag in the same command invocation is an error. + +### Subcommands + +Subcommands can be defined for a more git-like command line app. +```go +... +app.Commands = []cli.Command{ + { + Name: "add", + ShortName: "a", + Usage: "add a task to the list", + Action: func(c *cli.Context) { + println("added task: ", c.Args().First()) + }, + }, + { + Name: "complete", + ShortName: "c", + Usage: "complete a task on the list", + Action: func(c *cli.Context) { + println("completed task: ", c.Args().First()) + }, + }, + { + Name: "template", + ShortName: "r", + Usage: "options for task templates", + Subcommands: []cli.Command{ + { + Name: "add", + Usage: "add a new template", + Action: func(c *cli.Context) { + println("new task template: ", c.Args().First()) + }, + }, + { + Name: "remove", + Usage: "remove an existing template", + Action: func(c *cli.Context) { + println("removed task template: ", c.Args().First()) + }, + }, + }, + }, +} +... +``` + +### Bash Completion + +You can enable completion commands by setting the EnableBashCompletion +flag on the App object. By default, this setting will only auto-complete to +show an app's subcommands, but you can write your own completion methods for +the App or its subcommands. +```go +... +var tasks = []string{"cook", "clean", "laundry", "eat", "sleep", "code"} +app := cli.NewApp() +app.EnableBashCompletion = true +app.Commands = []cli.Command{ + { + Name: "complete", + ShortName: "c", + Usage: "complete a task on the list", + Action: func(c *cli.Context) { + println("completed task: ", c.Args().First()) + }, + BashComplete: func(c *cli.Context) { + // This will complete if no args are passed + if len(c.Args()) > 0 { + return + } + for _, t := range tasks { + println(t) + } + }, + } +} +... +``` + +#### To Enable + +Source the autocomplete/bash_autocomplete file in your .bashrc file while +setting the PROG variable to the name of your program: + +`PROG=myprogram source /.../cli/autocomplete/bash_autocomplete` + + +## About +cli.go is written by none other than the [Code Gangsta](http://codegangsta.io) diff --git a/vendor/github.com/AudriusButkevicius/go-nat-pmp/README.md b/vendor/github.com/AudriusButkevicius/go-nat-pmp/README.md new file mode 100644 index 000000000..15f72fd81 --- /dev/null +++ b/vendor/github.com/AudriusButkevicius/go-nat-pmp/README.md @@ -0,0 +1,48 @@ +go-nat-pmp +========== + +A Go language client for the NAT-PMP internet protocol for port mapping and discovering the external +IP address of a firewall. + +NAT-PMP is supported by Apple brand routers and open source routers like Tomato and DD-WRT. + +See http://tools.ietf.org/html/draft-cheshire-nat-pmp-03 + +Get the package +--------------- + + go get -u github.com/jackpal/go-nat-pmp + +Usage +----- + + import natpmp "github.com/jackpal/go-nat-pmp" + + client := natpmp.NewClient(gatewayIP) + response, err := client.GetExternalAddress() + if err != nil { + return + } + print("External IP address:", response.ExternalIPAddress) + +Notes +----- + +There doesn't seem to be an easy way to programmatically determine the address of the default gateway. +(Linux and OSX have a "routes" kernel API that can be examined to get this information, but there is +no Go package for getting this information.) + +Clients +------- + +This library is used in the Taipei Torrent BitTorrent client http://github.com/jackpal/Taipei-Torrent + +Complete documentation +---------------------- + + http://godoc.org/github.com/jackpal/go-nat-pmp + +License +------- + +This project is licensed under the Apache License 2.0. diff --git a/vendor/github.com/AudriusButkevicius/pfilter/LICENSE b/vendor/github.com/AudriusButkevicius/pfilter/LICENSE deleted file mode 100644 index 8375a8170..000000000 --- a/vendor/github.com/AudriusButkevicius/pfilter/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Audrius Butkevicius - -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/AudriusButkevicius/pfilter/conn.go b/vendor/github.com/AudriusButkevicius/pfilter/conn.go deleted file mode 100644 index c5e6af5b5..000000000 --- a/vendor/github.com/AudriusButkevicius/pfilter/conn.go +++ /dev/null @@ -1,97 +0,0 @@ -package pfilter - -import ( - "net" - "sync/atomic" - "time" -) - -type FilteredConn struct { - // Alignment - deadline atomic.Value - - source *PacketFilter - priority int - - recvBuffer chan packet - - filter Filter - - closed chan struct{} -} - -// LocalAddr returns the local address -func (r *FilteredConn) LocalAddr() net.Addr { - return r.source.LocalAddr() -} - -// SetReadDeadline sets a read deadline -func (r *FilteredConn) SetReadDeadline(t time.Time) error { - r.deadline.Store(t) - return nil -} - -// SetWriteDeadline sets a write deadline -func (r *FilteredConn) SetWriteDeadline(t time.Time) error { - return r.source.SetWriteDeadline(t) -} - -// SetDeadline sets a read and a write deadline -func (r *FilteredConn) SetDeadline(t time.Time) error { - r.SetReadDeadline(t) - return r.SetWriteDeadline(t) -} - -// WriteTo writes bytes to the given address -func (r *FilteredConn) WriteTo(b []byte, addr net.Addr) (n int, err error) { - select { - case <-r.closed: - return 0, errClosed - default: - } - - if r.filter != nil { - r.filter.Outgoing(b, addr) - } - return r.source.WriteTo(b, addr) -} - -// ReadFrom reads from the filtered connection -func (r *FilteredConn) ReadFrom(b []byte) (n int, addr net.Addr, err error) { - select { - case <-r.closed: - return 0, nil, errClosed - default: - } - - var timeout <-chan time.Time - - if deadline, ok := r.deadline.Load().(time.Time); ok && !deadline.IsZero() { - timer := time.NewTimer(deadline.Sub(time.Now())) - timeout = timer.C - defer timer.Stop() - } - - select { - case <-timeout: - return 0, nil, errTimeout - case pkt := <-r.recvBuffer: - copy(b[:pkt.n], pkt.buf) - bufPool.Put(pkt.buf[:maxPacketSize]) - return pkt.n, pkt.addr, pkt.err - case <-r.closed: - return 0, nil, errClosed - } -} - -// Close closes the filtered connection, removing it's filters -func (r *FilteredConn) Close() error { - select { - case <-r.closed: - return errClosed - default: - } - close(r.closed) - r.source.removeConn(r) - return nil -} diff --git a/vendor/github.com/AudriusButkevicius/pfilter/filter.go b/vendor/github.com/AudriusButkevicius/pfilter/filter.go deleted file mode 100644 index f5e734772..000000000 --- a/vendor/github.com/AudriusButkevicius/pfilter/filter.go +++ /dev/null @@ -1,135 +0,0 @@ -package pfilter - -import ( - "net" - "sort" - "sync" - "sync/atomic" -) - -// Filter object receives all data sent out on the Outgoing callback, -// and is expected to decide if it wants to receive the packet or not via -// the Receive callback -type Filter interface { - Outgoing([]byte, net.Addr) - ClaimIncoming([]byte, net.Addr) bool -} - -// NewPacketFilter creates a packet filter object wrapping the given packet -// connection. -func NewPacketFilter(conn net.PacketConn) *PacketFilter { - d := &PacketFilter{ - PacketConn: conn, - } - return d -} - -// PacketFilter embeds a net.PacketConn to perform the filtering. -type PacketFilter struct { - // Alignment - dropped uint64 - overflow uint64 - - net.PacketConn - - conns []*FilteredConn - mut sync.Mutex -} - -// NewConn returns a new net.PacketConn object which filters packets based -// on the provided filter. If filter is nil, the connection will receive all -// packets. Priority decides which connection gets the ability to claim the packet. -func (d *PacketFilter) NewConn(priority int, filter Filter) net.PacketConn { - conn := &FilteredConn{ - priority: priority, - source: d, - recvBuffer: make(chan packet, 256), - filter: filter, - closed: make(chan struct{}), - } - d.mut.Lock() - d.conns = append(d.conns, conn) - sort.Sort(filteredConnList(d.conns)) - d.mut.Unlock() - return conn -} - -func (d *PacketFilter) removeConn(r *FilteredConn) { - d.mut.Lock() - for i, conn := range d.conns { - if conn == r { - copy(d.conns[i:], d.conns[i+1:]) - d.conns[len(d.conns)-1] = nil - d.conns = d.conns[:len(d.conns)-1] - break - } - } - d.mut.Unlock() -} - -// NumberOfConns returns the number of currently active virtual connections -func (d *PacketFilter) NumberOfConns() int { - d.mut.Lock() - n := len(d.conns) - d.mut.Unlock() - return n -} - -// Dropped returns number of packets dropped due to nobody claiming them. -func (d *PacketFilter) Dropped() uint64 { - return atomic.LoadUint64(&d.dropped) -} - -// Overflow returns number of packets were dropped due to receive buffers being -// full. -func (d *PacketFilter) Overflow() uint64 { - return atomic.LoadUint64(&d.overflow) -} - -// Start starts the packet filter. -func (d *PacketFilter) Start() { - go d.loop() -} - -func (d *PacketFilter) loop() { - var buf []byte -next: - for { - buf = bufPool.Get().([]byte) - n, addr, err := d.ReadFrom(buf) - pkt := packet{ - n: n, - addr: addr, - err: err, - buf: buf[:n], - } - - d.mut.Lock() - conns := d.conns - d.mut.Unlock() - - if err != nil { - for _, conn := range conns { - select { - case conn.recvBuffer <- pkt: - default: - atomic.AddUint64(&d.overflow, 1) - } - } - return - } - - for _, conn := range conns { - if conn.filter == nil || conn.filter.ClaimIncoming(pkt.buf, pkt.addr) { - select { - case conn.recvBuffer <- pkt: - default: - atomic.AddUint64(&d.overflow, 1) - } - goto next - } - } - - atomic.AddUint64(&d.dropped, 1) - } -} diff --git a/vendor/github.com/AudriusButkevicius/pfilter/misc.go b/vendor/github.com/AudriusButkevicius/pfilter/misc.go deleted file mode 100644 index 8151bf922..000000000 --- a/vendor/github.com/AudriusButkevicius/pfilter/misc.go +++ /dev/null @@ -1,51 +0,0 @@ -package pfilter - -import ( - "net" - "sync" -) - -var ( - maxPacketSize = 1500 - bufPool = sync.Pool{ - New: func() interface{} { - return make([]byte, maxPacketSize) - }, - } - errTimeout = &netError{ - msg: "i/o timeout", - timeout: true, - temporary: true, - } - errClosed = &netError{ - msg: "use of closed network connection", - timeout: false, - temporary: false, - } - - // Compile time interface assertion. - _ net.Error = (*netError)(nil) -) - -type netError struct { - msg string - timeout bool - temporary bool -} - -func (e *netError) Error() string { return e.msg } -func (e *netError) Timeout() bool { return e.timeout } -func (e *netError) Temporary() bool { return e.temporary } - -type filteredConnList []*FilteredConn - -func (r filteredConnList) Len() int { return len(r) } -func (r filteredConnList) Swap(i, j int) { r[i], r[j] = r[j], r[i] } -func (r filteredConnList) Less(i, j int) bool { return r[i].priority < r[j].priority } - -type packet struct { - n int - addr net.Addr - err error - buf []byte -} diff --git a/vendor/github.com/BurntSushi/toml/COPYING b/vendor/github.com/BurntSushi/toml/COPYING deleted file mode 100644 index 01b574320..000000000 --- a/vendor/github.com/BurntSushi/toml/COPYING +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 TOML authors - -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/BurntSushi/toml/cmd/toml-test-decoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go deleted file mode 100644 index 14e755700..000000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go +++ /dev/null @@ -1,90 +0,0 @@ -// Command toml-test-decoder satisfies the toml-test interface for testing -// TOML decoders. Namely, it accepts TOML on stdin and outputs JSON on stdout. -package main - -import ( - "encoding/json" - "flag" - "fmt" - "log" - "os" - "path" - "time" - - "github.com/BurntSushi/toml" -) - -func init() { - log.SetFlags(0) - - flag.Usage = usage - flag.Parse() -} - -func usage() { - log.Printf("Usage: %s < toml-file\n", path.Base(os.Args[0])) - flag.PrintDefaults() - - os.Exit(1) -} - -func main() { - if flag.NArg() != 0 { - flag.Usage() - } - - var tmp interface{} - if _, err := toml.DecodeReader(os.Stdin, &tmp); err != nil { - log.Fatalf("Error decoding TOML: %s", err) - } - - typedTmp := translate(tmp) - if err := json.NewEncoder(os.Stdout).Encode(typedTmp); err != nil { - log.Fatalf("Error encoding JSON: %s", err) - } -} - -func translate(tomlData interface{}) interface{} { - switch orig := tomlData.(type) { - case map[string]interface{}: - typed := make(map[string]interface{}, len(orig)) - for k, v := range orig { - typed[k] = translate(v) - } - return typed - case []map[string]interface{}: - typed := make([]map[string]interface{}, len(orig)) - for i, v := range orig { - typed[i] = translate(v).(map[string]interface{}) - } - return typed - case []interface{}: - typed := make([]interface{}, len(orig)) - for i, v := range orig { - typed[i] = translate(v) - } - - // We don't really need to tag arrays, but let's be future proof. - // (If TOML ever supports tuples, we'll need this.) - return tag("array", typed) - case time.Time: - return tag("datetime", orig.Format("2006-01-02T15:04:05Z")) - case bool: - return tag("bool", fmt.Sprintf("%v", orig)) - case int64: - return tag("integer", fmt.Sprintf("%d", orig)) - case float64: - return tag("float", fmt.Sprintf("%v", orig)) - case string: - return tag("string", orig) - } - - panic(fmt.Sprintf("Unknown type: %T", tomlData)) -} - -func tag(typeName string, data interface{}) map[string]interface{} { - return map[string]interface{}{ - "type": typeName, - "value": data, - } -} diff --git a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go b/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go deleted file mode 100644 index 092cc6844..000000000 --- a/vendor/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go +++ /dev/null @@ -1,131 +0,0 @@ -// Command toml-test-encoder satisfies the toml-test interface for testing -// TOML encoders. Namely, it accepts JSON on stdin and outputs TOML on stdout. -package main - -import ( - "encoding/json" - "flag" - "log" - "os" - "path" - "strconv" - "time" - - "github.com/BurntSushi/toml" -) - -func init() { - log.SetFlags(0) - - flag.Usage = usage - flag.Parse() -} - -func usage() { - log.Printf("Usage: %s < json-file\n", path.Base(os.Args[0])) - flag.PrintDefaults() - - os.Exit(1) -} - -func main() { - if flag.NArg() != 0 { - flag.Usage() - } - - var tmp interface{} - if err := json.NewDecoder(os.Stdin).Decode(&tmp); err != nil { - log.Fatalf("Error decoding JSON: %s", err) - } - - tomlData := translate(tmp) - if err := toml.NewEncoder(os.Stdout).Encode(tomlData); err != nil { - log.Fatalf("Error encoding TOML: %s", err) - } -} - -func translate(typedJson interface{}) interface{} { - switch v := typedJson.(type) { - case map[string]interface{}: - if len(v) == 2 && in("type", v) && in("value", v) { - return untag(v) - } - m := make(map[string]interface{}, len(v)) - for k, v2 := range v { - m[k] = translate(v2) - } - return m - case []interface{}: - tabArray := make([]map[string]interface{}, len(v)) - for i := range v { - if m, ok := translate(v[i]).(map[string]interface{}); ok { - tabArray[i] = m - } else { - log.Fatalf("JSON arrays may only contain objects. This " + - "corresponds to only tables being allowed in " + - "TOML table arrays.") - } - } - return tabArray - } - log.Fatalf("Unrecognized JSON format '%T'.", typedJson) - panic("unreachable") -} - -func untag(typed map[string]interface{}) interface{} { - t := typed["type"].(string) - v := typed["value"] - switch t { - case "string": - return v.(string) - case "integer": - v := v.(string) - n, err := strconv.Atoi(v) - if err != nil { - log.Fatalf("Could not parse '%s' as integer: %s", v, err) - } - return n - case "float": - v := v.(string) - f, err := strconv.ParseFloat(v, 64) - if err != nil { - log.Fatalf("Could not parse '%s' as float64: %s", v, err) - } - return f - case "datetime": - v := v.(string) - t, err := time.Parse("2006-01-02T15:04:05Z", v) - if err != nil { - log.Fatalf("Could not parse '%s' as a datetime: %s", v, err) - } - return t - case "bool": - v := v.(string) - switch v { - case "true": - return true - case "false": - return false - } - log.Fatalf("Could not parse '%s' as a boolean.", v) - case "array": - v := v.([]interface{}) - array := make([]interface{}, len(v)) - for i := range v { - if m, ok := v[i].(map[string]interface{}); ok { - array[i] = untag(m) - } else { - log.Fatalf("Arrays may only contain other arrays or "+ - "primitive values, but found a '%T'.", m) - } - } - return array - } - log.Fatalf("Unrecognized tag type '%s'.", t) - panic("unreachable") -} - -func in(key string, m map[string]interface{}) bool { - _, ok := m[key] - return ok -} diff --git a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go b/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go deleted file mode 100644 index c7d689a7e..000000000 --- a/vendor/github.com/BurntSushi/toml/cmd/tomlv/main.go +++ /dev/null @@ -1,61 +0,0 @@ -// Command tomlv validates TOML documents and prints each key's type. -package main - -import ( - "flag" - "fmt" - "log" - "os" - "path" - "strings" - "text/tabwriter" - - "github.com/BurntSushi/toml" -) - -var ( - flagTypes = false -) - -func init() { - log.SetFlags(0) - - flag.BoolVar(&flagTypes, "types", flagTypes, - "When set, the types of every defined key will be shown.") - - flag.Usage = usage - flag.Parse() -} - -func usage() { - log.Printf("Usage: %s toml-file [ toml-file ... ]\n", - path.Base(os.Args[0])) - flag.PrintDefaults() - - os.Exit(1) -} - -func main() { - if flag.NArg() < 1 { - flag.Usage() - } - for _, f := range flag.Args() { - var tmp interface{} - md, err := toml.DecodeFile(f, &tmp) - if err != nil { - log.Fatalf("Error in '%s': %s", f, err) - } - if flagTypes { - printTypes(md) - } - } -} - -func printTypes(md toml.MetaData) { - tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0) - for _, key := range md.Keys() { - fmt.Fprintf(tabw, "%s%s\t%s\n", - strings.Repeat(" ", len(key)-1), key, md.Type(key...)) - } - tabw.Flush() -} diff --git a/vendor/github.com/BurntSushi/toml/decode.go b/vendor/github.com/BurntSushi/toml/decode.go deleted file mode 100644 index b0fd51d5b..000000000 --- a/vendor/github.com/BurntSushi/toml/decode.go +++ /dev/null @@ -1,509 +0,0 @@ -package toml - -import ( - "fmt" - "io" - "io/ioutil" - "math" - "reflect" - "strings" - "time" -) - -func e(format string, args ...interface{}) error { - return fmt.Errorf("toml: "+format, args...) -} - -// Unmarshaler is the interface implemented by objects that can unmarshal a -// TOML description of themselves. -type Unmarshaler interface { - UnmarshalTOML(interface{}) error -} - -// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`. -func Unmarshal(p []byte, v interface{}) error { - _, err := Decode(string(p), v) - return err -} - -// Primitive is a TOML value that hasn't been decoded into a Go value. -// When using the various `Decode*` functions, the type `Primitive` may -// be given to any value, and its decoding will be delayed. -// -// A `Primitive` value can be decoded using the `PrimitiveDecode` function. -// -// The underlying representation of a `Primitive` value is subject to change. -// Do not rely on it. -// -// N.B. Primitive values are still parsed, so using them will only avoid -// the overhead of reflection. They can be useful when you don't know the -// exact type of TOML data until run time. -type Primitive struct { - undecoded interface{} - context Key -} - -// DEPRECATED! -// -// Use MetaData.PrimitiveDecode instead. -func PrimitiveDecode(primValue Primitive, v interface{}) error { - md := MetaData{decoded: make(map[string]bool)} - return md.unify(primValue.undecoded, rvalue(v)) -} - -// PrimitiveDecode is just like the other `Decode*` functions, except it -// decodes a TOML value that has already been parsed. Valid primitive values -// can *only* be obtained from values filled by the decoder functions, -// including this method. (i.e., `v` may contain more `Primitive` -// values.) -// -// Meta data for primitive values is included in the meta data returned by -// the `Decode*` functions with one exception: keys returned by the Undecoded -// method will only reflect keys that were decoded. Namely, any keys hidden -// behind a Primitive will be considered undecoded. Executing this method will -// update the undecoded keys in the meta data. (See the example.) -func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error { - md.context = primValue.context - defer func() { md.context = nil }() - return md.unify(primValue.undecoded, rvalue(v)) -} - -// Decode will decode the contents of `data` in TOML format into a pointer -// `v`. -// -// TOML hashes correspond to Go structs or maps. (Dealer's choice. They can be -// used interchangeably.) -// -// TOML arrays of tables correspond to either a slice of structs or a slice -// of maps. -// -// TOML datetimes correspond to Go `time.Time` values. -// -// All other TOML types (float, string, int, bool and array) correspond -// to the obvious Go types. -// -// An exception to the above rules is if a type implements the -// encoding.TextUnmarshaler interface. In this case, any primitive TOML value -// (floats, strings, integers, booleans and datetimes) will be converted to -// a byte string and given to the value's UnmarshalText method. See the -// Unmarshaler example for a demonstration with time duration strings. -// -// Key mapping -// -// TOML keys can map to either keys in a Go map or field names in a Go -// struct. The special `toml` struct tag may be used to map TOML keys to -// struct fields that don't match the key name exactly. (See the example.) -// A case insensitive match to struct names will be tried if an exact match -// can't be found. -// -// The mapping between TOML values and Go values is loose. That is, there -// may exist TOML values that cannot be placed into your representation, and -// there may be parts of your representation that do not correspond to -// TOML values. This loose mapping can be made stricter by using the IsDefined -// and/or Undecoded methods on the MetaData returned. -// -// This decoder will not handle cyclic types. If a cyclic type is passed, -// `Decode` will not terminate. -func Decode(data string, v interface{}) (MetaData, error) { - rv := reflect.ValueOf(v) - if rv.Kind() != reflect.Ptr { - return MetaData{}, e("Decode of non-pointer %s", reflect.TypeOf(v)) - } - if rv.IsNil() { - return MetaData{}, e("Decode of nil %s", reflect.TypeOf(v)) - } - p, err := parse(data) - if err != nil { - return MetaData{}, err - } - md := MetaData{ - p.mapping, p.types, p.ordered, - make(map[string]bool, len(p.ordered)), nil, - } - return md, md.unify(p.mapping, indirect(rv)) -} - -// DecodeFile is just like Decode, except it will automatically read the -// contents of the file at `fpath` and decode it for you. -func DecodeFile(fpath string, v interface{}) (MetaData, error) { - bs, err := ioutil.ReadFile(fpath) - if err != nil { - return MetaData{}, err - } - return Decode(string(bs), v) -} - -// DecodeReader is just like Decode, except it will consume all bytes -// from the reader and decode it for you. -func DecodeReader(r io.Reader, v interface{}) (MetaData, error) { - bs, err := ioutil.ReadAll(r) - if err != nil { - return MetaData{}, err - } - return Decode(string(bs), v) -} - -// unify performs a sort of type unification based on the structure of `rv`, -// which is the client representation. -// -// Any type mismatch produces an error. Finding a type that we don't know -// how to handle produces an unsupported type error. -func (md *MetaData) unify(data interface{}, rv reflect.Value) error { - - // Special case. Look for a `Primitive` value. - if rv.Type() == reflect.TypeOf((*Primitive)(nil)).Elem() { - // Save the undecoded data and the key context into the primitive - // value. - context := make(Key, len(md.context)) - copy(context, md.context) - rv.Set(reflect.ValueOf(Primitive{ - undecoded: data, - context: context, - })) - return nil - } - - // Special case. Unmarshaler Interface support. - if rv.CanAddr() { - if v, ok := rv.Addr().Interface().(Unmarshaler); ok { - return v.UnmarshalTOML(data) - } - } - - // Special case. Handle time.Time values specifically. - // TODO: Remove this code when we decide to drop support for Go 1.1. - // This isn't necessary in Go 1.2 because time.Time satisfies the encoding - // interfaces. - if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) { - return md.unifyDatetime(data, rv) - } - - // Special case. Look for a value satisfying the TextUnmarshaler interface. - if v, ok := rv.Interface().(TextUnmarshaler); ok { - return md.unifyText(data, v) - } - // BUG(burntsushi) - // The behavior here is incorrect whenever a Go type satisfies the - // encoding.TextUnmarshaler interface but also corresponds to a TOML - // hash or array. In particular, the unmarshaler should only be applied - // to primitive TOML values. But at this point, it will be applied to - // all kinds of values and produce an incorrect error whenever those values - // are hashes or arrays (including arrays of tables). - - k := rv.Kind() - - // laziness - if k >= reflect.Int && k <= reflect.Uint64 { - return md.unifyInt(data, rv) - } - switch k { - case reflect.Ptr: - elem := reflect.New(rv.Type().Elem()) - err := md.unify(data, reflect.Indirect(elem)) - if err != nil { - return err - } - rv.Set(elem) - return nil - case reflect.Struct: - return md.unifyStruct(data, rv) - case reflect.Map: - return md.unifyMap(data, rv) - case reflect.Array: - return md.unifyArray(data, rv) - case reflect.Slice: - return md.unifySlice(data, rv) - case reflect.String: - return md.unifyString(data, rv) - case reflect.Bool: - return md.unifyBool(data, rv) - case reflect.Interface: - // we only support empty interfaces. - if rv.NumMethod() > 0 { - return e("unsupported type %s", rv.Type()) - } - return md.unifyAnything(data, rv) - case reflect.Float32: - fallthrough - case reflect.Float64: - return md.unifyFloat64(data, rv) - } - return e("unsupported type %s", rv.Kind()) -} - -func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error { - tmap, ok := mapping.(map[string]interface{}) - if !ok { - if mapping == nil { - return nil - } - return e("type mismatch for %s: expected table but found %T", - rv.Type().String(), mapping) - } - - for key, datum := range tmap { - var f *field - fields := cachedTypeFields(rv.Type()) - for i := range fields { - ff := &fields[i] - if ff.name == key { - f = ff - break - } - if f == nil && strings.EqualFold(ff.name, key) { - f = ff - } - } - if f != nil { - subv := rv - for _, i := range f.index { - subv = indirect(subv.Field(i)) - } - if isUnifiable(subv) { - md.decoded[md.context.add(key).String()] = true - md.context = append(md.context, key) - if err := md.unify(datum, subv); err != nil { - return err - } - md.context = md.context[0 : len(md.context)-1] - } else if f.name != "" { - // Bad user! No soup for you! - return e("cannot write unexported field %s.%s", - rv.Type().String(), f.name) - } - } - } - return nil -} - -func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error { - tmap, ok := mapping.(map[string]interface{}) - if !ok { - if tmap == nil { - return nil - } - return badtype("map", mapping) - } - if rv.IsNil() { - rv.Set(reflect.MakeMap(rv.Type())) - } - for k, v := range tmap { - md.decoded[md.context.add(k).String()] = true - md.context = append(md.context, k) - - rvkey := indirect(reflect.New(rv.Type().Key())) - rvval := reflect.Indirect(reflect.New(rv.Type().Elem())) - if err := md.unify(v, rvval); err != nil { - return err - } - md.context = md.context[0 : len(md.context)-1] - - rvkey.SetString(k) - rv.SetMapIndex(rvkey, rvval) - } - return nil -} - -func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error { - datav := reflect.ValueOf(data) - if datav.Kind() != reflect.Slice { - if !datav.IsValid() { - return nil - } - return badtype("slice", data) - } - sliceLen := datav.Len() - if sliceLen != rv.Len() { - return e("expected array length %d; got TOML array of length %d", - rv.Len(), sliceLen) - } - return md.unifySliceArray(datav, rv) -} - -func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error { - datav := reflect.ValueOf(data) - if datav.Kind() != reflect.Slice { - if !datav.IsValid() { - return nil - } - return badtype("slice", data) - } - n := datav.Len() - if rv.IsNil() || rv.Cap() < n { - rv.Set(reflect.MakeSlice(rv.Type(), n, n)) - } - rv.SetLen(n) - return md.unifySliceArray(datav, rv) -} - -func (md *MetaData) unifySliceArray(data, rv reflect.Value) error { - sliceLen := data.Len() - for i := 0; i < sliceLen; i++ { - v := data.Index(i).Interface() - sliceval := indirect(rv.Index(i)) - if err := md.unify(v, sliceval); err != nil { - return err - } - } - return nil -} - -func (md *MetaData) unifyDatetime(data interface{}, rv reflect.Value) error { - if _, ok := data.(time.Time); ok { - rv.Set(reflect.ValueOf(data)) - return nil - } - return badtype("time.Time", data) -} - -func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error { - if s, ok := data.(string); ok { - rv.SetString(s) - return nil - } - return badtype("string", data) -} - -func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error { - if num, ok := data.(float64); ok { - switch rv.Kind() { - case reflect.Float32: - fallthrough - case reflect.Float64: - rv.SetFloat(num) - default: - panic("bug") - } - return nil - } - return badtype("float", data) -} - -func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error { - if num, ok := data.(int64); ok { - if rv.Kind() >= reflect.Int && rv.Kind() <= reflect.Int64 { - switch rv.Kind() { - case reflect.Int, reflect.Int64: - // No bounds checking necessary. - case reflect.Int8: - if num < math.MinInt8 || num > math.MaxInt8 { - return e("value %d is out of range for int8", num) - } - case reflect.Int16: - if num < math.MinInt16 || num > math.MaxInt16 { - return e("value %d is out of range for int16", num) - } - case reflect.Int32: - if num < math.MinInt32 || num > math.MaxInt32 { - return e("value %d is out of range for int32", num) - } - } - rv.SetInt(num) - } else if rv.Kind() >= reflect.Uint && rv.Kind() <= reflect.Uint64 { - unum := uint64(num) - switch rv.Kind() { - case reflect.Uint, reflect.Uint64: - // No bounds checking necessary. - case reflect.Uint8: - if num < 0 || unum > math.MaxUint8 { - return e("value %d is out of range for uint8", num) - } - case reflect.Uint16: - if num < 0 || unum > math.MaxUint16 { - return e("value %d is out of range for uint16", num) - } - case reflect.Uint32: - if num < 0 || unum > math.MaxUint32 { - return e("value %d is out of range for uint32", num) - } - } - rv.SetUint(unum) - } else { - panic("unreachable") - } - return nil - } - return badtype("integer", data) -} - -func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error { - if b, ok := data.(bool); ok { - rv.SetBool(b) - return nil - } - return badtype("boolean", data) -} - -func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error { - rv.Set(reflect.ValueOf(data)) - return nil -} - -func (md *MetaData) unifyText(data interface{}, v TextUnmarshaler) error { - var s string - switch sdata := data.(type) { - case TextMarshaler: - text, err := sdata.MarshalText() - if err != nil { - return err - } - s = string(text) - case fmt.Stringer: - s = sdata.String() - case string: - s = sdata - case bool: - s = fmt.Sprintf("%v", sdata) - case int64: - s = fmt.Sprintf("%d", sdata) - case float64: - s = fmt.Sprintf("%f", sdata) - default: - return badtype("primitive (string-like)", data) - } - if err := v.UnmarshalText([]byte(s)); err != nil { - return err - } - return nil -} - -// rvalue returns a reflect.Value of `v`. All pointers are resolved. -func rvalue(v interface{}) reflect.Value { - return indirect(reflect.ValueOf(v)) -} - -// indirect returns the value pointed to by a pointer. -// Pointers are followed until the value is not a pointer. -// New values are allocated for each nil pointer. -// -// An exception to this rule is if the value satisfies an interface of -// interest to us (like encoding.TextUnmarshaler). -func indirect(v reflect.Value) reflect.Value { - if v.Kind() != reflect.Ptr { - if v.CanSet() { - pv := v.Addr() - if _, ok := pv.Interface().(TextUnmarshaler); ok { - return pv - } - } - return v - } - if v.IsNil() { - v.Set(reflect.New(v.Type().Elem())) - } - return indirect(reflect.Indirect(v)) -} - -func isUnifiable(rv reflect.Value) bool { - if rv.CanSet() { - return true - } - if _, ok := rv.Interface().(TextUnmarshaler); ok { - return true - } - return false -} - -func badtype(expected string, data interface{}) error { - return e("cannot load TOML value of type %T into a Go %s", data, expected) -} diff --git a/vendor/github.com/BurntSushi/toml/decode_meta.go b/vendor/github.com/BurntSushi/toml/decode_meta.go deleted file mode 100644 index b9914a679..000000000 --- a/vendor/github.com/BurntSushi/toml/decode_meta.go +++ /dev/null @@ -1,121 +0,0 @@ -package toml - -import "strings" - -// MetaData allows access to meta information about TOML data that may not -// be inferrable via reflection. In particular, whether a key has been defined -// and the TOML type of a key. -type MetaData struct { - mapping map[string]interface{} - types map[string]tomlType - keys []Key - decoded map[string]bool - context Key // Used only during decoding. -} - -// IsDefined returns true if the key given exists in the TOML data. The key -// should be specified hierarchially. e.g., -// -// // access the TOML key 'a.b.c' -// IsDefined("a", "b", "c") -// -// IsDefined will return false if an empty key given. Keys are case sensitive. -func (md *MetaData) IsDefined(key ...string) bool { - if len(key) == 0 { - return false - } - - var hash map[string]interface{} - var ok bool - var hashOrVal interface{} = md.mapping - for _, k := range key { - if hash, ok = hashOrVal.(map[string]interface{}); !ok { - return false - } - if hashOrVal, ok = hash[k]; !ok { - return false - } - } - return true -} - -// Type returns a string representation of the type of the key specified. -// -// Type will return the empty string if given an empty key or a key that -// does not exist. Keys are case sensitive. -func (md *MetaData) Type(key ...string) string { - fullkey := strings.Join(key, ".") - if typ, ok := md.types[fullkey]; ok { - return typ.typeString() - } - return "" -} - -// Key is the type of any TOML key, including key groups. Use (MetaData).Keys -// to get values of this type. -type Key []string - -func (k Key) String() string { - return strings.Join(k, ".") -} - -func (k Key) maybeQuotedAll() string { - var ss []string - for i := range k { - ss = append(ss, k.maybeQuoted(i)) - } - return strings.Join(ss, ".") -} - -func (k Key) maybeQuoted(i int) string { - quote := false - for _, c := range k[i] { - if !isBareKeyChar(c) { - quote = true - break - } - } - if quote { - return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\"" - } - return k[i] -} - -func (k Key) add(piece string) Key { - newKey := make(Key, len(k)+1) - copy(newKey, k) - newKey[len(k)] = piece - return newKey -} - -// Keys returns a slice of every key in the TOML data, including key groups. -// Each key is itself a slice, where the first element is the top of the -// hierarchy and the last is the most specific. -// -// The list will have the same order as the keys appeared in the TOML data. -// -// All keys returned are non-empty. -func (md *MetaData) Keys() []Key { - return md.keys -} - -// Undecoded returns all keys that have not been decoded in the order in which -// they appear in the original TOML document. -// -// This includes keys that haven't been decoded because of a Primitive value. -// Once the Primitive value is decoded, the keys will be considered decoded. -// -// Also note that decoding into an empty interface will result in no decoding, -// and so no keys will be considered decoded. -// -// In this sense, the Undecoded keys correspond to keys in the TOML document -// that do not have a concrete type in your representation. -func (md *MetaData) Undecoded() []Key { - undecoded := make([]Key, 0, len(md.keys)) - for _, key := range md.keys { - if !md.decoded[key.String()] { - undecoded = append(undecoded, key) - } - } - return undecoded -} diff --git a/vendor/github.com/BurntSushi/toml/doc.go b/vendor/github.com/BurntSushi/toml/doc.go deleted file mode 100644 index b371f396e..000000000 --- a/vendor/github.com/BurntSushi/toml/doc.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -Package toml provides facilities for decoding and encoding TOML configuration -files via reflection. There is also support for delaying decoding with -the Primitive type, and querying the set of keys in a TOML document with the -MetaData type. - -The specification implemented: https://github.com/toml-lang/toml - -The sub-command github.com/BurntSushi/toml/cmd/tomlv can be used to verify -whether a file is a valid TOML document. It can also be used to print the -type of each key in a TOML document. - -Testing - -There are two important types of tests used for this package. The first is -contained inside '*_test.go' files and uses the standard Go unit testing -framework. These tests are primarily devoted to holistically testing the -decoder and encoder. - -The second type of testing is used to verify the implementation's adherence -to the TOML specification. These tests have been factored into their own -project: https://github.com/BurntSushi/toml-test - -The reason the tests are in a separate project is so that they can be used by -any implementation of TOML. Namely, it is language agnostic. -*/ -package toml diff --git a/vendor/github.com/BurntSushi/toml/encode.go b/vendor/github.com/BurntSushi/toml/encode.go deleted file mode 100644 index d905c21a2..000000000 --- a/vendor/github.com/BurntSushi/toml/encode.go +++ /dev/null @@ -1,568 +0,0 @@ -package toml - -import ( - "bufio" - "errors" - "fmt" - "io" - "reflect" - "sort" - "strconv" - "strings" - "time" -) - -type tomlEncodeError struct{ error } - -var ( - errArrayMixedElementTypes = errors.New( - "toml: cannot encode array with mixed element types") - errArrayNilElement = errors.New( - "toml: cannot encode array with nil element") - errNonString = errors.New( - "toml: cannot encode a map with non-string key type") - errAnonNonStruct = errors.New( - "toml: cannot encode an anonymous field that is not a struct") - errArrayNoTable = errors.New( - "toml: TOML array element cannot contain a table") - errNoKey = errors.New( - "toml: top-level values must be Go maps or structs") - errAnything = errors.New("") // used in testing -) - -var quotedReplacer = strings.NewReplacer( - "\t", "\\t", - "\n", "\\n", - "\r", "\\r", - "\"", "\\\"", - "\\", "\\\\", -) - -// Encoder controls the encoding of Go values to a TOML document to some -// io.Writer. -// -// The indentation level can be controlled with the Indent field. -type Encoder struct { - // A single indentation level. By default it is two spaces. - Indent string - - // hasWritten is whether we have written any output to w yet. - hasWritten bool - w *bufio.Writer -} - -// NewEncoder returns a TOML encoder that encodes Go values to the io.Writer -// given. By default, a single indentation level is 2 spaces. -func NewEncoder(w io.Writer) *Encoder { - return &Encoder{ - w: bufio.NewWriter(w), - Indent: " ", - } -} - -// Encode writes a TOML representation of the Go value to the underlying -// io.Writer. If the value given cannot be encoded to a valid TOML document, -// then an error is returned. -// -// The mapping between Go values and TOML values should be precisely the same -// as for the Decode* functions. Similarly, the TextMarshaler interface is -// supported by encoding the resulting bytes as strings. (If you want to write -// arbitrary binary data then you will need to use something like base64 since -// TOML does not have any binary types.) -// -// When encoding TOML hashes (i.e., Go maps or structs), keys without any -// sub-hashes are encoded first. -// -// If a Go map is encoded, then its keys are sorted alphabetically for -// deterministic output. More control over this behavior may be provided if -// there is demand for it. -// -// Encoding Go values without a corresponding TOML representation---like map -// types with non-string keys---will cause an error to be returned. Similarly -// for mixed arrays/slices, arrays/slices with nil elements, embedded -// non-struct types and nested slices containing maps or structs. -// (e.g., [][]map[string]string is not allowed but []map[string]string is OK -// and so is []map[string][]string.) -func (enc *Encoder) Encode(v interface{}) error { - rv := eindirect(reflect.ValueOf(v)) - if err := enc.safeEncode(Key([]string{}), rv); err != nil { - return err - } - return enc.w.Flush() -} - -func (enc *Encoder) safeEncode(key Key, rv reflect.Value) (err error) { - defer func() { - if r := recover(); r != nil { - if terr, ok := r.(tomlEncodeError); ok { - err = terr.error - return - } - panic(r) - } - }() - enc.encode(key, rv) - return nil -} - -func (enc *Encoder) encode(key Key, rv reflect.Value) { - // Special case. Time needs to be in ISO8601 format. - // Special case. If we can marshal the type to text, then we used that. - // Basically, this prevents the encoder for handling these types as - // generic structs (or whatever the underlying type of a TextMarshaler is). - switch rv.Interface().(type) { - case time.Time, TextMarshaler: - enc.keyEqElement(key, rv) - return - } - - k := rv.Kind() - switch k { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, - reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, - reflect.Uint64, - reflect.Float32, reflect.Float64, reflect.String, reflect.Bool: - enc.keyEqElement(key, rv) - case reflect.Array, reflect.Slice: - if typeEqual(tomlArrayHash, tomlTypeOfGo(rv)) { - enc.eArrayOfTables(key, rv) - } else { - enc.keyEqElement(key, rv) - } - case reflect.Interface: - if rv.IsNil() { - return - } - enc.encode(key, rv.Elem()) - case reflect.Map: - if rv.IsNil() { - return - } - enc.eTable(key, rv) - case reflect.Ptr: - if rv.IsNil() { - return - } - enc.encode(key, rv.Elem()) - case reflect.Struct: - enc.eTable(key, rv) - default: - panic(e("unsupported type for key '%s': %s", key, k)) - } -} - -// eElement encodes any value that can be an array element (primitives and -// arrays). -func (enc *Encoder) eElement(rv reflect.Value) { - switch v := rv.Interface().(type) { - case time.Time: - // Special case time.Time as a primitive. Has to come before - // TextMarshaler below because time.Time implements - // encoding.TextMarshaler, but we need to always use UTC. - enc.wf(v.UTC().Format("2006-01-02T15:04:05Z")) - return - case TextMarshaler: - // Special case. Use text marshaler if it's available for this value. - if s, err := v.MarshalText(); err != nil { - encPanic(err) - } else { - enc.writeQuoted(string(s)) - } - return - } - switch rv.Kind() { - case reflect.Bool: - enc.wf(strconv.FormatBool(rv.Bool())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, - reflect.Int64: - enc.wf(strconv.FormatInt(rv.Int(), 10)) - case reflect.Uint, reflect.Uint8, reflect.Uint16, - reflect.Uint32, reflect.Uint64: - enc.wf(strconv.FormatUint(rv.Uint(), 10)) - case reflect.Float32: - enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 32))) - case reflect.Float64: - enc.wf(floatAddDecimal(strconv.FormatFloat(rv.Float(), 'f', -1, 64))) - case reflect.Array, reflect.Slice: - enc.eArrayOrSliceElement(rv) - case reflect.Interface: - enc.eElement(rv.Elem()) - case reflect.String: - enc.writeQuoted(rv.String()) - default: - panic(e("unexpected primitive type: %s", rv.Kind())) - } -} - -// By the TOML spec, all floats must have a decimal with at least one -// number on either side. -func floatAddDecimal(fstr string) string { - if !strings.Contains(fstr, ".") { - return fstr + ".0" - } - return fstr -} - -func (enc *Encoder) writeQuoted(s string) { - enc.wf("\"%s\"", quotedReplacer.Replace(s)) -} - -func (enc *Encoder) eArrayOrSliceElement(rv reflect.Value) { - length := rv.Len() - enc.wf("[") - for i := 0; i < length; i++ { - elem := rv.Index(i) - enc.eElement(elem) - if i != length-1 { - enc.wf(", ") - } - } - enc.wf("]") -} - -func (enc *Encoder) eArrayOfTables(key Key, rv reflect.Value) { - if len(key) == 0 { - encPanic(errNoKey) - } - for i := 0; i < rv.Len(); i++ { - trv := rv.Index(i) - if isNil(trv) { - continue - } - panicIfInvalidKey(key) - enc.newline() - enc.wf("%s[[%s]]", enc.indentStr(key), key.maybeQuotedAll()) - enc.newline() - enc.eMapOrStruct(key, trv) - } -} - -func (enc *Encoder) eTable(key Key, rv reflect.Value) { - panicIfInvalidKey(key) - if len(key) == 1 { - // Output an extra newline between top-level tables. - // (The newline isn't written if nothing else has been written though.) - enc.newline() - } - if len(key) > 0 { - enc.wf("%s[%s]", enc.indentStr(key), key.maybeQuotedAll()) - enc.newline() - } - enc.eMapOrStruct(key, rv) -} - -func (enc *Encoder) eMapOrStruct(key Key, rv reflect.Value) { - switch rv := eindirect(rv); rv.Kind() { - case reflect.Map: - enc.eMap(key, rv) - case reflect.Struct: - enc.eStruct(key, rv) - default: - panic("eTable: unhandled reflect.Value Kind: " + rv.Kind().String()) - } -} - -func (enc *Encoder) eMap(key Key, rv reflect.Value) { - rt := rv.Type() - if rt.Key().Kind() != reflect.String { - encPanic(errNonString) - } - - // Sort keys so that we have deterministic output. And write keys directly - // underneath this key first, before writing sub-structs or sub-maps. - var mapKeysDirect, mapKeysSub []string - for _, mapKey := range rv.MapKeys() { - k := mapKey.String() - if typeIsHash(tomlTypeOfGo(rv.MapIndex(mapKey))) { - mapKeysSub = append(mapKeysSub, k) - } else { - mapKeysDirect = append(mapKeysDirect, k) - } - } - - var writeMapKeys = func(mapKeys []string) { - sort.Strings(mapKeys) - for _, mapKey := range mapKeys { - mrv := rv.MapIndex(reflect.ValueOf(mapKey)) - if isNil(mrv) { - // Don't write anything for nil fields. - continue - } - enc.encode(key.add(mapKey), mrv) - } - } - writeMapKeys(mapKeysDirect) - writeMapKeys(mapKeysSub) -} - -func (enc *Encoder) eStruct(key Key, rv reflect.Value) { - // Write keys for fields directly under this key first, because if we write - // a field that creates a new table, then all keys under it will be in that - // table (not the one we're writing here). - rt := rv.Type() - var fieldsDirect, fieldsSub [][]int - var addFields func(rt reflect.Type, rv reflect.Value, start []int) - addFields = func(rt reflect.Type, rv reflect.Value, start []int) { - for i := 0; i < rt.NumField(); i++ { - f := rt.Field(i) - // skip unexported fields - if f.PkgPath != "" && !f.Anonymous { - continue - } - frv := rv.Field(i) - if f.Anonymous { - t := f.Type - switch t.Kind() { - case reflect.Struct: - // Treat anonymous struct fields with - // tag names as though they are not - // anonymous, like encoding/json does. - if getOptions(f.Tag).name == "" { - addFields(t, frv, f.Index) - continue - } - case reflect.Ptr: - if t.Elem().Kind() == reflect.Struct && - getOptions(f.Tag).name == "" { - if !frv.IsNil() { - addFields(t.Elem(), frv.Elem(), f.Index) - } - continue - } - // Fall through to the normal field encoding logic below - // for non-struct anonymous fields. - } - } - - if typeIsHash(tomlTypeOfGo(frv)) { - fieldsSub = append(fieldsSub, append(start, f.Index...)) - } else { - fieldsDirect = append(fieldsDirect, append(start, f.Index...)) - } - } - } - addFields(rt, rv, nil) - - var writeFields = func(fields [][]int) { - for _, fieldIndex := range fields { - sft := rt.FieldByIndex(fieldIndex) - sf := rv.FieldByIndex(fieldIndex) - if isNil(sf) { - // Don't write anything for nil fields. - continue - } - - opts := getOptions(sft.Tag) - if opts.skip { - continue - } - keyName := sft.Name - if opts.name != "" { - keyName = opts.name - } - if opts.omitempty && isEmpty(sf) { - continue - } - if opts.omitzero && isZero(sf) { - continue - } - - enc.encode(key.add(keyName), sf) - } - } - writeFields(fieldsDirect) - writeFields(fieldsSub) -} - -// tomlTypeName returns the TOML type name of the Go value's type. It is -// used to determine whether the types of array elements are mixed (which is -// forbidden). If the Go value is nil, then it is illegal for it to be an array -// element, and valueIsNil is returned as true. - -// Returns the TOML type of a Go value. The type may be `nil`, which means -// no concrete TOML type could be found. -func tomlTypeOfGo(rv reflect.Value) tomlType { - if isNil(rv) || !rv.IsValid() { - return nil - } - switch rv.Kind() { - case reflect.Bool: - return tomlBool - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, - reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, - reflect.Uint64: - return tomlInteger - case reflect.Float32, reflect.Float64: - return tomlFloat - case reflect.Array, reflect.Slice: - if typeEqual(tomlHash, tomlArrayType(rv)) { - return tomlArrayHash - } - return tomlArray - case reflect.Ptr, reflect.Interface: - return tomlTypeOfGo(rv.Elem()) - case reflect.String: - return tomlString - case reflect.Map: - return tomlHash - case reflect.Struct: - switch rv.Interface().(type) { - case time.Time: - return tomlDatetime - case TextMarshaler: - return tomlString - default: - return tomlHash - } - default: - panic("unexpected reflect.Kind: " + rv.Kind().String()) - } -} - -// tomlArrayType returns the element type of a TOML array. The type returned -// may be nil if it cannot be determined (e.g., a nil slice or a zero length -// slize). This function may also panic if it finds a type that cannot be -// expressed in TOML (such as nil elements, heterogeneous arrays or directly -// nested arrays of tables). -func tomlArrayType(rv reflect.Value) tomlType { - if isNil(rv) || !rv.IsValid() || rv.Len() == 0 { - return nil - } - firstType := tomlTypeOfGo(rv.Index(0)) - if firstType == nil { - encPanic(errArrayNilElement) - } - - rvlen := rv.Len() - for i := 1; i < rvlen; i++ { - elem := rv.Index(i) - switch elemType := tomlTypeOfGo(elem); { - case elemType == nil: - encPanic(errArrayNilElement) - case !typeEqual(firstType, elemType): - encPanic(errArrayMixedElementTypes) - } - } - // If we have a nested array, then we must make sure that the nested - // array contains ONLY primitives. - // This checks arbitrarily nested arrays. - if typeEqual(firstType, tomlArray) || typeEqual(firstType, tomlArrayHash) { - nest := tomlArrayType(eindirect(rv.Index(0))) - if typeEqual(nest, tomlHash) || typeEqual(nest, tomlArrayHash) { - encPanic(errArrayNoTable) - } - } - return firstType -} - -type tagOptions struct { - skip bool // "-" - name string - omitempty bool - omitzero bool -} - -func getOptions(tag reflect.StructTag) tagOptions { - t := tag.Get("toml") - if t == "-" { - return tagOptions{skip: true} - } - var opts tagOptions - parts := strings.Split(t, ",") - opts.name = parts[0] - for _, s := range parts[1:] { - switch s { - case "omitempty": - opts.omitempty = true - case "omitzero": - opts.omitzero = true - } - } - return opts -} - -func isZero(rv reflect.Value) bool { - switch rv.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return rv.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return rv.Uint() == 0 - case reflect.Float32, reflect.Float64: - return rv.Float() == 0.0 - } - return false -} - -func isEmpty(rv reflect.Value) bool { - switch rv.Kind() { - case reflect.Array, reflect.Slice, reflect.Map, reflect.String: - return rv.Len() == 0 - case reflect.Bool: - return !rv.Bool() - } - return false -} - -func (enc *Encoder) newline() { - if enc.hasWritten { - enc.wf("\n") - } -} - -func (enc *Encoder) keyEqElement(key Key, val reflect.Value) { - if len(key) == 0 { - encPanic(errNoKey) - } - panicIfInvalidKey(key) - enc.wf("%s%s = ", enc.indentStr(key), key.maybeQuoted(len(key)-1)) - enc.eElement(val) - enc.newline() -} - -func (enc *Encoder) wf(format string, v ...interface{}) { - if _, err := fmt.Fprintf(enc.w, format, v...); err != nil { - encPanic(err) - } - enc.hasWritten = true -} - -func (enc *Encoder) indentStr(key Key) string { - return strings.Repeat(enc.Indent, len(key)-1) -} - -func encPanic(err error) { - panic(tomlEncodeError{err}) -} - -func eindirect(v reflect.Value) reflect.Value { - switch v.Kind() { - case reflect.Ptr, reflect.Interface: - return eindirect(v.Elem()) - default: - return v - } -} - -func isNil(rv reflect.Value) bool { - switch rv.Kind() { - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return rv.IsNil() - default: - return false - } -} - -func panicIfInvalidKey(key Key) { - for _, k := range key { - if len(k) == 0 { - encPanic(e("Key '%s' is not a valid table name. Key names "+ - "cannot be empty.", key.maybeQuotedAll())) - } - } -} - -func isValidKeyName(s string) bool { - return len(s) != 0 -} diff --git a/vendor/github.com/BurntSushi/toml/encoding_types.go b/vendor/github.com/BurntSushi/toml/encoding_types.go deleted file mode 100644 index d36e1dd60..000000000 --- a/vendor/github.com/BurntSushi/toml/encoding_types.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build go1.2 - -package toml - -// In order to support Go 1.1, we define our own TextMarshaler and -// TextUnmarshaler types. For Go 1.2+, we just alias them with the -// standard library interfaces. - -import ( - "encoding" -) - -// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here -// so that Go 1.1 can be supported. -type TextMarshaler encoding.TextMarshaler - -// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined -// here so that Go 1.1 can be supported. -type TextUnmarshaler encoding.TextUnmarshaler diff --git a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go b/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go deleted file mode 100644 index e8d503d04..000000000 --- a/vendor/github.com/BurntSushi/toml/encoding_types_1.1.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build !go1.2 - -package toml - -// These interfaces were introduced in Go 1.2, so we add them manually when -// compiling for Go 1.1. - -// TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here -// so that Go 1.1 can be supported. -type TextMarshaler interface { - MarshalText() (text []byte, err error) -} - -// TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined -// here so that Go 1.1 can be supported. -type TextUnmarshaler interface { - UnmarshalText(text []byte) error -} diff --git a/vendor/github.com/BurntSushi/toml/lex.go b/vendor/github.com/BurntSushi/toml/lex.go deleted file mode 100644 index e0a742a88..000000000 --- a/vendor/github.com/BurntSushi/toml/lex.go +++ /dev/null @@ -1,953 +0,0 @@ -package toml - -import ( - "fmt" - "strings" - "unicode" - "unicode/utf8" -) - -type itemType int - -const ( - itemError itemType = iota - itemNIL // used in the parser to indicate no type - itemEOF - itemText - itemString - itemRawString - itemMultilineString - itemRawMultilineString - itemBool - itemInteger - itemFloat - itemDatetime - itemArray // the start of an array - itemArrayEnd - itemTableStart - itemTableEnd - itemArrayTableStart - itemArrayTableEnd - itemKeyStart - itemCommentStart - itemInlineTableStart - itemInlineTableEnd -) - -const ( - eof = 0 - comma = ',' - tableStart = '[' - tableEnd = ']' - arrayTableStart = '[' - arrayTableEnd = ']' - tableSep = '.' - keySep = '=' - arrayStart = '[' - arrayEnd = ']' - commentStart = '#' - stringStart = '"' - stringEnd = '"' - rawStringStart = '\'' - rawStringEnd = '\'' - inlineTableStart = '{' - inlineTableEnd = '}' -) - -type stateFn func(lx *lexer) stateFn - -type lexer struct { - input string - start int - pos int - line int - state stateFn - items chan item - - // Allow for backing up up to three runes. - // This is necessary because TOML contains 3-rune tokens (""" and '''). - prevWidths [3]int - nprev int // how many of prevWidths are in use - // If we emit an eof, we can still back up, but it is not OK to call - // next again. - atEOF bool - - // A stack of state functions used to maintain context. - // The idea is to reuse parts of the state machine in various places. - // For example, values can appear at the top level or within arbitrarily - // nested arrays. The last state on the stack is used after a value has - // been lexed. Similarly for comments. - stack []stateFn -} - -type item struct { - typ itemType - val string - line int -} - -func (lx *lexer) nextItem() item { - for { - select { - case item := <-lx.items: - return item - default: - lx.state = lx.state(lx) - } - } -} - -func lex(input string) *lexer { - lx := &lexer{ - input: input, - state: lexTop, - line: 1, - items: make(chan item, 10), - stack: make([]stateFn, 0, 10), - } - return lx -} - -func (lx *lexer) push(state stateFn) { - lx.stack = append(lx.stack, state) -} - -func (lx *lexer) pop() stateFn { - if len(lx.stack) == 0 { - return lx.errorf("BUG in lexer: no states to pop") - } - last := lx.stack[len(lx.stack)-1] - lx.stack = lx.stack[0 : len(lx.stack)-1] - return last -} - -func (lx *lexer) current() string { - return lx.input[lx.start:lx.pos] -} - -func (lx *lexer) emit(typ itemType) { - lx.items <- item{typ, lx.current(), lx.line} - lx.start = lx.pos -} - -func (lx *lexer) emitTrim(typ itemType) { - lx.items <- item{typ, strings.TrimSpace(lx.current()), lx.line} - lx.start = lx.pos -} - -func (lx *lexer) next() (r rune) { - if lx.atEOF { - panic("next called after EOF") - } - if lx.pos >= len(lx.input) { - lx.atEOF = true - return eof - } - - if lx.input[lx.pos] == '\n' { - lx.line++ - } - lx.prevWidths[2] = lx.prevWidths[1] - lx.prevWidths[1] = lx.prevWidths[0] - if lx.nprev < 3 { - lx.nprev++ - } - r, w := utf8.DecodeRuneInString(lx.input[lx.pos:]) - lx.prevWidths[0] = w - lx.pos += w - return r -} - -// ignore skips over the pending input before this point. -func (lx *lexer) ignore() { - lx.start = lx.pos -} - -// backup steps back one rune. Can be called only twice between calls to next. -func (lx *lexer) backup() { - if lx.atEOF { - lx.atEOF = false - return - } - if lx.nprev < 1 { - panic("backed up too far") - } - w := lx.prevWidths[0] - lx.prevWidths[0] = lx.prevWidths[1] - lx.prevWidths[1] = lx.prevWidths[2] - lx.nprev-- - lx.pos -= w - if lx.pos < len(lx.input) && lx.input[lx.pos] == '\n' { - lx.line-- - } -} - -// accept consumes the next rune if it's equal to `valid`. -func (lx *lexer) accept(valid rune) bool { - if lx.next() == valid { - return true - } - lx.backup() - return false -} - -// peek returns but does not consume the next rune in the input. -func (lx *lexer) peek() rune { - r := lx.next() - lx.backup() - return r -} - -// skip ignores all input that matches the given predicate. -func (lx *lexer) skip(pred func(rune) bool) { - for { - r := lx.next() - if pred(r) { - continue - } - lx.backup() - lx.ignore() - return - } -} - -// errorf stops all lexing by emitting an error and returning `nil`. -// Note that any value that is a character is escaped if it's a special -// character (newlines, tabs, etc.). -func (lx *lexer) errorf(format string, values ...interface{}) stateFn { - lx.items <- item{ - itemError, - fmt.Sprintf(format, values...), - lx.line, - } - return nil -} - -// lexTop consumes elements at the top level of TOML data. -func lexTop(lx *lexer) stateFn { - r := lx.next() - if isWhitespace(r) || isNL(r) { - return lexSkip(lx, lexTop) - } - switch r { - case commentStart: - lx.push(lexTop) - return lexCommentStart - case tableStart: - return lexTableStart - case eof: - if lx.pos > lx.start { - return lx.errorf("unexpected EOF") - } - lx.emit(itemEOF) - return nil - } - - // At this point, the only valid item can be a key, so we back up - // and let the key lexer do the rest. - lx.backup() - lx.push(lexTopEnd) - return lexKeyStart -} - -// lexTopEnd is entered whenever a top-level item has been consumed. (A value -// or a table.) It must see only whitespace, and will turn back to lexTop -// upon a newline. If it sees EOF, it will quit the lexer successfully. -func lexTopEnd(lx *lexer) stateFn { - r := lx.next() - switch { - case r == commentStart: - // a comment will read to a newline for us. - lx.push(lexTop) - return lexCommentStart - case isWhitespace(r): - return lexTopEnd - case isNL(r): - lx.ignore() - return lexTop - case r == eof: - lx.emit(itemEOF) - return nil - } - return lx.errorf("expected a top-level item to end with a newline, "+ - "comment, or EOF, but got %q instead", r) -} - -// lexTable lexes the beginning of a table. Namely, it makes sure that -// it starts with a character other than '.' and ']'. -// It assumes that '[' has already been consumed. -// It also handles the case that this is an item in an array of tables. -// e.g., '[[name]]'. -func lexTableStart(lx *lexer) stateFn { - if lx.peek() == arrayTableStart { - lx.next() - lx.emit(itemArrayTableStart) - lx.push(lexArrayTableEnd) - } else { - lx.emit(itemTableStart) - lx.push(lexTableEnd) - } - return lexTableNameStart -} - -func lexTableEnd(lx *lexer) stateFn { - lx.emit(itemTableEnd) - return lexTopEnd -} - -func lexArrayTableEnd(lx *lexer) stateFn { - if r := lx.next(); r != arrayTableEnd { - return lx.errorf("expected end of table array name delimiter %q, "+ - "but got %q instead", arrayTableEnd, r) - } - lx.emit(itemArrayTableEnd) - return lexTopEnd -} - -func lexTableNameStart(lx *lexer) stateFn { - lx.skip(isWhitespace) - switch r := lx.peek(); { - case r == tableEnd || r == eof: - return lx.errorf("unexpected end of table name " + - "(table names cannot be empty)") - case r == tableSep: - return lx.errorf("unexpected table separator " + - "(table names cannot be empty)") - case r == stringStart || r == rawStringStart: - lx.ignore() - lx.push(lexTableNameEnd) - return lexValue // reuse string lexing - default: - return lexBareTableName - } -} - -// lexBareTableName lexes the name of a table. It assumes that at least one -// valid character for the table has already been read. -func lexBareTableName(lx *lexer) stateFn { - r := lx.next() - if isBareKeyChar(r) { - return lexBareTableName - } - lx.backup() - lx.emit(itemText) - return lexTableNameEnd -} - -// lexTableNameEnd reads the end of a piece of a table name, optionally -// consuming whitespace. -func lexTableNameEnd(lx *lexer) stateFn { - lx.skip(isWhitespace) - switch r := lx.next(); { - case isWhitespace(r): - return lexTableNameEnd - case r == tableSep: - lx.ignore() - return lexTableNameStart - case r == tableEnd: - return lx.pop() - default: - return lx.errorf("expected '.' or ']' to end table name, "+ - "but got %q instead", r) - } -} - -// lexKeyStart consumes a key name up until the first non-whitespace character. -// lexKeyStart will ignore whitespace. -func lexKeyStart(lx *lexer) stateFn { - r := lx.peek() - switch { - case r == keySep: - return lx.errorf("unexpected key separator %q", keySep) - case isWhitespace(r) || isNL(r): - lx.next() - return lexSkip(lx, lexKeyStart) - case r == stringStart || r == rawStringStart: - lx.ignore() - lx.emit(itemKeyStart) - lx.push(lexKeyEnd) - return lexValue // reuse string lexing - default: - lx.ignore() - lx.emit(itemKeyStart) - return lexBareKey - } -} - -// lexBareKey consumes the text of a bare key. Assumes that the first character -// (which is not whitespace) has not yet been consumed. -func lexBareKey(lx *lexer) stateFn { - switch r := lx.next(); { - case isBareKeyChar(r): - return lexBareKey - case isWhitespace(r): - lx.backup() - lx.emit(itemText) - return lexKeyEnd - case r == keySep: - lx.backup() - lx.emit(itemText) - return lexKeyEnd - default: - return lx.errorf("bare keys cannot contain %q", r) - } -} - -// lexKeyEnd consumes the end of a key and trims whitespace (up to the key -// separator). -func lexKeyEnd(lx *lexer) stateFn { - switch r := lx.next(); { - case r == keySep: - return lexSkip(lx, lexValue) - case isWhitespace(r): - return lexSkip(lx, lexKeyEnd) - default: - return lx.errorf("expected key separator %q, but got %q instead", - keySep, r) - } -} - -// lexValue starts the consumption of a value anywhere a value is expected. -// lexValue will ignore whitespace. -// After a value is lexed, the last state on the next is popped and returned. -func lexValue(lx *lexer) stateFn { - // We allow whitespace to precede a value, but NOT newlines. - // In array syntax, the array states are responsible for ignoring newlines. - r := lx.next() - switch { - case isWhitespace(r): - return lexSkip(lx, lexValue) - case isDigit(r): - lx.backup() // avoid an extra state and use the same as above - return lexNumberOrDateStart - } - switch r { - case arrayStart: - lx.ignore() - lx.emit(itemArray) - return lexArrayValue - case inlineTableStart: - lx.ignore() - lx.emit(itemInlineTableStart) - return lexInlineTableValue - case stringStart: - if lx.accept(stringStart) { - if lx.accept(stringStart) { - lx.ignore() // Ignore """ - return lexMultilineString - } - lx.backup() - } - lx.ignore() // ignore the '"' - return lexString - case rawStringStart: - if lx.accept(rawStringStart) { - if lx.accept(rawStringStart) { - lx.ignore() // Ignore """ - return lexMultilineRawString - } - lx.backup() - } - lx.ignore() // ignore the "'" - return lexRawString - case '+', '-': - return lexNumberStart - case '.': // special error case, be kind to users - return lx.errorf("floats must start with a digit, not '.'") - } - if unicode.IsLetter(r) { - // Be permissive here; lexBool will give a nice error if the - // user wrote something like - // x = foo - // (i.e. not 'true' or 'false' but is something else word-like.) - lx.backup() - return lexBool - } - return lx.errorf("expected value but found %q instead", r) -} - -// lexArrayValue consumes one value in an array. It assumes that '[' or ',' -// have already been consumed. All whitespace and newlines are ignored. -func lexArrayValue(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r) || isNL(r): - return lexSkip(lx, lexArrayValue) - case r == commentStart: - lx.push(lexArrayValue) - return lexCommentStart - case r == comma: - return lx.errorf("unexpected comma") - case r == arrayEnd: - // NOTE(caleb): The spec isn't clear about whether you can have - // a trailing comma or not, so we'll allow it. - return lexArrayEnd - } - - lx.backup() - lx.push(lexArrayValueEnd) - return lexValue -} - -// lexArrayValueEnd consumes everything between the end of an array value and -// the next value (or the end of the array): it ignores whitespace and newlines -// and expects either a ',' or a ']'. -func lexArrayValueEnd(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r) || isNL(r): - return lexSkip(lx, lexArrayValueEnd) - case r == commentStart: - lx.push(lexArrayValueEnd) - return lexCommentStart - case r == comma: - lx.ignore() - return lexArrayValue // move on to the next value - case r == arrayEnd: - return lexArrayEnd - } - return lx.errorf( - "expected a comma or array terminator %q, but got %q instead", - arrayEnd, r, - ) -} - -// lexArrayEnd finishes the lexing of an array. -// It assumes that a ']' has just been consumed. -func lexArrayEnd(lx *lexer) stateFn { - lx.ignore() - lx.emit(itemArrayEnd) - return lx.pop() -} - -// lexInlineTableValue consumes one key/value pair in an inline table. -// It assumes that '{' or ',' have already been consumed. Whitespace is ignored. -func lexInlineTableValue(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r): - return lexSkip(lx, lexInlineTableValue) - case isNL(r): - return lx.errorf("newlines not allowed within inline tables") - case r == commentStart: - lx.push(lexInlineTableValue) - return lexCommentStart - case r == comma: - return lx.errorf("unexpected comma") - case r == inlineTableEnd: - return lexInlineTableEnd - } - lx.backup() - lx.push(lexInlineTableValueEnd) - return lexKeyStart -} - -// lexInlineTableValueEnd consumes everything between the end of an inline table -// key/value pair and the next pair (or the end of the table): -// it ignores whitespace and expects either a ',' or a '}'. -func lexInlineTableValueEnd(lx *lexer) stateFn { - r := lx.next() - switch { - case isWhitespace(r): - return lexSkip(lx, lexInlineTableValueEnd) - case isNL(r): - return lx.errorf("newlines not allowed within inline tables") - case r == commentStart: - lx.push(lexInlineTableValueEnd) - return lexCommentStart - case r == comma: - lx.ignore() - return lexInlineTableValue - case r == inlineTableEnd: - return lexInlineTableEnd - } - return lx.errorf("expected a comma or an inline table terminator %q, "+ - "but got %q instead", inlineTableEnd, r) -} - -// lexInlineTableEnd finishes the lexing of an inline table. -// It assumes that a '}' has just been consumed. -func lexInlineTableEnd(lx *lexer) stateFn { - lx.ignore() - lx.emit(itemInlineTableEnd) - return lx.pop() -} - -// lexString consumes the inner contents of a string. It assumes that the -// beginning '"' has already been consumed and ignored. -func lexString(lx *lexer) stateFn { - r := lx.next() - switch { - case r == eof: - return lx.errorf("unexpected EOF") - case isNL(r): - return lx.errorf("strings cannot contain newlines") - case r == '\\': - lx.push(lexString) - return lexStringEscape - case r == stringEnd: - lx.backup() - lx.emit(itemString) - lx.next() - lx.ignore() - return lx.pop() - } - return lexString -} - -// lexMultilineString consumes the inner contents of a string. It assumes that -// the beginning '"""' has already been consumed and ignored. -func lexMultilineString(lx *lexer) stateFn { - switch lx.next() { - case eof: - return lx.errorf("unexpected EOF") - case '\\': - return lexMultilineStringEscape - case stringEnd: - if lx.accept(stringEnd) { - if lx.accept(stringEnd) { - lx.backup() - lx.backup() - lx.backup() - lx.emit(itemMultilineString) - lx.next() - lx.next() - lx.next() - lx.ignore() - return lx.pop() - } - lx.backup() - } - } - return lexMultilineString -} - -// lexRawString consumes a raw string. Nothing can be escaped in such a string. -// It assumes that the beginning "'" has already been consumed and ignored. -func lexRawString(lx *lexer) stateFn { - r := lx.next() - switch { - case r == eof: - return lx.errorf("unexpected EOF") - case isNL(r): - return lx.errorf("strings cannot contain newlines") - case r == rawStringEnd: - lx.backup() - lx.emit(itemRawString) - lx.next() - lx.ignore() - return lx.pop() - } - return lexRawString -} - -// lexMultilineRawString consumes a raw string. Nothing can be escaped in such -// a string. It assumes that the beginning "'''" has already been consumed and -// ignored. -func lexMultilineRawString(lx *lexer) stateFn { - switch lx.next() { - case eof: - return lx.errorf("unexpected EOF") - case rawStringEnd: - if lx.accept(rawStringEnd) { - if lx.accept(rawStringEnd) { - lx.backup() - lx.backup() - lx.backup() - lx.emit(itemRawMultilineString) - lx.next() - lx.next() - lx.next() - lx.ignore() - return lx.pop() - } - lx.backup() - } - } - return lexMultilineRawString -} - -// lexMultilineStringEscape consumes an escaped character. It assumes that the -// preceding '\\' has already been consumed. -func lexMultilineStringEscape(lx *lexer) stateFn { - // Handle the special case first: - if isNL(lx.next()) { - return lexMultilineString - } - lx.backup() - lx.push(lexMultilineString) - return lexStringEscape(lx) -} - -func lexStringEscape(lx *lexer) stateFn { - r := lx.next() - switch r { - case 'b': - fallthrough - case 't': - fallthrough - case 'n': - fallthrough - case 'f': - fallthrough - case 'r': - fallthrough - case '"': - fallthrough - case '\\': - return lx.pop() - case 'u': - return lexShortUnicodeEscape - case 'U': - return lexLongUnicodeEscape - } - return lx.errorf("invalid escape character %q; only the following "+ - "escape characters are allowed: "+ - `\b, \t, \n, \f, \r, \", \\, \uXXXX, and \UXXXXXXXX`, r) -} - -func lexShortUnicodeEscape(lx *lexer) stateFn { - var r rune - for i := 0; i < 4; i++ { - r = lx.next() - if !isHexadecimal(r) { - return lx.errorf(`expected four hexadecimal digits after '\u', `+ - "but got %q instead", lx.current()) - } - } - return lx.pop() -} - -func lexLongUnicodeEscape(lx *lexer) stateFn { - var r rune - for i := 0; i < 8; i++ { - r = lx.next() - if !isHexadecimal(r) { - return lx.errorf(`expected eight hexadecimal digits after '\U', `+ - "but got %q instead", lx.current()) - } - } - return lx.pop() -} - -// lexNumberOrDateStart consumes either an integer, a float, or datetime. -func lexNumberOrDateStart(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexNumberOrDate - } - switch r { - case '_': - return lexNumber - case 'e', 'E': - return lexFloat - case '.': - return lx.errorf("floats must start with a digit, not '.'") - } - return lx.errorf("expected a digit but got %q", r) -} - -// lexNumberOrDate consumes either an integer, float or datetime. -func lexNumberOrDate(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexNumberOrDate - } - switch r { - case '-': - return lexDatetime - case '_': - return lexNumber - case '.', 'e', 'E': - return lexFloat - } - - lx.backup() - lx.emit(itemInteger) - return lx.pop() -} - -// lexDatetime consumes a Datetime, to a first approximation. -// The parser validates that it matches one of the accepted formats. -func lexDatetime(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexDatetime - } - switch r { - case '-', 'T', ':', '.', 'Z', '+': - return lexDatetime - } - - lx.backup() - lx.emit(itemDatetime) - return lx.pop() -} - -// lexNumberStart consumes either an integer or a float. It assumes that a sign -// has already been read, but that *no* digits have been consumed. -// lexNumberStart will move to the appropriate integer or float states. -func lexNumberStart(lx *lexer) stateFn { - // We MUST see a digit. Even floats have to start with a digit. - r := lx.next() - if !isDigit(r) { - if r == '.' { - return lx.errorf("floats must start with a digit, not '.'") - } - return lx.errorf("expected a digit but got %q", r) - } - return lexNumber -} - -// lexNumber consumes an integer or a float after seeing the first digit. -func lexNumber(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexNumber - } - switch r { - case '_': - return lexNumber - case '.', 'e', 'E': - return lexFloat - } - - lx.backup() - lx.emit(itemInteger) - return lx.pop() -} - -// lexFloat consumes the elements of a float. It allows any sequence of -// float-like characters, so floats emitted by the lexer are only a first -// approximation and must be validated by the parser. -func lexFloat(lx *lexer) stateFn { - r := lx.next() - if isDigit(r) { - return lexFloat - } - switch r { - case '_', '.', '-', '+', 'e', 'E': - return lexFloat - } - - lx.backup() - lx.emit(itemFloat) - return lx.pop() -} - -// lexBool consumes a bool string: 'true' or 'false. -func lexBool(lx *lexer) stateFn { - var rs []rune - for { - r := lx.next() - if !unicode.IsLetter(r) { - lx.backup() - break - } - rs = append(rs, r) - } - s := string(rs) - switch s { - case "true", "false": - lx.emit(itemBool) - return lx.pop() - } - return lx.errorf("expected value but found %q instead", s) -} - -// lexCommentStart begins the lexing of a comment. It will emit -// itemCommentStart and consume no characters, passing control to lexComment. -func lexCommentStart(lx *lexer) stateFn { - lx.ignore() - lx.emit(itemCommentStart) - return lexComment -} - -// lexComment lexes an entire comment. It assumes that '#' has been consumed. -// It will consume *up to* the first newline character, and pass control -// back to the last state on the stack. -func lexComment(lx *lexer) stateFn { - r := lx.peek() - if isNL(r) || r == eof { - lx.emit(itemText) - return lx.pop() - } - lx.next() - return lexComment -} - -// lexSkip ignores all slurped input and moves on to the next state. -func lexSkip(lx *lexer, nextState stateFn) stateFn { - return func(lx *lexer) stateFn { - lx.ignore() - return nextState - } -} - -// isWhitespace returns true if `r` is a whitespace character according -// to the spec. -func isWhitespace(r rune) bool { - return r == '\t' || r == ' ' -} - -func isNL(r rune) bool { - return r == '\n' || r == '\r' -} - -func isDigit(r rune) bool { - return r >= '0' && r <= '9' -} - -func isHexadecimal(r rune) bool { - return (r >= '0' && r <= '9') || - (r >= 'a' && r <= 'f') || - (r >= 'A' && r <= 'F') -} - -func isBareKeyChar(r rune) bool { - return (r >= 'A' && r <= 'Z') || - (r >= 'a' && r <= 'z') || - (r >= '0' && r <= '9') || - r == '_' || - r == '-' -} - -func (itype itemType) String() string { - switch itype { - case itemError: - return "Error" - case itemNIL: - return "NIL" - case itemEOF: - return "EOF" - case itemText: - return "Text" - case itemString, itemRawString, itemMultilineString, itemRawMultilineString: - return "String" - case itemBool: - return "Bool" - case itemInteger: - return "Integer" - case itemFloat: - return "Float" - case itemDatetime: - return "DateTime" - case itemTableStart: - return "TableStart" - case itemTableEnd: - return "TableEnd" - case itemKeyStart: - return "KeyStart" - case itemArray: - return "Array" - case itemArrayEnd: - return "ArrayEnd" - case itemCommentStart: - return "CommentStart" - } - panic(fmt.Sprintf("BUG: Unknown type '%d'.", int(itype))) -} - -func (item item) String() string { - return fmt.Sprintf("(%s, %s)", item.typ.String(), item.val) -} diff --git a/vendor/github.com/BurntSushi/toml/parse.go b/vendor/github.com/BurntSushi/toml/parse.go deleted file mode 100644 index 50869ef92..000000000 --- a/vendor/github.com/BurntSushi/toml/parse.go +++ /dev/null @@ -1,592 +0,0 @@ -package toml - -import ( - "fmt" - "strconv" - "strings" - "time" - "unicode" - "unicode/utf8" -) - -type parser struct { - mapping map[string]interface{} - types map[string]tomlType - lx *lexer - - // A list of keys in the order that they appear in the TOML data. - ordered []Key - - // the full key for the current hash in scope - context Key - - // the base key name for everything except hashes - currentKey string - - // rough approximation of line number - approxLine int - - // A map of 'key.group.names' to whether they were created implicitly. - implicits map[string]bool -} - -type parseError string - -func (pe parseError) Error() string { - return string(pe) -} - -func parse(data string) (p *parser, err error) { - defer func() { - if r := recover(); r != nil { - var ok bool - if err, ok = r.(parseError); ok { - return - } - panic(r) - } - }() - - p = &parser{ - mapping: make(map[string]interface{}), - types: make(map[string]tomlType), - lx: lex(data), - ordered: make([]Key, 0), - implicits: make(map[string]bool), - } - for { - item := p.next() - if item.typ == itemEOF { - break - } - p.topLevel(item) - } - - return p, nil -} - -func (p *parser) panicf(format string, v ...interface{}) { - msg := fmt.Sprintf("Near line %d (last key parsed '%s'): %s", - p.approxLine, p.current(), fmt.Sprintf(format, v...)) - panic(parseError(msg)) -} - -func (p *parser) next() item { - it := p.lx.nextItem() - if it.typ == itemError { - p.panicf("%s", it.val) - } - return it -} - -func (p *parser) bug(format string, v ...interface{}) { - panic(fmt.Sprintf("BUG: "+format+"\n\n", v...)) -} - -func (p *parser) expect(typ itemType) item { - it := p.next() - p.assertEqual(typ, it.typ) - return it -} - -func (p *parser) assertEqual(expected, got itemType) { - if expected != got { - p.bug("Expected '%s' but got '%s'.", expected, got) - } -} - -func (p *parser) topLevel(item item) { - switch item.typ { - case itemCommentStart: - p.approxLine = item.line - p.expect(itemText) - case itemTableStart: - kg := p.next() - p.approxLine = kg.line - - var key Key - for ; kg.typ != itemTableEnd && kg.typ != itemEOF; kg = p.next() { - key = append(key, p.keyString(kg)) - } - p.assertEqual(itemTableEnd, kg.typ) - - p.establishContext(key, false) - p.setType("", tomlHash) - p.ordered = append(p.ordered, key) - case itemArrayTableStart: - kg := p.next() - p.approxLine = kg.line - - var key Key - for ; kg.typ != itemArrayTableEnd && kg.typ != itemEOF; kg = p.next() { - key = append(key, p.keyString(kg)) - } - p.assertEqual(itemArrayTableEnd, kg.typ) - - p.establishContext(key, true) - p.setType("", tomlArrayHash) - p.ordered = append(p.ordered, key) - case itemKeyStart: - kname := p.next() - p.approxLine = kname.line - p.currentKey = p.keyString(kname) - - val, typ := p.value(p.next()) - p.setValue(p.currentKey, val) - p.setType(p.currentKey, typ) - p.ordered = append(p.ordered, p.context.add(p.currentKey)) - p.currentKey = "" - default: - p.bug("Unexpected type at top level: %s", item.typ) - } -} - -// Gets a string for a key (or part of a key in a table name). -func (p *parser) keyString(it item) string { - switch it.typ { - case itemText: - return it.val - case itemString, itemMultilineString, - itemRawString, itemRawMultilineString: - s, _ := p.value(it) - return s.(string) - default: - p.bug("Unexpected key type: %s", it.typ) - panic("unreachable") - } -} - -// value translates an expected value from the lexer into a Go value wrapped -// as an empty interface. -func (p *parser) value(it item) (interface{}, tomlType) { - switch it.typ { - case itemString: - return p.replaceEscapes(it.val), p.typeOfPrimitive(it) - case itemMultilineString: - trimmed := stripFirstNewline(stripEscapedWhitespace(it.val)) - return p.replaceEscapes(trimmed), p.typeOfPrimitive(it) - case itemRawString: - return it.val, p.typeOfPrimitive(it) - case itemRawMultilineString: - return stripFirstNewline(it.val), p.typeOfPrimitive(it) - case itemBool: - switch it.val { - case "true": - return true, p.typeOfPrimitive(it) - case "false": - return false, p.typeOfPrimitive(it) - } - p.bug("Expected boolean value, but got '%s'.", it.val) - case itemInteger: - if !numUnderscoresOK(it.val) { - p.panicf("Invalid integer %q: underscores must be surrounded by digits", - it.val) - } - val := strings.Replace(it.val, "_", "", -1) - num, err := strconv.ParseInt(val, 10, 64) - if err != nil { - // Distinguish integer values. Normally, it'd be a bug if the lexer - // provides an invalid integer, but it's possible that the number is - // out of range of valid values (which the lexer cannot determine). - // So mark the former as a bug but the latter as a legitimate user - // error. - if e, ok := err.(*strconv.NumError); ok && - e.Err == strconv.ErrRange { - - p.panicf("Integer '%s' is out of the range of 64-bit "+ - "signed integers.", it.val) - } else { - p.bug("Expected integer value, but got '%s'.", it.val) - } - } - return num, p.typeOfPrimitive(it) - case itemFloat: - parts := strings.FieldsFunc(it.val, func(r rune) bool { - switch r { - case '.', 'e', 'E': - return true - } - return false - }) - for _, part := range parts { - if !numUnderscoresOK(part) { - p.panicf("Invalid float %q: underscores must be "+ - "surrounded by digits", it.val) - } - } - if !numPeriodsOK(it.val) { - // As a special case, numbers like '123.' or '1.e2', - // which are valid as far as Go/strconv are concerned, - // must be rejected because TOML says that a fractional - // part consists of '.' followed by 1+ digits. - p.panicf("Invalid float %q: '.' must be followed "+ - "by one or more digits", it.val) - } - val := strings.Replace(it.val, "_", "", -1) - num, err := strconv.ParseFloat(val, 64) - if err != nil { - if e, ok := err.(*strconv.NumError); ok && - e.Err == strconv.ErrRange { - - p.panicf("Float '%s' is out of the range of 64-bit "+ - "IEEE-754 floating-point numbers.", it.val) - } else { - p.panicf("Invalid float value: %q", it.val) - } - } - return num, p.typeOfPrimitive(it) - case itemDatetime: - var t time.Time - var ok bool - var err error - for _, format := range []string{ - "2006-01-02T15:04:05Z07:00", - "2006-01-02T15:04:05", - "2006-01-02", - } { - t, err = time.ParseInLocation(format, it.val, time.Local) - if err == nil { - ok = true - break - } - } - if !ok { - p.panicf("Invalid TOML Datetime: %q.", it.val) - } - return t, p.typeOfPrimitive(it) - case itemArray: - array := make([]interface{}, 0) - types := make([]tomlType, 0) - - for it = p.next(); it.typ != itemArrayEnd; it = p.next() { - if it.typ == itemCommentStart { - p.expect(itemText) - continue - } - - val, typ := p.value(it) - array = append(array, val) - types = append(types, typ) - } - return array, p.typeOfArray(types) - case itemInlineTableStart: - var ( - hash = make(map[string]interface{}) - outerContext = p.context - outerKey = p.currentKey - ) - - p.context = append(p.context, p.currentKey) - p.currentKey = "" - for it := p.next(); it.typ != itemInlineTableEnd; it = p.next() { - if it.typ != itemKeyStart { - p.bug("Expected key start but instead found %q, around line %d", - it.val, p.approxLine) - } - if it.typ == itemCommentStart { - p.expect(itemText) - continue - } - - // retrieve key - k := p.next() - p.approxLine = k.line - kname := p.keyString(k) - - // retrieve value - p.currentKey = kname - val, typ := p.value(p.next()) - // make sure we keep metadata up to date - p.setType(kname, typ) - p.ordered = append(p.ordered, p.context.add(p.currentKey)) - hash[kname] = val - } - p.context = outerContext - p.currentKey = outerKey - return hash, tomlHash - } - p.bug("Unexpected value type: %s", it.typ) - panic("unreachable") -} - -// numUnderscoresOK checks whether each underscore in s is surrounded by -// characters that are not underscores. -func numUnderscoresOK(s string) bool { - accept := false - for _, r := range s { - if r == '_' { - if !accept { - return false - } - accept = false - continue - } - accept = true - } - return accept -} - -// numPeriodsOK checks whether every period in s is followed by a digit. -func numPeriodsOK(s string) bool { - period := false - for _, r := range s { - if period && !isDigit(r) { - return false - } - period = r == '.' - } - return !period -} - -// establishContext sets the current context of the parser, -// where the context is either a hash or an array of hashes. Which one is -// set depends on the value of the `array` parameter. -// -// Establishing the context also makes sure that the key isn't a duplicate, and -// will create implicit hashes automatically. -func (p *parser) establishContext(key Key, array bool) { - var ok bool - - // Always start at the top level and drill down for our context. - hashContext := p.mapping - keyContext := make(Key, 0) - - // We only need implicit hashes for key[0:-1] - for _, k := range key[0 : len(key)-1] { - _, ok = hashContext[k] - keyContext = append(keyContext, k) - - // No key? Make an implicit hash and move on. - if !ok { - p.addImplicit(keyContext) - hashContext[k] = make(map[string]interface{}) - } - - // If the hash context is actually an array of tables, then set - // the hash context to the last element in that array. - // - // Otherwise, it better be a table, since this MUST be a key group (by - // virtue of it not being the last element in a key). - switch t := hashContext[k].(type) { - case []map[string]interface{}: - hashContext = t[len(t)-1] - case map[string]interface{}: - hashContext = t - default: - p.panicf("Key '%s' was already created as a hash.", keyContext) - } - } - - p.context = keyContext - if array { - // If this is the first element for this array, then allocate a new - // list of tables for it. - k := key[len(key)-1] - if _, ok := hashContext[k]; !ok { - hashContext[k] = make([]map[string]interface{}, 0, 5) - } - - // Add a new table. But make sure the key hasn't already been used - // for something else. - if hash, ok := hashContext[k].([]map[string]interface{}); ok { - hashContext[k] = append(hash, make(map[string]interface{})) - } else { - p.panicf("Key '%s' was already created and cannot be used as "+ - "an array.", keyContext) - } - } else { - p.setValue(key[len(key)-1], make(map[string]interface{})) - } - p.context = append(p.context, key[len(key)-1]) -} - -// setValue sets the given key to the given value in the current context. -// It will make sure that the key hasn't already been defined, account for -// implicit key groups. -func (p *parser) setValue(key string, value interface{}) { - var tmpHash interface{} - var ok bool - - hash := p.mapping - keyContext := make(Key, 0) - for _, k := range p.context { - keyContext = append(keyContext, k) - if tmpHash, ok = hash[k]; !ok { - p.bug("Context for key '%s' has not been established.", keyContext) - } - switch t := tmpHash.(type) { - case []map[string]interface{}: - // The context is a table of hashes. Pick the most recent table - // defined as the current hash. - hash = t[len(t)-1] - case map[string]interface{}: - hash = t - default: - p.bug("Expected hash to have type 'map[string]interface{}', but "+ - "it has '%T' instead.", tmpHash) - } - } - keyContext = append(keyContext, key) - - if _, ok := hash[key]; ok { - // Typically, if the given key has already been set, then we have - // to raise an error since duplicate keys are disallowed. However, - // it's possible that a key was previously defined implicitly. In this - // case, it is allowed to be redefined concretely. (See the - // `tests/valid/implicit-and-explicit-after.toml` test in `toml-test`.) - // - // But we have to make sure to stop marking it as an implicit. (So that - // another redefinition provokes an error.) - // - // Note that since it has already been defined (as a hash), we don't - // want to overwrite it. So our business is done. - if p.isImplicit(keyContext) { - p.removeImplicit(keyContext) - return - } - - // Otherwise, we have a concrete key trying to override a previous - // key, which is *always* wrong. - p.panicf("Key '%s' has already been defined.", keyContext) - } - hash[key] = value -} - -// setType sets the type of a particular value at a given key. -// It should be called immediately AFTER setValue. -// -// Note that if `key` is empty, then the type given will be applied to the -// current context (which is either a table or an array of tables). -func (p *parser) setType(key string, typ tomlType) { - keyContext := make(Key, 0, len(p.context)+1) - for _, k := range p.context { - keyContext = append(keyContext, k) - } - if len(key) > 0 { // allow type setting for hashes - keyContext = append(keyContext, key) - } - p.types[keyContext.String()] = typ -} - -// addImplicit sets the given Key as having been created implicitly. -func (p *parser) addImplicit(key Key) { - p.implicits[key.String()] = true -} - -// removeImplicit stops tagging the given key as having been implicitly -// created. -func (p *parser) removeImplicit(key Key) { - p.implicits[key.String()] = false -} - -// isImplicit returns true if the key group pointed to by the key was created -// implicitly. -func (p *parser) isImplicit(key Key) bool { - return p.implicits[key.String()] -} - -// current returns the full key name of the current context. -func (p *parser) current() string { - if len(p.currentKey) == 0 { - return p.context.String() - } - if len(p.context) == 0 { - return p.currentKey - } - return fmt.Sprintf("%s.%s", p.context, p.currentKey) -} - -func stripFirstNewline(s string) string { - if len(s) == 0 || s[0] != '\n' { - return s - } - return s[1:] -} - -func stripEscapedWhitespace(s string) string { - esc := strings.Split(s, "\\\n") - if len(esc) > 1 { - for i := 1; i < len(esc); i++ { - esc[i] = strings.TrimLeftFunc(esc[i], unicode.IsSpace) - } - } - return strings.Join(esc, "") -} - -func (p *parser) replaceEscapes(str string) string { - var replaced []rune - s := []byte(str) - r := 0 - for r < len(s) { - if s[r] != '\\' { - c, size := utf8.DecodeRune(s[r:]) - r += size - replaced = append(replaced, c) - continue - } - r += 1 - if r >= len(s) { - p.bug("Escape sequence at end of string.") - return "" - } - switch s[r] { - default: - p.bug("Expected valid escape code after \\, but got %q.", s[r]) - return "" - case 'b': - replaced = append(replaced, rune(0x0008)) - r += 1 - case 't': - replaced = append(replaced, rune(0x0009)) - r += 1 - case 'n': - replaced = append(replaced, rune(0x000A)) - r += 1 - case 'f': - replaced = append(replaced, rune(0x000C)) - r += 1 - case 'r': - replaced = append(replaced, rune(0x000D)) - r += 1 - case '"': - replaced = append(replaced, rune(0x0022)) - r += 1 - case '\\': - replaced = append(replaced, rune(0x005C)) - r += 1 - case 'u': - // At this point, we know we have a Unicode escape of the form - // `uXXXX` at [r, r+5). (Because the lexer guarantees this - // for us.) - escaped := p.asciiEscapeToUnicode(s[r+1 : r+5]) - replaced = append(replaced, escaped) - r += 5 - case 'U': - // At this point, we know we have a Unicode escape of the form - // `uXXXX` at [r, r+9). (Because the lexer guarantees this - // for us.) - escaped := p.asciiEscapeToUnicode(s[r+1 : r+9]) - replaced = append(replaced, escaped) - r += 9 - } - } - return string(replaced) -} - -func (p *parser) asciiEscapeToUnicode(bs []byte) rune { - s := string(bs) - hex, err := strconv.ParseUint(strings.ToLower(s), 16, 32) - if err != nil { - p.bug("Could not parse '%s' as a hexadecimal number, but the "+ - "lexer claims it's OK: %s", s, err) - } - if !utf8.ValidRune(rune(hex)) { - p.panicf("Escaped character '\\u%s' is not valid UTF-8.", s) - } - return rune(hex) -} - -func isStringType(ty itemType) bool { - return ty == itemString || ty == itemMultilineString || - ty == itemRawString || ty == itemRawMultilineString -} diff --git a/vendor/github.com/BurntSushi/toml/type_check.go b/vendor/github.com/BurntSushi/toml/type_check.go deleted file mode 100644 index c73f8afc1..000000000 --- a/vendor/github.com/BurntSushi/toml/type_check.go +++ /dev/null @@ -1,91 +0,0 @@ -package toml - -// tomlType represents any Go type that corresponds to a TOML type. -// While the first draft of the TOML spec has a simplistic type system that -// probably doesn't need this level of sophistication, we seem to be militating -// toward adding real composite types. -type tomlType interface { - typeString() string -} - -// typeEqual accepts any two types and returns true if they are equal. -func typeEqual(t1, t2 tomlType) bool { - if t1 == nil || t2 == nil { - return false - } - return t1.typeString() == t2.typeString() -} - -func typeIsHash(t tomlType) bool { - return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash) -} - -type tomlBaseType string - -func (btype tomlBaseType) typeString() string { - return string(btype) -} - -func (btype tomlBaseType) String() string { - return btype.typeString() -} - -var ( - tomlInteger tomlBaseType = "Integer" - tomlFloat tomlBaseType = "Float" - tomlDatetime tomlBaseType = "Datetime" - tomlString tomlBaseType = "String" - tomlBool tomlBaseType = "Bool" - tomlArray tomlBaseType = "Array" - tomlHash tomlBaseType = "Hash" - tomlArrayHash tomlBaseType = "ArrayHash" -) - -// typeOfPrimitive returns a tomlType of any primitive value in TOML. -// Primitive values are: Integer, Float, Datetime, String and Bool. -// -// Passing a lexer item other than the following will cause a BUG message -// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime. -func (p *parser) typeOfPrimitive(lexItem item) tomlType { - switch lexItem.typ { - case itemInteger: - return tomlInteger - case itemFloat: - return tomlFloat - case itemDatetime: - return tomlDatetime - case itemString: - return tomlString - case itemMultilineString: - return tomlString - case itemRawString: - return tomlString - case itemRawMultilineString: - return tomlString - case itemBool: - return tomlBool - } - p.bug("Cannot infer primitive type of lex item '%s'.", lexItem) - panic("unreachable") -} - -// typeOfArray returns a tomlType for an array given a list of types of its -// values. -// -// In the current spec, if an array is homogeneous, then its type is always -// "Array". If the array is not homogeneous, an error is generated. -func (p *parser) typeOfArray(types []tomlType) tomlType { - // Empty arrays are cool. - if len(types) == 0 { - return tomlArray - } - - theType := types[0] - for _, t := range types[1:] { - if !typeEqual(theType, t) { - p.panicf("Array contains values of type '%s' and '%s', but "+ - "arrays must be homogeneous.", theType, t) - } - } - return tomlArray -} diff --git a/vendor/github.com/BurntSushi/toml/type_fields.go b/vendor/github.com/BurntSushi/toml/type_fields.go deleted file mode 100644 index 608997c22..000000000 --- a/vendor/github.com/BurntSushi/toml/type_fields.go +++ /dev/null @@ -1,242 +0,0 @@ -package toml - -// Struct field handling is adapted from code in encoding/json: -// -// 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 Go distribution. - -import ( - "reflect" - "sort" - "sync" -) - -// A field represents a single field found in a struct. -type field struct { - name string // the name of the field (`toml` tag included) - tag bool // whether field has a `toml` tag - index []int // represents the depth of an anonymous field - typ reflect.Type // the type of the field -} - -// byName sorts field by name, breaking ties with depth, -// then breaking ties with "name came from toml tag", then -// breaking ties with index sequence. -type byName []field - -func (x byName) Len() int { return len(x) } - -func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } - -func (x byName) Less(i, j int) bool { - if x[i].name != x[j].name { - return x[i].name < x[j].name - } - if len(x[i].index) != len(x[j].index) { - return len(x[i].index) < len(x[j].index) - } - if x[i].tag != x[j].tag { - return x[i].tag - } - return byIndex(x).Less(i, j) -} - -// byIndex sorts field by index sequence. -type byIndex []field - -func (x byIndex) Len() int { return len(x) } - -func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } - -func (x byIndex) Less(i, j int) bool { - for k, xik := range x[i].index { - if k >= len(x[j].index) { - return false - } - if xik != x[j].index[k] { - return xik < x[j].index[k] - } - } - return len(x[i].index) < len(x[j].index) -} - -// typeFields returns a list of fields that TOML should recognize for the given -// type. The algorithm is breadth-first search over the set of structs to -// include - the top struct and then any reachable anonymous structs. -func typeFields(t reflect.Type) []field { - // Anonymous fields to explore at the current level and the next. - current := []field{} - next := []field{{typ: t}} - - // Count of queued names for current level and the next. - count := map[reflect.Type]int{} - nextCount := map[reflect.Type]int{} - - // Types already visited at an earlier level. - visited := map[reflect.Type]bool{} - - // Fields found. - var fields []field - - for len(next) > 0 { - current, next = next, current[:0] - count, nextCount = nextCount, map[reflect.Type]int{} - - for _, f := range current { - if visited[f.typ] { - continue - } - visited[f.typ] = true - - // Scan f.typ for fields to include. - for i := 0; i < f.typ.NumField(); i++ { - sf := f.typ.Field(i) - if sf.PkgPath != "" && !sf.Anonymous { // unexported - continue - } - opts := getOptions(sf.Tag) - if opts.skip { - continue - } - index := make([]int, len(f.index)+1) - copy(index, f.index) - index[len(f.index)] = i - - ft := sf.Type - if ft.Name() == "" && ft.Kind() == reflect.Ptr { - // Follow pointer. - ft = ft.Elem() - } - - // Record found field and index sequence. - if opts.name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { - tagged := opts.name != "" - name := opts.name - if name == "" { - name = sf.Name - } - fields = append(fields, field{name, tagged, index, ft}) - if count[f.typ] > 1 { - // If there were multiple instances, add a second, - // so that the annihilation code will see a duplicate. - // It only cares about the distinction between 1 or 2, - // so don't bother generating any more copies. - fields = append(fields, fields[len(fields)-1]) - } - continue - } - - // Record new anonymous struct to explore in next round. - nextCount[ft]++ - if nextCount[ft] == 1 { - f := field{name: ft.Name(), index: index, typ: ft} - next = append(next, f) - } - } - } - } - - sort.Sort(byName(fields)) - - // Delete all fields that are hidden by the Go rules for embedded fields, - // except that fields with TOML tags are promoted. - - // The fields are sorted in primary order of name, secondary order - // of field index length. Loop over names; for each name, delete - // hidden fields by choosing the one dominant field that survives. - out := fields[:0] - for advance, i := 0, 0; i < len(fields); i += advance { - // One iteration per name. - // Find the sequence of fields with the name of this first field. - fi := fields[i] - name := fi.name - for advance = 1; i+advance < len(fields); advance++ { - fj := fields[i+advance] - if fj.name != name { - break - } - } - if advance == 1 { // Only one field with this name - out = append(out, fi) - continue - } - dominant, ok := dominantField(fields[i : i+advance]) - if ok { - out = append(out, dominant) - } - } - - fields = out - sort.Sort(byIndex(fields)) - - return fields -} - -// dominantField looks through the fields, all of which are known to -// have the same name, to find the single field that dominates the -// others using Go's embedding rules, modified by the presence of -// TOML tags. If there are multiple top-level fields, the boolean -// will be false: This condition is an error in Go and we skip all -// the fields. -func dominantField(fields []field) (field, bool) { - // The fields are sorted in increasing index-length order. The winner - // must therefore be one with the shortest index length. Drop all - // longer entries, which is easy: just truncate the slice. - length := len(fields[0].index) - tagged := -1 // Index of first tagged field. - for i, f := range fields { - if len(f.index) > length { - fields = fields[:i] - break - } - if f.tag { - if tagged >= 0 { - // Multiple tagged fields at the same level: conflict. - // Return no field. - return field{}, false - } - tagged = i - } - } - if tagged >= 0 { - return fields[tagged], true - } - // All remaining fields have the same length. If there's more than one, - // we have a conflict (two fields named "X" at the same level) and we - // return no field. - if len(fields) > 1 { - return field{}, false - } - return fields[0], true -} - -var fieldCache struct { - sync.RWMutex - m map[reflect.Type][]field -} - -// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. -func cachedTypeFields(t reflect.Type) []field { - fieldCache.RLock() - f := fieldCache.m[t] - fieldCache.RUnlock() - if f != nil { - return f - } - - // Compute fields without lock. - // Might duplicate effort but won't hold other computations back. - f = typeFields(t) - if f == nil { - f = []field{} - } - - fieldCache.Lock() - if fieldCache.m == nil { - fieldCache.m = map[reflect.Type][]field{} - } - fieldCache.m[t] = f - fieldCache.Unlock() - return f -} diff --git a/vendor/github.com/a8m/mark/LICENSE b/vendor/github.com/a8m/mark/LICENSE deleted file mode 100644 index e84e96027..000000000 --- a/vendor/github.com/a8m/mark/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -The MIT License - -Copyright (c) 2015 Ariel Mashraki - -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. \ No newline at end of file diff --git a/vendor/github.com/a8m/mark/cmd/mark/main.go b/vendor/github.com/a8m/mark/cmd/mark/main.go deleted file mode 100644 index 2fd1a7661..000000000 --- a/vendor/github.com/a8m/mark/cmd/mark/main.go +++ /dev/null @@ -1,94 +0,0 @@ -// mark command line tool. available at https://github.com/a8m/mark -package main - -import ( - "bufio" - "flag" - "fmt" - "io" - "os" - - "github.com/a8m/mark" -) - -var ( - input = flag.String("i", "", "") - output = flag.String("o", "", "") - smarty = flag.Bool("smartypants", false, "") - fractions = flag.Bool("fractions", false, "") -) - -var usage = `Usage: mark [options...] - -Options: - -i Specify file input, otherwise use last argument as input file. - If no input file is specified, read from stdin. - -o Specify file output. If none is specified, write to stdout. - - -smartypants Use "smart" typograhic punctuation for things like - quotes and dashes. - -fractions Traslate fraction like to suitable HTML elements -` - -func main() { - flag.Usage = func() { - fmt.Fprint(os.Stderr, fmt.Sprintf(usage)) - } - flag.Parse() - // read - var reader *bufio.Reader - if *input != "" { - file, err := os.Open(*input) - if err != nil { - usageAndExit(fmt.Sprintf("Error to open file input: %s.", *input)) - } - defer file.Close() - reader = bufio.NewReader(file) - } else { - stat, err := os.Stdin.Stat() - if err != nil || (stat.Mode()&os.ModeCharDevice) != 0 { - usageAndExit("") - } - reader = bufio.NewReader(os.Stdin) - } - // collect data - var data string - for { - line, err := reader.ReadString('\n') - if err != nil { - if err == io.EOF { - break - } - usageAndExit("failed to reading input.") - } - data += line - } - // write - var ( - err error - file = os.Stdout - ) - if *output != "" { - if file, err = os.Create(*output); err != nil { - usageAndExit("error to create the wanted output file.") - } - } - // mark rendering - opts := mark.DefaultOptions() - opts.Smartypants = *smarty - opts.Fractions = *fractions - m := mark.New(data, opts) - if _, err := file.WriteString(m.Render()); err != nil { - usageAndExit(fmt.Sprintf("error writing output to: %s.", file.Name())) - } -} - -func usageAndExit(msg string) { - if msg != "" { - fmt.Fprintf(os.Stderr, msg) - fmt.Fprintf(os.Stderr, "\n\n") - } - flag.Usage() - fmt.Fprintf(os.Stderr, "\n") - os.Exit(1) -} diff --git a/vendor/github.com/a8m/mark/grammar.go b/vendor/github.com/a8m/mark/grammar.go deleted file mode 100644 index 7e741731e..000000000 --- a/vendor/github.com/a8m/mark/grammar.go +++ /dev/null @@ -1,92 +0,0 @@ -package mark - -import ( - "fmt" - "regexp" -) - -// Block Grammar -var ( - reHr = regexp.MustCompile(`^(?:(?:\* *){3,}|(?:_ *){3,}|(?:- *){3,}) *(?:\n+|$)`) - reHeading = regexp.MustCompile(`^ *(#{1,6})(?: +#*| +([^\n]*?)|)(?: +#*|) *(?:\n|$)`) - reLHeading = regexp.MustCompile(`^([^\n]+?) *\n {0,3}(=|-){1,} *(?:\n+|$)`) - reBlockQuote = regexp.MustCompile(`^ *>[^\n]*(\n[^\n]+)*\n*`) - reDefLink = regexp.MustCompile(`(?s)^ *\[([^\]]+)\]: *\n? *]+)>?(?: *\n? *["'(](.+?)['")])? *(?:\n+|$)`) - reSpaceGen = func(i int) *regexp.Regexp { - return regexp.MustCompile(fmt.Sprintf(`(?m)^ {1,%d}`, i)) - } -) - -var reList = struct { - item, marker, loose *regexp.Regexp - scanLine, scanNewLine func(src string) string -}{ - regexp.MustCompile(`^( *)(?:[*+-]|\d{1,9}\.) (.*)(?:\n|)`), - regexp.MustCompile(`^ *([*+-]|\d+\.) +`), - regexp.MustCompile(`(?m)\n\n(.*)`), - regexp.MustCompile(`^(.*)(?:\n|)`).FindString, - regexp.MustCompile(`^\n{1,}`).FindString, -} - -var reCodeBlock = struct { - *regexp.Regexp - trim func(src, repl string) string -}{ - regexp.MustCompile(`^( {4}[^\n]+(?: *\n)*)+`), - regexp.MustCompile("(?m)^( {0,4})").ReplaceAllLiteralString, -} - -var reGfmCode = struct { - *regexp.Regexp - endGen func(end string, i int) *regexp.Regexp -}{ - regexp.MustCompile("^( {0,3})([`~]{3,}) *(\\S*)?(?:.*)"), - func(end string, i int) *regexp.Regexp { - return regexp.MustCompile(fmt.Sprintf(`(?s)(.*?)(?:((?m)^ {0,3}%s{%d,} *$)|$)`, end, i)) - }, -} - -var reTable = struct { - item, itemLp *regexp.Regexp - split func(s string, n int) []string - trim func(src, repl string) string -}{ - regexp.MustCompile(`^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*`), - regexp.MustCompile(`(^ *\|.+)\n( *\| *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*`), - regexp.MustCompile(` *\| *`).Split, - regexp.MustCompile(`^ *\| *| *\| *$`).ReplaceAllString, -} - -var reHTML = struct { - CDATA_OPEN, CDATA_CLOSE string - item, comment, tag, span *regexp.Regexp - endTagGen func(tag string) *regexp.Regexp -}{ - `![CDATA[`, - "?\\]\\]", - regexp.MustCompile(`^<(\w+|!\[CDATA\[)(?:"[^"]*"|'[^']*'|[^'">])*?>`), - regexp.MustCompile(`(?sm)`), - regexp.MustCompile(`^|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>`), - // TODO: Add all span-tags and move to config. - regexp.MustCompile(`^(a|em|strong|small|s|q|data|time|code|sub|sup|i|b|u|span|br|del|img)$`), - func(tag string) *regexp.Regexp { - return regexp.MustCompile(fmt.Sprintf(`(?s)(.+?)<\/%s> *`, tag)) - }, -} - -// Inline Grammar -var ( - reBr = regexp.MustCompile(`^(?: {2,}|\\)\n`) - reLinkText = `(?:\[[^\]]*\]|[^\[\]]|\])*` - reLinkHref = `\s*?(?:\s+['"\(](.*?)['"\)])?\s*` - reGfmLink = regexp.MustCompile(`^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])`) - reLink = regexp.MustCompile(fmt.Sprintf(`(?s)^!?\[(%s)\]\(%s\)`, reLinkText, reLinkHref)) - reAutoLink = regexp.MustCompile(`^<([^ >]+(@|:\/)[^ >]+)>`) - reRefLink = regexp.MustCompile(`^!?\[((?:\[[^\]]*\]|[^\[\]]|\])*)\](?:\s*\[([^\]]*)\])?`) - reImage = regexp.MustCompile(fmt.Sprintf(`(?s)^!?\[(%s)\]\(%s\)`, reLinkText, reLinkHref)) - reCode = regexp.MustCompile("(?s)^`{1,2}\\s*(.*?[^`])\\s*`{1,2}") - reStrike = regexp.MustCompile(`(?s)^~{2}(.+?)~{2}`) - reEmphasise = `(?s)^_{%[1]d}(\S.*?_*)_{%[1]d}|^\*{%[1]d}(\S.*?\**)\*{%[1]d}` - reItalic = regexp.MustCompile(fmt.Sprintf(reEmphasise, 1)) - reStrong = regexp.MustCompile(fmt.Sprintf(reEmphasise, 2)) -) diff --git a/vendor/github.com/a8m/mark/lexer.go b/vendor/github.com/a8m/mark/lexer.go deleted file mode 100644 index 33867931c..000000000 --- a/vendor/github.com/a8m/mark/lexer.go +++ /dev/null @@ -1,568 +0,0 @@ -package mark - -import ( - "regexp" - "strings" - "unicode/utf8" -) - -// type position -type Pos int - -// itemType identifies the type of lex items. -type itemType int - -// Item represent a token or text string returned from the scanner -type item struct { - typ itemType // The type of this item. - pos Pos // The starting position, in bytes, of this item in the input string. - val string // The value of this item. -} - -const eof = -1 // Zero value so closed channel delivers EOF - -const ( - itemError itemType = iota // Error occurred; value is text of error - itemEOF - itemNewLine - itemHTML - itemHeading - itemLHeading - itemBlockQuote - itemList - itemListItem - itemLooseItem - itemCodeBlock - itemGfmCodeBlock - itemHr - itemTable - itemLpTable - itemTableRow - itemTableCell - itemStrong - itemItalic - itemStrike - itemCode - itemLink - itemDefLink - itemRefLink - itemAutoLink - itemGfmLink - itemImage - itemRefImage - itemText - itemBr - itemPipe - itemIndent -) - -// stateFn represents the state of the scanner as a function that returns the next state. -type stateFn func(*lexer) stateFn - -// Lexer interface, used to composed it inside the parser -type Lexer interface { - nextItem() item -} - -// lexer holds the state of the scanner. -type lexer struct { - input string // the string being scanned - state stateFn // the next lexing function to enter - pos Pos // current position in the input - start Pos // start position of this item - width Pos // width of last rune read from input - lastPos Pos // position of most recent item returned by nextItem - items chan item // channel of scanned items -} - -// lex creates a new lexer for the input string. -func lex(input string) *lexer { - l := &lexer{ - input: input, - items: make(chan item), - } - go l.run() - return l -} - -// lexInline create a new lexer for one phase lexing(inline blocks). -func lexInline(input string) *lexer { - l := &lexer{ - input: input, - items: make(chan item), - } - go l.lexInline() - return l -} - -// run runs the state machine for the lexer. -func (l *lexer) run() { - for l.state = lexAny; l.state != nil; { - l.state = l.state(l) - } - close(l.items) -} - -// next return the next rune in the input -func (l *lexer) next() rune { - if int(l.pos) >= len(l.input) { - l.width = 0 - return eof - } - r, w := utf8.DecodeRuneInString(l.input[l.pos:]) - l.width = Pos(w) - l.pos += l.width - return r -} - -// lexAny scanner is kind of forwarder, it get the current char in the text -// and forward it to the appropriate scanner based on some conditions. -func lexAny(l *lexer) stateFn { - switch r := l.peek(); r { - case '*', '-', '_': - return lexHr - case '+', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': - return lexList - case '<': - return lexHTML - case '>': - return lexBlockQuote - case '[': - return lexDefLink - case '#': - return lexHeading - case '`', '~': - return lexGfmCode - case ' ': - if reCodeBlock.MatchString(l.input[l.pos:]) { - return lexCode - } else if reGfmCode.MatchString(l.input[l.pos:]) { - return lexGfmCode - } - // Keep moving forward until we get all the indentation size - for ; r == l.peek(); r = l.next() { - } - l.emit(itemIndent) - return lexAny - case '|': - if m := reTable.itemLp.MatchString(l.input[l.pos:]); m { - l.emit(itemLpTable) - return lexTable - } - fallthrough - default: - if m := reTable.item.MatchString(l.input[l.pos:]); m { - l.emit(itemTable) - return lexTable - } - return lexText - } -} - -// lexHeading test if the current text position is an heading item. -// is so, it will emit an item and return back to lenAny function -// else, lex it as a simple text value -func lexHeading(l *lexer) stateFn { - if m := reHeading.FindString(l.input[l.pos:]); m != "" { - l.pos += Pos(len(m)) - l.emit(itemHeading) - return lexAny - } - return lexText -} - -// lexHr test if the current text position is an horizontal rules item. -// is so, it will emit an horizontal rule item and return back to lenAny function -// else, forward it to lexList function -func lexHr(l *lexer) stateFn { - if match := reHr.FindString(l.input[l.pos:]); match != "" { - l.pos += Pos(len(match)) - l.emit(itemHr) - return lexAny - } - return lexList -} - -// lexGfmCode test if the current text position is start of GFM code-block item. -// if so, it will generate regexp based on the fence type[`~] and it length. -// it scan until the end, and then emit the code-block item and return back to the -// lenAny forwarder. -// else, lex it as a simple inline text. -func lexGfmCode(l *lexer) stateFn { - if match := reGfmCode.FindStringSubmatch(l.input[l.pos:]); len(match) != 0 { - l.pos += Pos(len(match[0])) - fence := match[2] - // Generate Regexp based on fence type[`~] and length - reGfmEnd := reGfmCode.endGen(fence[0:1], len(fence)) - infoContainer := reGfmEnd.FindStringSubmatch(l.input[l.pos:]) - l.pos += Pos(len(infoContainer[0])) - infoString := infoContainer[1] - // Remove leading and trailing spaces - if indent := len(match[1]); indent > 0 { - reSpace := reSpaceGen(indent) - infoString = reSpace.ReplaceAllString(infoString, "") - } - l.emit(itemGfmCodeBlock, match[0]+infoString) - return lexAny - } - return lexText -} - -// lexCode scans code block. -func lexCode(l *lexer) stateFn { - match := reCodeBlock.FindString(l.input[l.pos:]) - l.pos += Pos(len(match)) - l.emit(itemCodeBlock) - return lexAny -} - -// lexText scans until end-of-line(\n) -func lexText(l *lexer) stateFn { - // Drain text before emitting - emit := func(item itemType, pos Pos) { - if l.pos > l.start { - l.emit(itemText) - } - l.pos += pos - l.emit(item) - } -Loop: - for { - switch r := l.peek(); r { - case eof: - emit(itemEOF, Pos(0)) - break Loop - case '\n': - // CM 4.4: An indented code block cannot interrupt a paragraph. - if l.pos > l.start && strings.HasPrefix(l.input[l.pos+1:], " ") { - l.next() - continue - } - emit(itemNewLine, l.width) - break Loop - default: - // Test for Setext-style headers - if m := reLHeading.FindString(l.input[l.pos:]); m != "" { - emit(itemLHeading, Pos(len(m))) - break Loop - } - l.next() - } - } - return lexAny -} - -// backup steps back one rune. Can only be called once per call of next. -func (l *lexer) backup() { - l.pos -= l.width -} - -// peek returns but does not consume the next rune in the input. -func (l *lexer) peek() rune { - r := l.next() - l.backup() - return r -} - -// emit passes an item back to the client. -func (l *lexer) emit(t itemType, s ...string) { - if len(s) == 0 { - s = append(s, l.input[l.start:l.pos]) - } - l.items <- item{t, l.start, s[0]} - l.start = l.pos -} - -// lexItem return the next item token, called by the parser. -func (l *lexer) nextItem() item { - item := <-l.items - l.lastPos = l.pos - return item -} - -// One phase lexing(inline reason) -func (l *lexer) lexInline() { - escape := regexp.MustCompile("^\\\\([\\`*{}\\[\\]()#+\\-.!_>~|])") - // Drain text before emitting - emit := func(item itemType, pos int) { - if l.pos > l.start { - l.emit(itemText) - } - l.pos += Pos(pos) - l.emit(item) - } -Loop: - for { - switch r := l.peek(); r { - case eof: - if l.pos > l.start { - l.emit(itemText) - } - break Loop - // backslash escaping - case '\\': - if m := escape.FindStringSubmatch(l.input[l.pos:]); len(m) != 0 { - if l.pos > l.start { - l.emit(itemText) - } - l.pos += Pos(len(m[0])) - l.emit(itemText, m[1]) - break - } - fallthrough - case ' ': - if m := reBr.FindString(l.input[l.pos:]); m != "" { - // pos - length of new-line - emit(itemBr, len(m)) - break - } - l.next() - case '_', '*', '~', '`': - input := l.input[l.pos:] - // Strong - if m := reStrong.FindString(input); m != "" { - emit(itemStrong, len(m)) - break - } - // Italic - if m := reItalic.FindString(input); m != "" { - emit(itemItalic, len(m)) - break - } - // Strike - if m := reStrike.FindString(input); m != "" { - emit(itemStrike, len(m)) - break - } - // InlineCode - if m := reCode.FindString(input); m != "" { - emit(itemCode, len(m)) - break - } - l.next() - // itemLink, itemImage, itemRefLink, itemRefImage - case '[', '!': - input := l.input[l.pos:] - if m := reLink.FindString(input); m != "" { - pos := len(m) - if r == '[' { - emit(itemLink, pos) - } else { - emit(itemImage, pos) - } - break - } - if m := reRefLink.FindString(input); m != "" { - pos := len(m) - if r == '[' { - emit(itemRefLink, pos) - } else { - emit(itemRefImage, pos) - } - break - } - l.next() - // itemAutoLink, htmlBlock - case '<': - if m := reAutoLink.FindString(l.input[l.pos:]); m != "" { - emit(itemAutoLink, len(m)) - break - } - if match, res := l.matchHTML(l.input[l.pos:]); match { - emit(itemHTML, len(res)) - break - } - l.next() - default: - if m := reGfmLink.FindString(l.input[l.pos:]); m != "" { - emit(itemGfmLink, len(m)) - break - } - l.next() - } - } - close(l.items) -} - -// lexHTML. -func lexHTML(l *lexer) stateFn { - if match, res := l.matchHTML(l.input[l.pos:]); match { - l.pos += Pos(len(res)) - l.emit(itemHTML) - return lexAny - } - return lexText -} - -// Test if the given input is match the HTML pattern(blocks only) -func (l *lexer) matchHTML(input string) (bool, string) { - if m := reHTML.comment.FindString(input); m != "" { - return true, m - } - if m := reHTML.item.FindStringSubmatch(input); len(m) != 0 { - el, name := m[0], m[1] - // if name is a span... is a text - if reHTML.span.MatchString(name) { - return false, "" - } - // if it's a self-closed html element, but not a itemAutoLink - if strings.HasSuffix(el, "/>") && !reAutoLink.MatchString(el) { - return true, el - } - if name == reHTML.CDATA_OPEN { - name = reHTML.CDATA_CLOSE - } - reEndTag := reHTML.endTagGen(name) - if m := reEndTag.FindString(input); m != "" { - return true, m - } - } - return false, "" -} - -// lexDefLink scans link definition -func lexDefLink(l *lexer) stateFn { - if m := reDefLink.FindString(l.input[l.pos:]); m != "" { - l.pos += Pos(len(m)) - l.emit(itemDefLink) - return lexAny - } - return lexText -} - -// lexList scans ordered and unordered lists. -func lexList(l *lexer) stateFn { - match, items := l.matchList(l.input[l.pos:]) - if !match { - return lexText - } - var space int - var typ itemType - for i, item := range items { - // Emit itemList on the first loop - if i == 0 { - l.emit(itemList, reList.marker.FindStringSubmatch(item)[1]) - } - // Initialize each loop - typ = itemListItem - space = len(item) - l.pos += Pos(space) - item = reList.marker.ReplaceAllString(item, "") - // Indented - if strings.Contains(item, "\n ") { - space -= len(item) - reSpace := reSpaceGen(space) - item = reSpace.ReplaceAllString(item, "") - } - // If current is loose - for _, l := range reList.loose.FindAllString(item, -1) { - if len(strings.TrimSpace(l)) > 0 || i != len(items)-1 { - typ = itemLooseItem - break - } - } - // or previous - if typ != itemLooseItem && i > 0 && strings.HasSuffix(items[i-1], "\n\n") { - typ = itemLooseItem - } - l.emit(typ, strings.TrimSpace(item)) - } - return lexAny -} - -func (l *lexer) matchList(input string) (bool, []string) { - var res []string - reItem := reList.item - if !reItem.MatchString(input) { - return false, res - } - // First item - m := reItem.FindStringSubmatch(input) - item, depth := m[0], len(m[1]) - input = input[len(item):] - // Loop over the input - for len(input) > 0 { - // Count new-lines('\n') - if m := reList.scanNewLine(input); m != "" { - item += m - input = input[len(m):] - if len(m) >= 2 || !reItem.MatchString(input) && !strings.HasPrefix(input, " ") { - break - } - } - // DefLink or hr - if reDefLink.MatchString(input) || reHr.MatchString(input) { - break - } - // It's list in the same depth - if m := reItem.FindStringSubmatch(input); len(m) > 0 && len(m[1]) == depth { - if item != "" { - res = append(res, item) - } - item = m[0] - input = input[len(item):] - } else { - m := reList.scanLine(input) - item += m - input = input[len(m):] - } - } - // Drain res - if item != "" { - res = append(res, item) - } - return true, res -} - -// Test if the given input match blockquote -func (l *lexer) matchBlockQuote(input string) (bool, string) { - match := reBlockQuote.FindString(input) - if match == "" { - return false, match - } - lines := strings.Split(match, "\n") - for i, line := range lines { - // if line is a link-definition or horizontal role, we cut the match until this point - if reDefLink.MatchString(line) || reHr.MatchString(line) { - match = strings.Join(lines[0:i], "\n") - break - } - } - return true, match -} - -// lexBlockQuote -func lexBlockQuote(l *lexer) stateFn { - if match, res := l.matchBlockQuote(l.input[l.pos:]); match { - l.pos += Pos(len(res)) - l.emit(itemBlockQuote) - return lexAny - } - return lexText -} - -// lexTable -func lexTable(l *lexer) stateFn { - re := reTable.item - if l.peek() == '|' { - re = reTable.itemLp - } - table := re.FindStringSubmatch(l.input[l.pos:]) - l.pos += Pos(len(table[0])) - l.start = l.pos - // Ignore the first match, and flat all rows(by splitting \n) - rows := append(table[1:3], strings.Split(table[3], "\n")...) - for _, row := range rows { - if row == "" { - continue - } - l.emit(itemTableRow) - rawCells := reTable.trim(row, "") - cells := reTable.split(rawCells, -1) - // Emit cells in the current row - for _, cell := range cells { - l.emit(itemTableCell, cell) - } - } - return lexAny -} diff --git a/vendor/github.com/a8m/mark/mark.go b/vendor/github.com/a8m/mark/mark.go deleted file mode 100644 index f8a2cee8a..000000000 --- a/vendor/github.com/a8m/mark/mark.go +++ /dev/null @@ -1,60 +0,0 @@ -package mark - -import "strings" - -// Mark -type Mark struct { - *parse - Input string -} - -// Mark options used to configure your Mark object -// set `Smartypants` and `Fractions` to true to enable -// smartypants and smartfractions rendering. -type Options struct { - Gfm bool - Tables bool - Smartypants bool - Fractions bool -} - -// DefaultOptions return an options struct with default configuration -// it's means that only Gfm, and Tables set to true. -func DefaultOptions() *Options { - return &Options{ - Gfm: true, - Tables: true, - } -} - -// New return a new Mark -func New(input string, opts *Options) *Mark { - // Preprocessing - input = strings.Replace(input, "\t", " ", -1) - if opts == nil { - opts = DefaultOptions() - } - return &Mark{ - Input: input, - parse: newParse(input, opts), - } -} - -// parse and render input -func (m *Mark) Render() string { - m.parse.parse() - m.render() - return m.output -} - -// AddRenderFn let you pass NodeType, and RenderFn function -// and override the default Node rendering -func (m *Mark) AddRenderFn(typ NodeType, fn RenderFn) { - m.renderFn[typ] = fn -} - -// Staic render function -func Render(input string) string { - m := New(input, nil) - return m.Render() -} diff --git a/vendor/github.com/a8m/mark/node.go b/vendor/github.com/a8m/mark/node.go deleted file mode 100644 index 9801af049..000000000 --- a/vendor/github.com/a8m/mark/node.go +++ /dev/null @@ -1,614 +0,0 @@ -package mark - -import ( - "fmt" - "regexp" - "strconv" - "strings" -) - -// A Node is an element in the parse tree. -type Node interface { - Type() NodeType - Render() string -} - -// NodeType identifies the type of a parse tree node. -type NodeType int - -// Type returns itself and provides an easy default implementation -// for embedding in a Node. Embedded in all non-trivial Nodes. -func (t NodeType) Type() NodeType { - return t -} - -// Render function, used for overriding default rendering. -type RenderFn func(Node) string - -const ( - NodeText NodeType = iota // A plain text - NodeParagraph // A Paragraph - NodeEmphasis // An emphasis(strong, em, ...) - NodeHeading // A heading (h1, h2, ...) - NodeBr // A link break - NodeHr // A horizontal rule - NodeImage // An image - NodeRefImage // A image reference - NodeList // A list of ListItems - NodeListItem // A list item node - NodeLink // A link(href) - NodeRefLink // A link reference - NodeDefLink // A link definition - NodeTable // A table of NodeRows - NodeRow // A row of NodeCells - NodeCell // A table-cell(td) - NodeCode // A code block(wrapped with pre) - NodeBlockQuote // A blockquote - NodeHTML // An inline HTML - NodeCheckbox // A checkbox -) - -// ParagraphNode hold simple paragraph node contains text -// that may be emphasis. -type ParagraphNode struct { - NodeType - Pos - Nodes []Node -} - -// Render returns the html representation of ParagraphNode -func (n *ParagraphNode) Render() (s string) { - for _, node := range n.Nodes { - s += node.Render() - } - return wrap("p", s) -} - -func (p *parse) newParagraph(pos Pos) *ParagraphNode { - return &ParagraphNode{NodeType: NodeParagraph, Pos: pos} -} - -// TextNode holds plain text. -type TextNode struct { - NodeType - Pos - Text string -} - -// Render returns the string representation of TexNode -func (n *TextNode) Render() string { - return n.Text -} - -func (p *parse) newText(pos Pos, text string) *TextNode { - return &TextNode{NodeType: NodeText, Pos: pos, Text: p.text(text)} -} - -// HTMLNode holds the raw html source. -type HTMLNode struct { - NodeType - Pos - Src string -} - -// Render returns the src of the HTMLNode -func (n *HTMLNode) Render() string { - return n.Src -} - -func (p *parse) newHTML(pos Pos, src string) *HTMLNode { - return &HTMLNode{NodeType: NodeHTML, Pos: pos, Src: src} -} - -// HrNode represents horizontal rule -type HrNode struct { - NodeType - Pos -} - -// Render returns the html representation of hr. -func (n *HrNode) Render() string { - return "
" -} - -func (p *parse) newHr(pos Pos) *HrNode { - return &HrNode{NodeType: NodeHr, Pos: pos} -} - -// BrNode represents a link-break element. -type BrNode struct { - NodeType - Pos -} - -// Render returns the html representation of line-break. -func (n *BrNode) Render() string { - return "
" -} - -func (p *parse) newBr(pos Pos) *BrNode { - return &BrNode{NodeType: NodeBr, Pos: pos} -} - -// EmphasisNode holds plain-text wrapped with style. -// (strong, em, del, code) -type EmphasisNode struct { - NodeType - Pos - Style itemType - Nodes []Node -} - -// Tag return the tagName based on the Style field. -func (n *EmphasisNode) Tag() (s string) { - switch n.Style { - case itemStrong: - s = "strong" - case itemItalic: - s = "em" - case itemStrike: - s = "del" - case itemCode: - s = "code" - } - return -} - -// Return the html representation of emphasis text. -func (n *EmphasisNode) Render() string { - var s string - for _, node := range n.Nodes { - s += node.Render() - } - return wrap(n.Tag(), s) -} - -func (p *parse) newEmphasis(pos Pos, style itemType) *EmphasisNode { - return &EmphasisNode{NodeType: NodeEmphasis, Pos: pos, Style: style} -} - -// HeadingNode holds heaing element with specific level(1-6). -type HeadingNode struct { - NodeType - Pos - Level int - Text string - Nodes []Node -} - -// Render returns the html representation based on heading level. -func (n *HeadingNode) Render() (s string) { - for _, node := range n.Nodes { - s += node.Render() - } - re := regexp.MustCompile(`[^\w]+`) - id := re.ReplaceAllString(n.Text, "-") - // ToLowerCase - id = strings.ToLower(id) - return fmt.Sprintf("<%[1]s id=\"%s\">%s", "h"+strconv.Itoa(n.Level), id, s) -} - -func (p *parse) newHeading(pos Pos, level int, text string) *HeadingNode { - return &HeadingNode{NodeType: NodeHeading, Pos: pos, Level: level, Text: p.text(text)} -} - -// Code holds CodeBlock node with specific lang field. -type CodeNode struct { - NodeType - Pos - Lang, Text string -} - -// Return the html representation of codeBlock -func (n *CodeNode) Render() string { - var attr string - if n.Lang != "" { - attr = fmt.Sprintf(" class=\"lang-%s\"", n.Lang) - } - code := fmt.Sprintf("<%[1]s%s>%s", "code", attr, n.Text) - return wrap("pre", code) -} - -func (p *parse) newCode(pos Pos, lang, text string) *CodeNode { - // DRY: see `escape()` below - text = strings.NewReplacer("<", "<", ">", ">", "\"", """, "&", "&").Replace(text) - return &CodeNode{NodeType: NodeCode, Pos: pos, Lang: lang, Text: text} -} - -// Link holds a tag with optional title -type LinkNode struct { - NodeType - Pos - Title, Href string - Nodes []Node -} - -// Return the html representation of link node -func (n *LinkNode) Render() (s string) { - for _, node := range n.Nodes { - s += node.Render() - } - attrs := fmt.Sprintf("href=\"%s\"", n.Href) - if n.Title != "" { - attrs += fmt.Sprintf(" title=\"%s\"", n.Title) - } - return fmt.Sprintf("%s", attrs, s) -} - -func (p *parse) newLink(pos Pos, title, href string, nodes ...Node) *LinkNode { - return &LinkNode{NodeType: NodeLink, Pos: pos, Title: p.text(title), Href: p.text(href), Nodes: nodes} -} - -// RefLink holds link with refrence to link definition -type RefNode struct { - NodeType - Pos - tr *parse - Text, Ref, Raw string - Nodes []Node -} - -// rendering based type -func (n *RefNode) Render() string { - var node Node - ref := strings.ToLower(n.Ref) - if l, ok := n.tr.links[ref]; ok { - if n.Type() == NodeRefLink { - node = n.tr.newLink(n.Pos, l.Title, l.Href, n.Nodes...) - } else { - node = n.tr.newImage(n.Pos, l.Title, l.Href, n.Text) - } - } else { - node = n.tr.newText(n.Pos, n.Raw) - } - return node.Render() -} - -// newRefLink create new RefLink that suitable for link -func (p *parse) newRefLink(typ itemType, pos Pos, raw, ref string, text []Node) *RefNode { - return &RefNode{NodeType: NodeRefLink, Pos: pos, tr: p.root(), Raw: raw, Ref: ref, Nodes: text} -} - -// newRefImage create new RefLink that suitable for image -func (p *parse) newRefImage(typ itemType, pos Pos, raw, ref, text string) *RefNode { - return &RefNode{NodeType: NodeRefImage, Pos: pos, tr: p.root(), Raw: raw, Ref: ref, Text: text} -} - -// DefLinkNode refresent single reference to link-definition -type DefLinkNode struct { - NodeType - Pos - Name, Href, Title string -} - -// Deflink have no representation(Transparent node) -func (n *DefLinkNode) Render() string { - return "" -} - -func (p *parse) newDefLink(pos Pos, name, href, title string) *DefLinkNode { - return &DefLinkNode{NodeType: NodeLink, Pos: pos, Name: name, Href: href, Title: title} -} - -// ImageNode represents an image element with optional alt and title attributes. -type ImageNode struct { - NodeType - Pos - Title, Src, Alt string -} - -// Render returns the html representation on image node -func (n *ImageNode) Render() string { - attrs := fmt.Sprintf("src=\"%s\" alt=\"%s\"", n.Src, n.Alt) - if n.Title != "" { - attrs += fmt.Sprintf(" title=\"%s\"", n.Title) - } - return fmt.Sprintf("", attrs) -} - -func (p *parse) newImage(pos Pos, title, src, alt string) *ImageNode { - return &ImageNode{NodeType: NodeImage, Pos: pos, Title: p.text(title), Src: p.text(src), Alt: p.text(alt)} -} - -// ListNode holds list items nodes in ordered or unordered states. -type ListNode struct { - NodeType - Pos - Ordered bool - Items []*ListItemNode -} - -func (n *ListNode) append(item *ListItemNode) { - n.Items = append(n.Items, item) -} - -// Render returns the html representation of orderd(ol) or unordered(ul) list. -func (n *ListNode) Render() (s string) { - tag := "ul" - if n.Ordered { - tag = "ol" - } - for _, item := range n.Items { - s += "\n" + item.Render() - } - s += "\n" - return wrap(tag, s) -} - -func (p *parse) newList(pos Pos, ordered bool) *ListNode { - return &ListNode{NodeType: NodeList, Pos: pos, Ordered: ordered} -} - -// ListItem represents single item in ListNode that may contains nested nodes. -type ListItemNode struct { - NodeType - Pos - Nodes []Node -} - -func (l *ListItemNode) append(n Node) { - l.Nodes = append(l.Nodes, n) -} - -// Render returns the html representation of list-item -func (l *ListItemNode) Render() (s string) { - for _, node := range l.Nodes { - s += node.Render() - } - return wrap("li", s) -} - -func (p *parse) newListItem(pos Pos) *ListItemNode { - return &ListItemNode{NodeType: NodeListItem, Pos: pos} -} - -// TableNode represents table element contains head and body -type TableNode struct { - NodeType - Pos - Rows []*RowNode -} - -func (n *TableNode) append(row *RowNode) { - n.Rows = append(n.Rows, row) -} - -// Render returns the html representation of a table -func (n *TableNode) Render() string { - var s string - for i, row := range n.Rows { - s += "\n" - switch i { - case 0: - s += wrap("thead", "\n"+row.Render()+"\n") - case 1: - s += "\n" - fallthrough - default: - s += row.Render() - } - } - s += "\n\n" - return wrap("table", s) -} - -func (p *parse) newTable(pos Pos) *TableNode { - return &TableNode{NodeType: NodeTable, Pos: pos} -} - -// RowNode represnt tr that holds list of cell-nodes -type RowNode struct { - NodeType - Pos - Cells []*CellNode -} - -func (r *RowNode) append(cell *CellNode) { - r.Cells = append(r.Cells, cell) -} - -// Render returns the html representation of table-row -func (r *RowNode) Render() string { - var s string - for _, cell := range r.Cells { - s += "\n" + cell.Render() - } - s += "\n" - return wrap("tr", s) -} - -func (p *parse) newRow(pos Pos) *RowNode { - return &RowNode{NodeType: NodeRow, Pos: pos} -} - -// AlignType identifies the aligment-type of specfic cell. -type AlignType int - -// Align returns itself and provides an easy default implementation -// for embedding in a Node. -func (t AlignType) Align() AlignType { - return t -} - -// Alignment -const ( - None AlignType = iota - Right - Left - Center -) - -// Cell types -const ( - Header = iota - Data -) - -// CellNode represents table-data/cell that holds simple text(may be emphasis) -// Note: the text in elements are bold and centered by default. -type CellNode struct { - NodeType - Pos - AlignType - Kind int - Nodes []Node -} - -// Render returns the html reprenestation of table-cell -func (c *CellNode) Render() string { - var s string - tag := "td" - if c.Kind == Header { - tag = "th" - } - for _, node := range c.Nodes { - s += node.Render() - } - return fmt.Sprintf("<%[1]s%s>%s", tag, c.Style(), s) -} - -// Style return the cell-style based on alignment field -func (c *CellNode) Style() string { - s := " style=\"text-align:" - switch c.Align() { - case Right: - s += "right\"" - case Left: - s += "left\"" - case Center: - s += "center\"" - default: - s = "" - } - return s -} - -func (p *parse) newCell(pos Pos, kind int, align AlignType) *CellNode { - return &CellNode{NodeType: NodeCell, Pos: pos, Kind: kind, AlignType: align} -} - -// BlockQuote represents block-quote tag. -type BlockQuoteNode struct { - NodeType - Pos - Nodes []Node -} - -// Render returns the html representation of BlockQuote -func (n *BlockQuoteNode) Render() string { - var s string - for _, node := range n.Nodes { - s += node.Render() - } - return wrap("blockquote", s) -} - -func (p *parse) newBlockQuote(pos Pos) *BlockQuoteNode { - return &BlockQuoteNode{NodeType: NodeBlockQuote, Pos: pos} -} - -// CheckboxNode represents checked and unchecked checkbox tag. -// Used in task lists. -type CheckboxNode struct { - NodeType - Pos - Checked bool -} - -// Render returns the html representation of checked and unchecked CheckBox. -func (n *CheckboxNode) Render() string { - s := "" -} - -func (p *parse) newCheckbox(pos Pos, checked bool) *CheckboxNode { - return &CheckboxNode{NodeType: NodeCheckbox, Pos: pos, Checked: checked} -} - -// Wrap text with specific tag. -func wrap(tag, body string) string { - return fmt.Sprintf("<%[1]s>%s", tag, body) -} - -// Group all text configuration in one place(escaping, smartypants, etc..) -func (p *parse) text(input string) string { - opts := p.root().options - if opts.Smartypants { - input = smartypants(input) - } - if opts.Fractions { - input = smartyfractions(input) - } - return escape(input) -} - -// Helper escaper -func escape(str string) (cpy string) { - emp := regexp.MustCompile(`&\w+;`) - for i := 0; i < len(str); i++ { - switch s := str[i]; s { - case '>': - cpy += ">" - case '"': - cpy += """ - case '\'': - cpy += "'" - case '<': - if res := reHTML.tag.FindString(str[i:]); res != "" { - cpy += res - i += len(res) - 1 - } else { - cpy += "<" - } - case '&': - if res := emp.FindString(str[i:]); res != "" { - cpy += res - i += len(res) - 1 - } else { - cpy += "&" - } - default: - cpy += str[i : i+1] - } - } - return -} - -// Smartypants transformation helper, translate from marked.js -func smartypants(text string) string { - // em-dashes, en-dashes, ellipses - re := strings.NewReplacer("---", "\u2014", "--", "\u2013", "...", "\u2026") - text = re.Replace(text) - // opening singles - text = regexp.MustCompile("(^|[-\u2014/(\\[{\"\\s])'").ReplaceAllString(text, "$1\u2018") - // closing singles & apostrophes - text = strings.Replace(text, "'", "\u2019", -1) - // opening doubles - text = regexp.MustCompile("(^|[-\u2014/(\\[{\u2018\\s])\"").ReplaceAllString(text, "$1\u201c") - // closing doubles - text = strings.Replace(text, "\"", "\u201d", -1) - return text -} - -// Smartyfractions transformation helper. -func smartyfractions(text string) string { - re := regexp.MustCompile(`(\d+)(/\d+)(/\d+|)`) - return re.ReplaceAllStringFunc(text, func(str string) string { - var match []string - // If it's date like - if match = re.FindStringSubmatch(str); match[3] != "" { - return str - } - switch n := match[1] + match[2]; n { - case "1/2", "1/3", "2/3", "1/4", "3/4", "1/5", "2/5", "3/5", "4/5", - "1/6", "5/6", "1/7", "1/8", "3/8", "5/8", "7/8": - return fmt.Sprintf("&frac%s;", strings.Replace(n, "/", "", 1)) - default: - return fmt.Sprintf("%s%s", - match[1], strings.Replace(match[2], "/", "", 1)) - } - }) -} diff --git a/vendor/github.com/a8m/mark/parser.go b/vendor/github.com/a8m/mark/parser.go deleted file mode 100644 index 3dbe73246..000000000 --- a/vendor/github.com/a8m/mark/parser.go +++ /dev/null @@ -1,436 +0,0 @@ -package mark - -import ( - "regexp" - "strings" - "unicode" - "unicode/utf8" -) - -// parse holds the state of the parser. -type parse struct { - Nodes []Node - lex Lexer - options *Options - tr *parse - output string - peekCount int - token [3]item // three-token lookahead for parser - links map[string]*DefLinkNode // Deflink parsing, used RefLinks - renderFn map[NodeType]RenderFn // Custom overridden fns -} - -// Return new parser -func newParse(input string, opts *Options) *parse { - return &parse{ - lex: lex(input), - options: opts, - links: make(map[string]*DefLinkNode), - renderFn: make(map[NodeType]RenderFn), - } -} - -// parse convert the raw text to Nodeparse. -func (p *parse) parse() { -Loop: - for { - var n Node - switch t := p.peek(); t.typ { - case itemEOF, itemError: - break Loop - case itemNewLine: - p.next() - case itemHr: - n = p.newHr(p.next().pos) - case itemHTML: - t = p.next() - n = p.newHTML(t.pos, t.val) - case itemDefLink: - n = p.parseDefLink() - case itemHeading, itemLHeading: - n = p.parseHeading() - case itemCodeBlock, itemGfmCodeBlock: - n = p.parseCodeBlock() - case itemList: - n = p.parseList() - case itemTable, itemLpTable: - n = p.parseTable() - case itemBlockQuote: - n = p.parseBlockQuote() - case itemIndent: - space := p.next() - // If it isn't followed by itemText - if p.peek().typ != itemText { - continue - } - p.backup2(space) - fallthrough - // itemText - default: - tmp := p.newParagraph(t.pos) - tmp.Nodes = p.parseText(p.next().val + p.scanLines()) - n = tmp - } - if n != nil { - p.append(n) - } - } -} - -// Root getter -func (p *parse) root() *parse { - if p.tr == nil { - return p - } - return p.tr.root() -} - -// Render parse nodes to the wanted output -func (p *parse) render() { - var output string - for i, node := range p.Nodes { - // If there's a custom render function, use it instead. - if fn, ok := p.renderFn[node.Type()]; ok { - output = fn(node) - } else { - output = node.Render() - } - p.output += output - if output != "" && i != len(p.Nodes)-1 { - p.output += "\n" - } - } -} - -// append new node to nodes-list -func (p *parse) append(n Node) { - p.Nodes = append(p.Nodes, n) -} - -// next returns the next token -func (p *parse) next() item { - if p.peekCount > 0 { - p.peekCount-- - } else { - p.token[0] = p.lex.nextItem() - } - return p.token[p.peekCount] -} - -// peek returns but does not consume the next token. -func (p *parse) peek() item { - if p.peekCount > 0 { - return p.token[p.peekCount-1] - } - p.peekCount = 1 - p.token[0] = p.lex.nextItem() - return p.token[0] -} - -// backup backs the input stream tp one token -func (p *parse) backup() { - p.peekCount++ -} - -// backup2 backs the input stream up two tokens. -// The zeroth token is already there. -func (p *parse) backup2(t1 item) { - p.token[1] = t1 - p.peekCount = 2 -} - -// parseText -func (p *parse) parseText(input string) (nodes []Node) { - // Trim whitespaces that not a line-break - input = regexp.MustCompile(`(?m)^ +| +(\n|$)`).ReplaceAllStringFunc(input, func(s string) string { - if reBr.MatchString(s) { - return s - } - return strings.Replace(s, " ", "", -1) - }) - l := lexInline(input) - for token := range l.items { - var node Node - switch token.typ { - case itemBr: - node = p.newBr(token.pos) - case itemStrong, itemItalic, itemStrike, itemCode: - node = p.parseEmphasis(token.typ, token.pos, token.val) - case itemLink, itemAutoLink, itemGfmLink: - var title, href string - var text []Node - if token.typ == itemLink { - match := reLink.FindStringSubmatch(token.val) - text = p.parseText(match[1]) - href, title = match[2], match[3] - } else { - var match []string - if token.typ == itemGfmLink { - match = reGfmLink.FindStringSubmatch(token.val) - } else { - match = reAutoLink.FindStringSubmatch(token.val) - } - href = match[1] - text = append(text, p.newText(token.pos, match[1])) - } - node = p.newLink(token.pos, title, href, text...) - case itemImage: - match := reImage.FindStringSubmatch(token.val) - node = p.newImage(token.pos, match[3], match[2], match[1]) - case itemRefLink, itemRefImage: - match := reRefLink.FindStringSubmatch(token.val) - text, ref := match[1], match[2] - if ref == "" { - ref = text - } - if token.typ == itemRefLink { - node = p.newRefLink(token.typ, token.pos, token.val, ref, p.parseText(text)) - } else { - node = p.newRefImage(token.typ, token.pos, token.val, ref, text) - } - case itemHTML: - node = p.newHTML(token.pos, token.val) - default: - node = p.newText(token.pos, token.val) - } - nodes = append(nodes, node) - } - return nodes -} - -// parse inline emphasis -func (p *parse) parseEmphasis(typ itemType, pos Pos, val string) *EmphasisNode { - var re *regexp.Regexp - switch typ { - case itemStrike: - re = reStrike - case itemStrong: - re = reStrong - case itemCode: - re = reCode - case itemItalic: - re = reItalic - } - node := p.newEmphasis(pos, typ) - match := re.FindStringSubmatch(val) - text := match[len(match)-1] - if text == "" { - text = match[1] - } - node.Nodes = p.parseText(text) - return node -} - -// parse heading block -func (p *parse) parseHeading() (node *HeadingNode) { - token := p.next() - level := 1 - var text string - if token.typ == itemHeading { - match := reHeading.FindStringSubmatch(token.val) - level, text = len(match[1]), match[2] - } else { - match := reLHeading.FindStringSubmatch(token.val) - // using equal signs for first-level, and dashes for second-level. - text = match[1] - if match[2] == "-" { - level = 2 - } - } - node = p.newHeading(token.pos, level, text) - node.Nodes = p.parseText(text) - return -} - -func (p *parse) parseDefLink() *DefLinkNode { - token := p.next() - match := reDefLink.FindStringSubmatch(token.val) - name := strings.ToLower(match[1]) - // name(lowercase), href, title - n := p.newDefLink(token.pos, name, match[2], match[3]) - // store in links - links := p.root().links - if _, ok := links[name]; !ok { - links[name] = n - } - return n -} - -// parse codeBlock -func (p *parse) parseCodeBlock() *CodeNode { - var lang, text string - token := p.next() - if token.typ == itemGfmCodeBlock { - codeStart := reGfmCode.FindStringSubmatch(token.val) - lang = codeStart[3] - text = token.val[len(codeStart[0]):] - } else { - text = reCodeBlock.trim(token.val, "") - } - return p.newCode(token.pos, lang, text) -} - -func (p *parse) parseBlockQuote() (n *BlockQuoteNode) { - token := p.next() - // replacer - re := regexp.MustCompile(`(?m)^ *> ?`) - raw := re.ReplaceAllString(token.val, "") - // TODO(a8m): doesn't work right now with defLink(inside the blockQuote) - tr := &parse{lex: lex(raw), tr: p} - tr.parse() - n = p.newBlockQuote(token.pos) - n.Nodes = tr.Nodes - return -} - -// parse list -func (p *parse) parseList() *ListNode { - token := p.next() - list := p.newList(token.pos, isDigit(token.val)) -Loop: - for { - switch token = p.peek(); token.typ { - case itemLooseItem, itemListItem: - list.append(p.parseListItem()) - default: - break Loop - } - } - return list -} - -// parse listItem -func (p *parse) parseListItem() *ListItemNode { - token := p.next() - item := p.newListItem(token.pos) - token.val = strings.TrimSpace(token.val) - if p.isTaskItem(token.val) { - item.Nodes = p.parseTaskItem(token) - return item - } - tr := &parse{lex: lex(token.val), tr: p} - tr.parse() - for _, node := range tr.Nodes { - // wrap with paragraph only when it's a loose item - if n, ok := node.(*ParagraphNode); ok && token.typ == itemListItem { - item.Nodes = append(item.Nodes, n.Nodes...) - } else { - item.append(node) - } - } - return item -} - -// parseTaskItem parses list item as a task item. -func (p *parse) parseTaskItem(token item) []Node { - checkbox := p.newCheckbox(token.pos, token.val[1] == 'x') - token.val = strings.TrimSpace(token.val[3:]) - return append([]Node{checkbox}, p.parseText(token.val)...) -} - -// isTaskItem tests if the given string is list task item. -func (p *parse) isTaskItem(s string) bool { - if len(s) < 5 || s[0] != '[' || (s[1] != 'x' && s[1] != ' ') || s[2] != ']' { - return false - } - return "" != strings.TrimSpace(s[3:]) -} - -// parse table -func (p *parse) parseTable() *TableNode { - table := p.newTable(p.next().pos) - // Align [ None, Left, Right, ... ] - // Header [ Cells: [ ... ] ] - // Data: [ Rows: [ Cells: [ ... ] ] ] - rows := struct { - Align []AlignType - Header []item - Cells [][]item - }{} -Loop: - for i := 0; ; { - switch token := p.next(); token.typ { - case itemTableRow: - i++ - if i > 2 { - rows.Cells = append(rows.Cells, []item{}) - } - case itemTableCell: - // Header - if i == 1 { - rows.Header = append(rows.Header, token) - // Alignment - } else if i == 2 { - rows.Align = append(rows.Align, parseAlign(token.val)) - // Data - } else { - pos := i - 3 - rows.Cells[pos] = append(rows.Cells[pos], token) - } - default: - p.backup() - break Loop - } - } - // Tranform to nodes - table.append(p.parseCells(Header, rows.Header, rows.Align)) - // Table body - for _, row := range rows.Cells { - table.append(p.parseCells(Data, row, rows.Align)) - } - return table -} - -// parse cells and return new row -func (p *parse) parseCells(kind int, items []item, align []AlignType) *RowNode { - var row *RowNode - for i, item := range items { - if i == 0 { - row = p.newRow(item.pos) - } - cell := p.newCell(item.pos, kind, align[i]) - cell.Nodes = p.parseText(item.val) - row.append(cell) - } - return row -} - -// Used to consume lines(itemText) for a continues paragraphs -func (p *parse) scanLines() (s string) { - for { - tkn := p.next() - if tkn.typ == itemText || tkn.typ == itemIndent { - s += tkn.val - } else if tkn.typ == itemNewLine { - if t := p.peek().typ; t != itemText && t != itemIndent { - p.backup2(tkn) - break - } - s += tkn.val - } else { - p.backup() - break - } - } - return -} - -// get align-string and return the align type of it -func parseAlign(s string) (typ AlignType) { - sfx, pfx := strings.HasSuffix(s, ":"), strings.HasPrefix(s, ":") - switch { - case sfx && pfx: - typ = Center - case sfx: - typ = Right - case pfx: - typ = Left - } - return -} - -// test if given string is digit -func isDigit(s string) bool { - r, _ := utf8.DecodeRuneInString(s) - return unicode.IsDigit(r) -} diff --git a/vendor/github.com/beorn7/perks/quantile/LICENSE b/vendor/github.com/beorn7/perks/LICENSE similarity index 100% rename from vendor/github.com/beorn7/perks/quantile/LICENSE rename to vendor/github.com/beorn7/perks/LICENSE diff --git a/vendor/github.com/beorn7/perks/quantile/exampledata.txt b/vendor/github.com/beorn7/perks/quantile/exampledata.txt new file mode 100644 index 000000000..1602287d7 --- /dev/null +++ b/vendor/github.com/beorn7/perks/quantile/exampledata.txt @@ -0,0 +1,2388 @@ +8 +5 +26 +12 +5 +235 +13 +6 +28 +30 +3 +3 +3 +3 +5 +2 +33 +7 +2 +4 +7 +12 +14 +5 +8 +3 +10 +4 +5 +3 +6 +6 +209 +20 +3 +10 +14 +3 +4 +6 +8 +5 +11 +7 +3 +2 +3 +3 +212 +5 +222 +4 +10 +10 +5 +6 +3 +8 +3 +10 +254 +220 +2 +3 +5 +24 +5 +4 +222 +7 +3 +3 +223 +8 +15 +12 +14 +14 +3 +2 +2 +3 +13 +3 +11 +4 +4 +6 +5 +7 +13 +5 +3 +5 +2 +5 +3 +5 +2 +7 +15 +17 +14 +3 +6 +6 +3 +17 +5 +4 +7 +6 +4 +4 +8 +6 +8 +3 +9 +3 +6 +3 +4 +5 +3 +3 +660 +4 +6 +10 +3 +6 +3 +2 +5 +13 +2 +4 +4 +10 +4 +8 +4 +3 +7 +9 +9 +3 +10 +37 +3 +13 +4 +12 +3 +6 +10 +8 +5 +21 +2 +3 +8 +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+4 +4 +12 +3 +6 +31 +5 +4 +7 +3 +6 +5 +6 +5 +11 +2 +2 +11 +11 +6 +7 +5 +8 +7 +10 +5 +23 +7 +4 +3 +5 +34 +2 +5 +23 +7 +3 +6 +8 +4 +4 +4 +2 +5 +3 +8 +5 +4 +8 +25 +2 +3 +17 +8 +3 +4 +8 +7 +3 +15 +6 +5 +7 +21 +9 +5 +6 +6 +5 +3 +2 +3 +10 +3 +6 +3 +14 +7 +4 +4 +8 +7 +8 +2 +6 +12 +4 +213 +6 +5 +21 +8 +2 +5 +23 +3 +11 +2 +3 +6 +25 +2 +3 +6 +7 +6 +6 +4 +4 +6 +3 +17 +9 +7 +6 +4 +3 +10 +7 +2 +3 +3 +3 +11 +8 +3 +7 +6 +4 +14 +36 +3 +4 +3 +3 +22 +13 +21 +4 +2 +7 +4 +4 +17 +15 +3 +7 +11 +2 +4 +7 +6 +209 +6 +3 +2 +2 +24 +4 +9 +4 +3 +3 +3 +29 +2 +2 +4 +3 +3 +5 +4 +6 +3 +3 +2 +4 diff --git a/vendor/github.com/bkaradzic/go-lz4/.gitignore b/vendor/github.com/bkaradzic/go-lz4/.gitignore new file mode 100644 index 000000000..be64db617 --- /dev/null +++ b/vendor/github.com/bkaradzic/go-lz4/.gitignore @@ -0,0 +1 @@ +/lz4-example/lz4-example diff --git a/vendor/github.com/bkaradzic/go-lz4/.travis.yml b/vendor/github.com/bkaradzic/go-lz4/.travis.yml new file mode 100644 index 000000000..d5870798f --- /dev/null +++ b/vendor/github.com/bkaradzic/go-lz4/.travis.yml @@ -0,0 +1,9 @@ +language: go + +go: + - 1.1 + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - tip diff --git a/vendor/github.com/bkaradzic/go-lz4/README.md b/vendor/github.com/bkaradzic/go-lz4/README.md new file mode 100644 index 000000000..fd65d1590 --- /dev/null +++ b/vendor/github.com/bkaradzic/go-lz4/README.md @@ -0,0 +1,76 @@ +go-lz4 +====== + +go-lz4 is port of LZ4 lossless compression algorithm to Go. The original C code +is located at: + +https://github.com/Cyan4973/lz4 + +Status +------ +[![Build Status](https://secure.travis-ci.org/bkaradzic/go-lz4.png)](http://travis-ci.org/bkaradzic/go-lz4) +[![GoDoc](https://godoc.org/github.com/bkaradzic/go-lz4?status.png)](https://godoc.org/github.com/bkaradzic/go-lz4) + +Usage +----- + + go get github.com/bkaradzic/go-lz4 + + import "github.com/bkaradzic/go-lz4" + +The package name is `lz4` + +Notes +----- + +* go-lz4 saves a uint32 with the original uncompressed length at the beginning + of the encoded buffer. They may get in the way of interoperability with + other implementations. + +Alternative +----------- + +https://github.com/pierrec/lz4 + +Contributors +------------ + +Damian Gryski ([@dgryski](https://github.com/dgryski)) +Dustin Sallings ([@dustin](https://github.com/dustin)) + +Contact +------- + +[@bkaradzic](https://twitter.com/bkaradzic) +http://www.stuckingeometry.com + +Project page +https://github.com/bkaradzic/go-lz4 + +License +------- + +Copyright 2011-2012 Branimir Karadzic. All rights reserved. +Copyright 2013 Damian Gryski. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binary form must 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 COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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/github.com/bkaradzic/go-lz4/fuzzer/main.go b/vendor/github.com/bkaradzic/go-lz4/fuzzer/main.go deleted file mode 100644 index 6c8ee5754..000000000 --- a/vendor/github.com/bkaradzic/go-lz4/fuzzer/main.go +++ /dev/null @@ -1,74 +0,0 @@ -package main - -import ( - "math/rand" - - "github.com/bkaradzic/go-lz4" - - // lz4's API matches snappy's, so we can easily see how it performs - // lz4 "code.google.com/p/snappy-go/snappy" -) - -var input = ` -ADVENTURE I. A SCANDAL IN BOHEMIA - -I. - -To Sherlock Holmes she is always THE woman. I have seldom heard -him mention her under any other name. In his eyes she eclipses -and predominates the whole of her sex. It was not that he felt -any emotion akin to love for Irene Adler. All emotions, and that -one particularly, were abhorrent to his cold, precise but -admirably balanced mind. He was, I take it, the most perfect -reasoning and observing machine that the world has seen, but as a -lover he would have placed himself in a false position. He never -spoke of the softer passions, save with a gibe and a sneer. They -were admirable things for the observer--excellent for drawing the -veil from men's motives and actions. But for the trained reasoner -to admit such intrusions into his own delicate and finely -adjusted temperament was to introduce a distracting factor which -might throw a doubt upon all his mental results. Grit in a -sensitive instrument, or a crack in one of his own high-power -lenses, would not be more disturbing than a strong emotion in a -nature such as his. And yet there was but one woman to him, and -that woman was the late Irene Adler, of dubious and questionable -memory. - -I had seen little of Holmes lately. My marriage had drifted us -away from each other. My own complete happiness, and the -home-centred interests which rise up around the man who first -finds himself master of his own establishment, were sufficient to -absorb all my attention, while Holmes, who loathed every form of -society with his whole Bohemian soul, remained in our lodgings in -Baker Street, buried among his old books, and alternating from -week to week between cocaine and ambition, the drowsiness of the -drug, and the fierce energy of his own keen nature. He was still, -as ever, deeply attracted by the study of crime, and occupied his -immense faculties and extraordinary powers of observation in -following out those clues, and clearing up those mysteries which -had been abandoned as hopeless by the official police. From time -to time I heard some vague account of his doings: of his summons -to Odessa in the case of the Trepoff murder, of his clearing up -of the singular tragedy of the Atkinson brothers at Trincomalee, -and finally of the mission which he had accomplished so -delicately and successfully for the reigning family of Holland. -Beyond these signs of his activity, however, which I merely -shared with all the readers of the daily press, I knew little of -my former friend and companion. -` - -func main() { - - compressed, _ := lz4.Encode(nil, []byte(input)) - - modified := make([]byte, len(compressed)) - - for { - copy(modified, compressed) - for i := 0; i < 100; i++ { - modified[rand.Intn(len(compressed)-4)+4] = byte(rand.Intn(256)) - } - lz4.Decode(nil, modified) - } - -} diff --git a/vendor/github.com/bkaradzic/go-lz4/lz4-example/main.go b/vendor/github.com/bkaradzic/go-lz4/lz4-example/main.go deleted file mode 100644 index ae457c860..000000000 --- a/vendor/github.com/bkaradzic/go-lz4/lz4-example/main.go +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2011 Branimir Karadzic. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must 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 COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (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 ( - "flag" - "fmt" - "io/ioutil" - "log" - "os" - "runtime/pprof" - - lz4 "github.com/bkaradzic/go-lz4" -) - -var ( - decompress = flag.Bool("d", false, "decompress") -) - -func main() { - - var optCPUProfile = flag.String("cpuprofile", "", "profile") - flag.Parse() - - if *optCPUProfile != "" { - f, err := os.Create(*optCPUProfile) - if err != nil { - log.Fatal(err) - } - pprof.StartCPUProfile(f) - defer pprof.StopCPUProfile() - } - - args := flag.Args() - - var data []byte - - if len(args) < 2 { - fmt.Print("Usage: lz4 [-d] \n") - os.Exit(1) - } - - input, err := os.OpenFile(args[0], os.O_RDONLY, 0644) - if err != nil { - fmt.Printf("Failed to open input file %s\n", args[0]) - os.Exit(1) - } - defer input.Close() - - if *decompress { - data, _ = ioutil.ReadAll(input) - data, err = lz4.Decode(nil, data) - if err != nil { - fmt.Println("Failed to decode:", err) - return - } - } else { - data, _ = ioutil.ReadAll(input) - data, err = lz4.Encode(nil, data) - if err != nil { - fmt.Println("Failed to encode:", err) - return - } - } - - err = ioutil.WriteFile(args[1], data, 0644) - if err != nil { - fmt.Printf("Failed to open output file %s\n", args[1]) - os.Exit(1) - } -} diff --git a/vendor/github.com/calmh/du/README.md b/vendor/github.com/calmh/du/README.md new file mode 100644 index 000000000..0cb5e5d73 --- /dev/null +++ b/vendor/github.com/calmh/du/README.md @@ -0,0 +1,14 @@ +du +== + +Get total and available disk space on a given volume. + +Documentation +------------- + +http://godoc.org/github.com/calmh/du + +License +------- + +Public Domain diff --git a/vendor/github.com/calmh/du/cmd/du/main.go b/vendor/github.com/calmh/du/cmd/du/main.go deleted file mode 100644 index 3b8b54467..000000000 --- a/vendor/github.com/calmh/du/cmd/du/main.go +++ /dev/null @@ -1,21 +0,0 @@ -package main - -import ( - "fmt" - "log" - "os" - - "github.com/calmh/du" -) - -var KB = int64(1024) - -func main() { - usage, err := du.Get(os.Args[1]) - if err != nil { - log.Fatal(err) - } - fmt.Println("Free:", usage.FreeBytes/(KB*KB), "MiB") - fmt.Println("Available:", usage.AvailBytes/(KB*KB), "MiB") - fmt.Println("Size:", usage.TotalBytes/(KB*KB), "MiB") -} diff --git a/vendor/github.com/calmh/xdr/.gitignore b/vendor/github.com/calmh/xdr/.gitignore new file mode 100644 index 000000000..2d830686d --- /dev/null +++ b/vendor/github.com/calmh/xdr/.gitignore @@ -0,0 +1 @@ +coverage.out diff --git a/vendor/github.com/calmh/xdr/.travis.yml b/vendor/github.com/calmh/xdr/.travis.yml new file mode 100644 index 000000000..0fccc9e32 --- /dev/null +++ b/vendor/github.com/calmh/xdr/.travis.yml @@ -0,0 +1,19 @@ +language: go +go: +- tip + +install: +- export PATH=$PATH:$HOME/gopath/bin +- go get golang.org/x/tools/cover +- go get github.com/mattn/goveralls + +script: +- ./generate.sh +- go test -coverprofile=coverage.out + +after_success: +- goveralls -coverprofile=coverage.out -service=travis-ci -package=calmh/xdr -repotoken="$COVERALLS_TOKEN" + +env: + global: + secure: SmgnrGfp2zLrA44ChRMpjPeujubt9veZ8Fx/OseMWECmacyV5N/TuDhzIbwo6QwV4xB0sBacoPzvxQbJRVjNKsPiSu72UbcQmQ7flN4Tf7nW09tSh1iW8NgrpBCq/3UYLoBu2iPBEBKm93IK0aGNAKs6oEkB0fU27iTVBwiTXOY= diff --git a/vendor/github.com/calmh/xdr/README.md b/vendor/github.com/calmh/xdr/README.md new file mode 100644 index 000000000..134fa930f --- /dev/null +++ b/vendor/github.com/calmh/xdr/README.md @@ -0,0 +1,18 @@ +# This project is not actively maintained + +Issues and pull requests on this repository may not be acted on in a timely +manner, or at all. You are of course welcome to use it anyway. You are even +more welcome to fork it and maintain the results. + +![Unmaintained](https://nym.se/img/unmaintained.jpg) + +xdr +=== + +[![Build Status](https://img.shields.io/circleci/project/calmh/xdr.svg?style=flat-square)](https://circleci.com/gh/calmh/xdr) +[![Coverage Status](https://img.shields.io/coveralls/calmh/xdr.svg?style=flat)](https://coveralls.io/r/calmh/xdr?branch=master) +[![API Documentation](http://img.shields.io/badge/api-Godoc-blue.svg?style=flat)](http://godoc.org/github.com/calmh/xdr) +[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://opensource.org/licenses/MIT) + +This is an XDR marshalling/unmarshalling library. It uses code generation and +not reflection. diff --git a/vendor/github.com/calmh/xdr/circle.yml b/vendor/github.com/calmh/xdr/circle.yml new file mode 100644 index 000000000..f61e26df3 --- /dev/null +++ b/vendor/github.com/calmh/xdr/circle.yml @@ -0,0 +1,3 @@ +dependencies: + post: + - ./generate.sh diff --git a/vendor/github.com/calmh/xdr/cmd/genxdr/main.go b/vendor/github.com/calmh/xdr/cmd/genxdr/main.go deleted file mode 100644 index feebbfdf8..000000000 --- a/vendor/github.com/calmh/xdr/cmd/genxdr/main.go +++ /dev/null @@ -1,586 +0,0 @@ -// Copyright (C) 2014 Jakob Borg. All rights reserved. Use of this source code -// is governed by an MIT-style license that can be found in the LICENSE file. - -package main - -import ( - "bytes" - "flag" - "fmt" - "go/ast" - "go/format" - "go/parser" - "go/token" - "io" - "log" - "os" - "regexp" - "strconv" - "strings" - "text/template" -) - -type fieldInfo struct { - Name string - IsBasic bool // handled by one the native Read/WriteUint64 etc functions - IsSlice bool // field is a slice of FieldType - FieldType string // original type of field, i.e. "int" - Encoder string // the encoder name, i.e. "Uint64" for Read/WriteUint64 - Convert string // what to convert to when encoding, i.e. "uint64" - Max int // max size for slices and strings - Submax int // max size for strings inside slices -} - -type structInfo struct { - Name string - Fields []fieldInfo -} - -func (i structInfo) SizeExpr() string { - var xdrSizes = map[string]int{ - "int8": 4, - "uint8": 4, - "int16": 4, - "uint16": 4, - "int32": 4, - "uint32": 4, - "int64": 8, - "uint64": 8, - "int": 8, - "bool": 4, - } - - var terms []string - nl := "" - for _, f := range i.Fields { - if size := xdrSizes[f.FieldType]; size > 0 { - if f.IsSlice { - terms = append(terms, nl+"4+len(o."+f.Name+")*"+strconv.Itoa(size)) - } else { - terms = append(terms, strconv.Itoa(size)) - } - } else { - switch f.FieldType { - case "string", "[]byte": - if f.IsSlice { - terms = append(terms, nl+"4+xdr.SizeOfSlice(o."+f.Name+")") - } else { - terms = append(terms, nl+"4+len(o."+f.Name+")+xdr.Padding(len(o."+f.Name+"))") - } - default: - if f.IsSlice { - terms = append(terms, nl+"4+xdr.SizeOfSlice(o."+f.Name+")") - } else { - terms = append(terms, nl+"o."+f.Name+".XDRSize()") - } - } - } - nl = "\n" - } - return strings.Join(terms, "+") -} - -var headerData = `// ************************************************************ -// This file is automatically generated by genxdr. Do not edit. -// ************************************************************ - -package {{.Package}} - -import ( - "github.com/calmh/xdr" -) -` - -var encoderData = ` -func (o {{.Name}}) XDRSize() int { - return {{.SizeExpr}} -}//+n - -func (o {{.Name}}) MarshalXDR() ([]byte, error) { - buf:= make([]byte, o.XDRSize()) - m := &xdr.Marshaller{Data: buf} - return buf, o.MarshalXDRInto(m) -}//+n - -func (o {{.Name}}) MustMarshalXDR() []byte { - bs, err := o.MarshalXDR() - if err != nil { - panic(err) - } - return bs -}//+n - -func (o {{.Name}}) MarshalXDRInto(m *xdr.Marshaller) error { - {{range $fi := .Fields}} - {{if $fi.IsSlice}} - {{template "marshalSlice" $fi}} - {{else}} - {{template "marshalValue" $fi}} - {{end}} - {{end}} - return m.Error -}//+n - -{{define "marshalValue"}} - {{if ne .Convert ""}} - m.Marshal{{.Encoder}}({{.Convert}}(o.{{.Name}})) - {{else if .IsBasic}} - {{if ge .Max 1}} - if l := len(o.{{.Name}}); l > {{.Max}} { - return xdr.ElementSizeExceeded("{{.Name}}", l, {{.Max}}) - } - {{end}} - m.Marshal{{.Encoder}}(o.{{.Name}}) - {{else}} - if err := o.{{.Name}}.MarshalXDRInto(m); err != nil { - return err - } - {{end}} -{{end}} - -{{define "marshalSlice"}} - {{if ge .Max 1}} - if l := len(o.{{.Name}}); l > {{.Max}} { - return xdr.ElementSizeExceeded("{{.Name}}", l, {{.Max}}) - } - {{end}} - - m.MarshalUint32(uint32(len(o.{{.Name}}))) - for i := range o.{{.Name}} { - {{if ne .Convert ""}} - m.Marshal{{.Encoder}}({{.Convert}}(o.{{.Name}}[i])) - {{else if .IsBasic}} - m.Marshal{{.Encoder}}(o.{{.Name}}[i]) - {{else}} - if err := o.{{.Name}}[i].MarshalXDRInto(m); err != nil { - return err - } - {{end}} - } -{{end}} - -func (o *{{.Name}}) UnmarshalXDR(bs []byte) error { - u := &xdr.Unmarshaller{Data: bs} - return o.UnmarshalXDRFrom(u) -} - -func (o *{{.Name}}) UnmarshalXDRFrom(u *xdr.Unmarshaller) error { - {{range $fi := .Fields}} - {{if $fi.IsSlice}} - {{template "unmarshalSlice" $fi}} - {{else}} - {{template "unmarshalValue" $fi}} - {{end}} - {{end}} - return u.Error -}//+n - -{{define "unmarshalValue"}} - {{if ne .Convert ""}} - o.{{.Name}} = {{.FieldType}}(u.Unmarshal{{.Encoder}}()) - {{else if .IsBasic}} - {{if ge .Max 1}} - o.{{.Name}} = u.Unmarshal{{.Encoder}}Max({{.Max}}) - {{else}} - o.{{.Name}} = u.Unmarshal{{.Encoder}}() - {{end}} - {{else}} - (&o.{{.Name}}).UnmarshalXDRFrom(u) - {{end}} -{{end}} - -{{define "unmarshalSlice"}} - _{{.Name}}Size := int(u.UnmarshalUint32()) - if _{{.Name}}Size < 0 { - return xdr.ElementSizeExceeded("{{.Name}}", _{{.Name}}Size, {{.Max}}) - } else if _{{.Name}}Size == 0 { - o.{{.Name}} = nil - } else { - {{if ge .Max 1}} - if _{{.Name}}Size > {{.Max}} { - return xdr.ElementSizeExceeded("{{.Name}}", _{{.Name}}Size, {{.Max}}) - } - {{end}} - if _{{.Name}}Size <= len(o.{{.Name}}) { - {{if eq .FieldType "string"}} - for i := _{{.Name}}Size; i < len(o.{{.Name}}); i++ { o.{{.Name}}[i] = "" } - {{end}} - {{if eq .FieldType "[]byte"}} - for i := _{{.Name}}Size; i < len(o.{{.Name}}); i++ { o.{{.Name}}[i] = nil } - {{end}} - o.{{.Name}} = o.{{.Name}}[:_{{.Name}}Size] - } else { - o.{{.Name}} = make([]{{.FieldType}}, _{{.Name}}Size) - } - for i := range o.{{.Name}} { - {{if ne .Convert ""}} - o.{{.Name}}[i] = {{.FieldType}}(u.Unmarshal{{.Encoder}}()) - {{else if .IsBasic}} - {{if ge .Submax 1}} - o.{{.Name}}[i] = u.Unmarshal{{.Encoder}}Max({{.Submax}}) - {{else}} - o.{{.Name}}[i] = u.Unmarshal{{.Encoder}}() - {{end}} - {{else}} - (&o.{{.Name}}[i]).UnmarshalXDRFrom(u) - {{end}} - } - } -{{end}} -` - -var ( - encodeTpl = template.Must(template.New("encoder").Parse(encoderData)) - headerTpl = template.Must(template.New("header").Parse(headerData)) -) - -var emptyTypeTpl = template.Must(template.New("encoder").Parse(` -func (o {{.Name}}) XDRSize() int { - return 0 -} - -func (o {{.Name}}) MarshalXDR() ([]byte, error) { - return nil, nil -}//+n - -func (o {{.Name}}) MustMarshalXDR() []byte { - return nil -}//+n - -func (o {{.Name}}) MarshalXDRInto(m *xdr.Marshaller) error { - return nil -}//+n - -func (o *{{.Name}}) UnmarshalXDR(bs []byte) error { - return nil -}//+n - -func (o *{{.Name}}) UnmarshalXDRFrom(u *xdr.Unmarshaller) error { - return nil -}//+n -`)) - -var maxRe = regexp.MustCompile(`(?:\Wmax:)(\d+)(?:\s*,\s*(\d+))?`) - -type typeSet struct { - Type string - Encoder string -} - -var xdrEncoders = map[string]typeSet{ - "int8": typeSet{"uint8", "Uint8"}, - "uint8": typeSet{"", "Uint8"}, - "int16": typeSet{"uint16", "Uint16"}, - "uint16": typeSet{"", "Uint16"}, - "int32": typeSet{"uint32", "Uint32"}, - "uint32": typeSet{"", "Uint32"}, - "int64": typeSet{"uint64", "Uint64"}, - "uint64": typeSet{"", "Uint64"}, - "int": typeSet{"uint64", "Uint64"}, - "string": typeSet{"", "String"}, - "[]byte": typeSet{"", "Bytes"}, - "bool": typeSet{"", "Bool"}, -} - -func handleStruct(t *ast.StructType) []fieldInfo { - var fs []fieldInfo - - for _, sf := range t.Fields.List { - if len(sf.Names) == 0 { - // We don't handle anonymous fields - continue - } - - fn := sf.Names[0].Name - var max1, max2 int - if sf.Comment != nil { - c := sf.Comment.List[0].Text - m := maxRe.FindStringSubmatch(c) - if len(m) >= 2 { - max1, _ = strconv.Atoi(m[1]) - } - if len(m) >= 3 { - max2, _ = strconv.Atoi(m[2]) - } - if strings.Contains(c, "noencode") { - continue - } - } - - var f fieldInfo - switch ft := sf.Type.(type) { - case *ast.Ident: - tn := ft.Name - if enc, ok := xdrEncoders[tn]; ok { - f = fieldInfo{ - Name: fn, - IsBasic: true, - FieldType: tn, - Encoder: enc.Encoder, - Convert: enc.Type, - Max: max1, - Submax: max2, - } - } else { - f = fieldInfo{ - Name: fn, - IsBasic: false, - FieldType: tn, - Max: max1, - Submax: max2, - } - } - - case *ast.ArrayType: - if ft.Len != nil { - // We don't handle arrays - continue - } - - tn := ft.Elt.(*ast.Ident).Name - if enc, ok := xdrEncoders["[]"+tn]; ok { - f = fieldInfo{ - Name: fn, - IsBasic: true, - FieldType: "[]" + tn, - Encoder: enc.Encoder, - Convert: enc.Type, - Max: max1, - Submax: max2, - } - } else if enc, ok := xdrEncoders[tn]; ok { - f = fieldInfo{ - Name: fn, - IsBasic: true, - IsSlice: true, - FieldType: tn, - Encoder: enc.Encoder, - Convert: enc.Type, - Max: max1, - Submax: max2, - } - } else { - f = fieldInfo{ - Name: fn, - IsSlice: true, - FieldType: tn, - Max: max1, - Submax: max2, - } - } - - case *ast.SelectorExpr: - f = fieldInfo{ - Name: fn, - FieldType: ft.Sel.Name, - Max: max1, - Submax: max2, - } - } - - fs = append(fs, f) - } - - return fs -} - -func generateCode(output io.Writer, s structInfo) { - var buf bytes.Buffer - var err error - if len(s.Fields) == 0 { - // This is an empty type. We can create a quite simple codec for it. - err = emptyTypeTpl.Execute(&buf, s) - } else { - // Generate with the default template. - err = encodeTpl.Execute(&buf, s) - } - if err != nil { - panic(err) - } - - bs := regexp.MustCompile(`(\s*\n)+`).ReplaceAll(buf.Bytes(), []byte("\n")) - bs = bytes.Replace(bs, []byte("//+n"), []byte("\n"), -1) - output.Write(bs) -} - -func uncamelize(s string) string { - return regexp.MustCompile("[a-z][A-Z]").ReplaceAllStringFunc(s, func(camel string) string { - return camel[:1] + " " + camel[1:] - }) -} - -func generateDiagram(output io.Writer, s structInfo) { - sn := s.Name - fs := s.Fields - - fmt.Fprintln(output, sn+" Structure:") - - if len(fs) == 0 { - fmt.Fprintln(output, "(contains no fields)") - fmt.Fprintln(output) - fmt.Fprintln(output) - return - } - - fmt.Fprintln(output) - fmt.Fprintln(output, " 0 1 2 3") - fmt.Fprintln(output, " 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1") - line := "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" - fmt.Fprintln(output, line) - - for _, f := range fs { - tn := f.FieldType - name := uncamelize(f.Name) - - suffix := "" - if f.IsSlice { - fmt.Fprintf(output, "| %s |\n", center("Number of "+name, 61)) - fmt.Fprintln(output, line) - suffix = " (n items)" - fmt.Fprintf(output, "/ %s /\n", center("", 61)) - } - switch tn { - case "bool": - fmt.Fprintf(output, "| %s |V|\n", center(name+" (V=0 or 1)", 59)) - case "int16", "uint16": - fmt.Fprintf(output, "| %s | %s |\n", center("16 zero bits", 29), center(name, 29)) - case "int8", "uint8": - fmt.Fprintf(output, "| %s | %s |\n", center("24 zero bits", 45), center(name, 13)) - case "int32", "uint32": - fmt.Fprintf(output, "| %s |\n", center(name+suffix, 61)) - case "int64", "uint64": - fmt.Fprintf(output, "| %-61s |\n", "") - fmt.Fprintf(output, "+ %s +\n", center(name+" (64 bits)", 61)) - fmt.Fprintf(output, "| %-61s |\n", "") - case "string", "[]byte": - fmt.Fprintf(output, "/ %61s /\n", "") - fmt.Fprintf(output, "\\ %s \\\n", center(name+" (length + padded data)", 61)) - fmt.Fprintf(output, "/ %61s /\n", "") - default: - if f.IsSlice { - tn = "Zero or more " + tn + " Structures" - fmt.Fprintf(output, "\\ %s \\\n", center(tn, 61)) - } else { - tn = tn + " Structure" - fmt.Fprintf(output, "/ %s /\n", center("", 61)) - fmt.Fprintf(output, "\\ %s \\\n", center(tn, 61)) - fmt.Fprintf(output, "/ %s /\n", center("", 61)) - } - } - - if f.IsSlice { - fmt.Fprintf(output, "/ %s /\n", center("", 61)) - } - fmt.Fprintln(output, line) - } - fmt.Fprintln(output) - fmt.Fprintln(output) -} - -func generateXdr(output io.Writer, s structInfo) { - sn := s.Name - fs := s.Fields - - fmt.Fprintf(output, "struct %s {\n", sn) - - for _, f := range fs { - tn := f.FieldType - fn := f.Name - suf := "" - l := "" - if f.Max > 0 { - l = strconv.Itoa(f.Max) - } - if f.IsSlice { - suf = "<" + l + ">" - } - - switch tn { - case "int8", "int16", "int32": - fmt.Fprintf(output, "\tint %s%s;\n", fn, suf) - case "uint8", "uint16", "uint32": - fmt.Fprintf(output, "\tunsigned int %s%s;\n", fn, suf) - case "int64": - fmt.Fprintf(output, "\thyper %s%s;\n", fn, suf) - case "uint64": - fmt.Fprintf(output, "\tunsigned hyper %s%s;\n", fn, suf) - case "string": - fmt.Fprintf(output, "\tstring %s<%s>;\n", fn, l) - case "[]byte": - fmt.Fprintf(output, "\topaque %s<%s>;\n", fn, l) - default: - fmt.Fprintf(output, "\t%s %s%s;\n", tn, fn, suf) - } - } - fmt.Fprintln(output, "}") - fmt.Fprintln(output) -} - -func center(s string, w int) string { - w -= len(s) - l := w / 2 - r := l - if l+r < w { - r++ - } - return strings.Repeat(" ", l) + s + strings.Repeat(" ", r) -} - -func inspector(structs *[]structInfo) func(ast.Node) bool { - return func(n ast.Node) bool { - switch n := n.(type) { - case *ast.TypeSpec: - switch t := n.Type.(type) { - case *ast.StructType: - name := n.Name.Name - fs := handleStruct(t) - *structs = append(*structs, structInfo{name, fs}) - } - return false - default: - return true - } - } -} - -func main() { - outputFile := flag.String("o", "", "Output file, blank for stdout") - flag.Parse() - fname := flag.Arg(0) - - fset := token.NewFileSet() - f, err := parser.ParseFile(fset, fname, nil, parser.ParseComments) - if err != nil { - log.Fatal(err) - } - - var structs []structInfo - i := inspector(&structs) - ast.Inspect(f, i) - - buf := new(bytes.Buffer) - headerTpl.Execute(buf, map[string]string{"Package": f.Name.Name}) - for _, s := range structs { - fmt.Fprintf(buf, "\n/*\n\n") - generateDiagram(buf, s) - generateXdr(buf, s) - fmt.Fprintf(buf, "*/\n") - generateCode(buf, s) - } - - bs, err := format.Source(buf.Bytes()) - if err != nil { - log.Print(buf.String()) - log.Fatal(err) - } - - var output io.Writer = os.Stdout - if *outputFile != "" { - fd, err := os.Create(*outputFile) - if err != nil { - log.Fatal(err) - } - output = fd - } - output.Write(bs) -} diff --git a/vendor/github.com/calmh/xdr/generate.sh b/vendor/github.com/calmh/xdr/generate.sh new file mode 100644 index 000000000..2f348226b --- /dev/null +++ b/vendor/github.com/calmh/xdr/generate.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +go run cmd/genxdr/main.go -- bench_test.go > bench_xdr_test.go +go run cmd/genxdr/main.go -- encdec_test.go > encdec_xdr_test.go diff --git a/vendor/github.com/cheggaaa/pb/LICENSE b/vendor/github.com/cheggaaa/pb/LICENSE deleted file mode 100644 index 511970333..000000000 --- a/vendor/github.com/cheggaaa/pb/LICENSE +++ /dev/null @@ -1,12 +0,0 @@ -Copyright (c) 2012-2015, Sergey Cherepanov -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 the author 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 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/github.com/cheggaaa/pb/format.go b/vendor/github.com/cheggaaa/pb/format.go deleted file mode 100644 index 0723561c2..000000000 --- a/vendor/github.com/cheggaaa/pb/format.go +++ /dev/null @@ -1,118 +0,0 @@ -package pb - -import ( - "fmt" - "time" -) - -type Units int - -const ( - // U_NO are default units, they represent a simple value and are not formatted at all. - U_NO Units = iota - // U_BYTES units are formatted in a human readable way (B, KiB, MiB, ...) - U_BYTES - // U_BYTES_DEC units are like U_BYTES, but base 10 (B, KB, MB, ...) - U_BYTES_DEC - // U_DURATION units are formatted in a human readable way (3h14m15s) - U_DURATION -) - -const ( - KiB = 1024 - MiB = 1048576 - GiB = 1073741824 - TiB = 1099511627776 - - KB = 1e3 - MB = 1e6 - GB = 1e9 - TB = 1e12 -) - -func Format(i int64) *formatter { - return &formatter{n: i} -} - -type formatter struct { - n int64 - unit Units - width int - perSec bool -} - -func (f *formatter) To(unit Units) *formatter { - f.unit = unit - return f -} - -func (f *formatter) Width(width int) *formatter { - f.width = width - return f -} - -func (f *formatter) PerSec() *formatter { - f.perSec = true - return f -} - -func (f *formatter) String() (out string) { - switch f.unit { - case U_BYTES: - out = formatBytes(f.n) - case U_BYTES_DEC: - out = formatBytesDec(f.n) - case U_DURATION: - out = formatDuration(f.n) - default: - out = fmt.Sprintf(fmt.Sprintf("%%%dd", f.width), f.n) - } - if f.perSec { - out += "/s" - } - return -} - -// Convert bytes to human readable string. Like 2 MiB, 64.2 KiB, 52 B -func formatBytes(i int64) (result string) { - switch { - case i >= TiB: - result = fmt.Sprintf("%.02f TiB", float64(i)/TiB) - case i >= GiB: - result = fmt.Sprintf("%.02f GiB", float64(i)/GiB) - case i >= MiB: - result = fmt.Sprintf("%.02f MiB", float64(i)/MiB) - case i >= KiB: - result = fmt.Sprintf("%.02f KiB", float64(i)/KiB) - default: - result = fmt.Sprintf("%d B", i) - } - return -} - -// Convert bytes to base-10 human readable string. Like 2 MB, 64.2 KB, 52 B -func formatBytesDec(i int64) (result string) { - switch { - case i >= TB: - result = fmt.Sprintf("%.02f TB", float64(i)/TB) - case i >= GB: - result = fmt.Sprintf("%.02f GB", float64(i)/GB) - case i >= MB: - result = fmt.Sprintf("%.02f MB", float64(i)/MB) - case i >= KB: - result = fmt.Sprintf("%.02f KB", float64(i)/KB) - default: - result = fmt.Sprintf("%d B", i) - } - return -} - -func formatDuration(n int64) (result string) { - d := time.Duration(n) - if d > time.Hour*24 { - result = fmt.Sprintf("%dd", d/24/time.Hour) - d -= (d / time.Hour / 24) * (time.Hour * 24) - } - result = fmt.Sprintf("%s%v", result, d) - return -} diff --git a/vendor/github.com/cheggaaa/pb/pb.go b/vendor/github.com/cheggaaa/pb/pb.go deleted file mode 100644 index 19eb4d1a9..000000000 --- a/vendor/github.com/cheggaaa/pb/pb.go +++ /dev/null @@ -1,469 +0,0 @@ -// Simple console progress bars -package pb - -import ( - "fmt" - "io" - "math" - "strings" - "sync" - "sync/atomic" - "time" - "unicode/utf8" -) - -// Current version -const Version = "1.0.19" - -const ( - // Default refresh rate - 200ms - DEFAULT_REFRESH_RATE = time.Millisecond * 200 - FORMAT = "[=>-]" -) - -// DEPRECATED -// variables for backward compatibility, from now do not work -// use pb.Format and pb.SetRefreshRate -var ( - DefaultRefreshRate = DEFAULT_REFRESH_RATE - BarStart, BarEnd, Empty, Current, CurrentN string -) - -// Create new progress bar object -func New(total int) *ProgressBar { - return New64(int64(total)) -} - -// Create new progress bar object using int64 as total -func New64(total int64) *ProgressBar { - pb := &ProgressBar{ - Total: total, - RefreshRate: DEFAULT_REFRESH_RATE, - ShowPercent: true, - ShowCounters: true, - ShowBar: true, - ShowTimeLeft: true, - ShowFinalTime: true, - Units: U_NO, - ManualUpdate: false, - finish: make(chan struct{}), - } - return pb.Format(FORMAT) -} - -// Create new object and start -func StartNew(total int) *ProgressBar { - return New(total).Start() -} - -// Callback for custom output -// For example: -// bar.Callback = func(s string) { -// mySuperPrint(s) -// } -// -type Callback func(out string) - -type ProgressBar struct { - current int64 // current must be first member of struct (https://code.google.com/p/go/issues/detail?id=5278) - previous int64 - - Total int64 - RefreshRate time.Duration - ShowPercent, ShowCounters bool - ShowSpeed, ShowTimeLeft, ShowBar bool - ShowFinalTime bool - Output io.Writer - Callback Callback - NotPrint bool - Units Units - Width int - ForceWidth bool - ManualUpdate bool - AutoStat bool - - // Default width for the time box. - UnitsWidth int - TimeBoxWidth int - - finishOnce sync.Once //Guards isFinish - finish chan struct{} - isFinish bool - - startTime time.Time - startValue int64 - - changeTime time.Time - - prefix, postfix string - - mu sync.Mutex - lastPrint string - - BarStart string - BarEnd string - Empty string - Current string - CurrentN string - - AlwaysUpdate bool -} - -// Start print -func (pb *ProgressBar) Start() *ProgressBar { - pb.startTime = time.Now() - pb.startValue = atomic.LoadInt64(&pb.current) - if pb.Total == 0 { - pb.ShowTimeLeft = false - pb.ShowPercent = false - pb.AutoStat = false - } - if !pb.ManualUpdate { - pb.Update() // Initial printing of the bar before running the bar refresher. - go pb.refresher() - } - return pb -} - -// Increment current value -func (pb *ProgressBar) Increment() int { - return pb.Add(1) -} - -// Get current value -func (pb *ProgressBar) Get() int64 { - c := atomic.LoadInt64(&pb.current) - return c -} - -// Set current value -func (pb *ProgressBar) Set(current int) *ProgressBar { - return pb.Set64(int64(current)) -} - -// Set64 sets the current value as int64 -func (pb *ProgressBar) Set64(current int64) *ProgressBar { - atomic.StoreInt64(&pb.current, current) - return pb -} - -// Add to current value -func (pb *ProgressBar) Add(add int) int { - return int(pb.Add64(int64(add))) -} - -func (pb *ProgressBar) Add64(add int64) int64 { - return atomic.AddInt64(&pb.current, add) -} - -// Set prefix string -func (pb *ProgressBar) Prefix(prefix string) *ProgressBar { - pb.prefix = prefix - return pb -} - -// Set postfix string -func (pb *ProgressBar) Postfix(postfix string) *ProgressBar { - pb.postfix = postfix - return pb -} - -// Set custom format for bar -// Example: bar.Format("[=>_]") -// Example: bar.Format("[\x00=\x00>\x00-\x00]") // \x00 is the delimiter -func (pb *ProgressBar) Format(format string) *ProgressBar { - var formatEntries []string - if utf8.RuneCountInString(format) == 5 { - formatEntries = strings.Split(format, "") - } else { - formatEntries = strings.Split(format, "\x00") - } - if len(formatEntries) == 5 { - pb.BarStart = formatEntries[0] - pb.BarEnd = formatEntries[4] - pb.Empty = formatEntries[3] - pb.Current = formatEntries[1] - pb.CurrentN = formatEntries[2] - } - return pb -} - -// Set bar refresh rate -func (pb *ProgressBar) SetRefreshRate(rate time.Duration) *ProgressBar { - pb.RefreshRate = rate - return pb -} - -// Set units -// bar.SetUnits(U_NO) - by default -// bar.SetUnits(U_BYTES) - for Mb, Kb, etc -func (pb *ProgressBar) SetUnits(units Units) *ProgressBar { - pb.Units = units - return pb -} - -// Set max width, if width is bigger than terminal width, will be ignored -func (pb *ProgressBar) SetMaxWidth(width int) *ProgressBar { - pb.Width = width - pb.ForceWidth = false - return pb -} - -// Set bar width -func (pb *ProgressBar) SetWidth(width int) *ProgressBar { - pb.Width = width - pb.ForceWidth = true - return pb -} - -// End print -func (pb *ProgressBar) Finish() { - //Protect multiple calls - pb.finishOnce.Do(func() { - close(pb.finish) - pb.write(atomic.LoadInt64(&pb.current)) - pb.mu.Lock() - defer pb.mu.Unlock() - switch { - case pb.Output != nil: - fmt.Fprintln(pb.Output) - case !pb.NotPrint: - fmt.Println() - } - pb.isFinish = true - }) -} - -// IsFinished return boolean -func (pb *ProgressBar) IsFinished() bool { - pb.mu.Lock() - defer pb.mu.Unlock() - return pb.isFinish -} - -// End print and write string 'str' -func (pb *ProgressBar) FinishPrint(str string) { - pb.Finish() - if pb.Output != nil { - fmt.Fprintln(pb.Output, str) - } else { - fmt.Println(str) - } -} - -// implement io.Writer -func (pb *ProgressBar) Write(p []byte) (n int, err error) { - n = len(p) - pb.Add(n) - return -} - -// implement io.Reader -func (pb *ProgressBar) Read(p []byte) (n int, err error) { - n = len(p) - pb.Add(n) - return -} - -// Create new proxy reader over bar -// Takes io.Reader or io.ReadCloser -func (pb *ProgressBar) NewProxyReader(r io.Reader) *Reader { - return &Reader{r, pb} -} - -func (pb *ProgressBar) write(current int64) { - width := pb.GetWidth() - - var percentBox, countersBox, timeLeftBox, speedBox, barBox, end, out string - - // percents - if pb.ShowPercent { - var percent float64 - if pb.Total > 0 { - percent = float64(current) / (float64(pb.Total) / float64(100)) - } else { - percent = float64(current) / float64(100) - } - percentBox = fmt.Sprintf(" %6.02f%%", percent) - } - - // counters - if pb.ShowCounters { - current := Format(current).To(pb.Units).Width(pb.UnitsWidth) - if pb.Total > 0 { - total := Format(pb.Total).To(pb.Units).Width(pb.UnitsWidth) - countersBox = fmt.Sprintf(" %s / %s ", current, total) - } else { - countersBox = fmt.Sprintf(" %s / ? ", current) - } - } - - // 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() - select { - case <-pb.finish: - if pb.ShowFinalTime { - var left time.Duration - left = (fromStart / time.Second) * time.Second - timeLeftBox = fmt.Sprintf(" %s", left.String()) - } - default: - if pb.ShowTimeLeft && currentFromStart > 0 { - perEntry := fromChange / time.Duration(currentFromStart) - var left time.Duration - if pb.Total > 0 { - left = time.Duration(pb.Total-currentFromStart) * perEntry - left -= time.Since(lastChangeTime) - left = (left / time.Second) * time.Second - } else { - left = time.Duration(currentFromStart) * perEntry - left = (left / time.Second) * time.Second - } - if left > 0 { - timeLeft := Format(int64(left)).To(U_DURATION).String() - timeLeftBox = fmt.Sprintf(" %s", timeLeft) - } - } - } - - if len(timeLeftBox) < pb.TimeBoxWidth { - timeLeftBox = fmt.Sprintf("%s%s", strings.Repeat(" ", pb.TimeBoxWidth-len(timeLeftBox)), timeLeftBox) - } - - // speed - if pb.ShowSpeed && currentFromStart > 0 { - fromStart := time.Now().Sub(pb.startTime) - speed := float64(currentFromStart) / (float64(fromStart) / float64(time.Second)) - speedBox = " " + Format(int64(speed)).To(pb.Units).Width(pb.UnitsWidth).PerSec().String() - } - - barWidth := escapeAwareRuneCountInString(countersBox + pb.BarStart + pb.BarEnd + percentBox + timeLeftBox + speedBox + pb.prefix + pb.postfix) - // bar - if pb.ShowBar { - size := width - barWidth - if size > 0 { - if pb.Total > 0 { - curSize := int(math.Ceil((float64(current) / float64(pb.Total)) * float64(size))) - emptySize := size - curSize - barBox = pb.BarStart - if emptySize < 0 { - emptySize = 0 - } - if curSize > size { - curSize = size - } - - cursorLen := escapeAwareRuneCountInString(pb.Current) - if emptySize <= 0 { - barBox += strings.Repeat(pb.Current, curSize/cursorLen) - } else if curSize > 0 { - cursorEndLen := escapeAwareRuneCountInString(pb.CurrentN) - cursorRepetitions := (curSize - cursorEndLen) / cursorLen - barBox += strings.Repeat(pb.Current, cursorRepetitions) - barBox += pb.CurrentN - } - - emptyLen := escapeAwareRuneCountInString(pb.Empty) - barBox += strings.Repeat(pb.Empty, emptySize/emptyLen) - barBox += pb.BarEnd - } else { - pos := size - int(current)%int(size) - barBox = pb.BarStart - if pos-1 > 0 { - barBox += strings.Repeat(pb.Empty, pos-1) - } - barBox += pb.Current - if size-pos-1 > 0 { - barBox += strings.Repeat(pb.Empty, size-pos-1) - } - barBox += pb.BarEnd - } - } - } - - // check len - out = pb.prefix + countersBox + barBox + percentBox + speedBox + timeLeftBox + pb.postfix - if cl := escapeAwareRuneCountInString(out); cl < width { - end = strings.Repeat(" ", width-cl) - } - - // and print! - pb.mu.Lock() - pb.lastPrint = out + end - isFinish := pb.isFinish - pb.mu.Unlock() - switch { - case isFinish: - return - case pb.Output != nil: - fmt.Fprint(pb.Output, "\r"+out+end) - case pb.Callback != nil: - pb.Callback(out + end) - case !pb.NotPrint: - fmt.Print("\r" + out + end) - } -} - -// GetTerminalWidth - returns terminal width for all platforms. -func GetTerminalWidth() (int, error) { - return terminalWidth() -} - -func (pb *ProgressBar) GetWidth() int { - if pb.ForceWidth { - return pb.Width - } - - width := pb.Width - termWidth, _ := terminalWidth() - if width == 0 || termWidth <= width { - width = termWidth - } - - return width -} - -// Write the current state of the progressbar -func (pb *ProgressBar) Update() { - c := atomic.LoadInt64(&pb.current) - p := atomic.LoadInt64(&pb.previous) - if p != c { - pb.mu.Lock() - pb.changeTime = time.Now() - pb.mu.Unlock() - atomic.StoreInt64(&pb.previous, c) - } - pb.write(c) - if pb.AutoStat { - if c == 0 { - pb.startTime = time.Now() - pb.startValue = 0 - } else if c >= pb.Total && pb.isFinish != true { - pb.Finish() - } - } -} - -// String return the last bar print -func (pb *ProgressBar) String() string { - pb.mu.Lock() - defer pb.mu.Unlock() - return pb.lastPrint -} - -// Internal loop for refreshing the progressbar -func (pb *ProgressBar) refresher() { - for { - select { - case <-pb.finish: - return - case <-time.After(pb.RefreshRate): - pb.Update() - } - } -} diff --git a/vendor/github.com/cheggaaa/pb/pb_appengine.go b/vendor/github.com/cheggaaa/pb/pb_appengine.go deleted file mode 100644 index d85dbc3b2..000000000 --- a/vendor/github.com/cheggaaa/pb/pb_appengine.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine - -package pb - -import "errors" - -// terminalWidth returns width of the terminal, which is not supported -// and should always failed on appengine classic which is a sandboxed PaaS. -func terminalWidth() (int, error) { - return 0, errors.New("Not supported") -} diff --git a/vendor/github.com/cheggaaa/pb/pb_win.go b/vendor/github.com/cheggaaa/pb/pb_win.go deleted file mode 100644 index 72f682835..000000000 --- a/vendor/github.com/cheggaaa/pb/pb_win.go +++ /dev/null @@ -1,141 +0,0 @@ -// +build windows - -package pb - -import ( - "errors" - "fmt" - "os" - "sync" - "syscall" - "unsafe" -) - -var tty = os.Stdin - -var ( - kernel32 = syscall.NewLazyDLL("kernel32.dll") - - // GetConsoleScreenBufferInfo retrieves information about the - // specified console screen buffer. - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms683171(v=vs.85).aspx - procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo") - - // GetConsoleMode retrieves the current input mode of a console's - // input buffer or the current output mode of a console screen buffer. - // https://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx - getConsoleMode = kernel32.NewProc("GetConsoleMode") - - // SetConsoleMode sets the input mode of a console's input buffer - // or the output mode of a console screen buffer. - // https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx - setConsoleMode = kernel32.NewProc("SetConsoleMode") - - // SetConsoleCursorPosition sets the cursor position in the - // specified console screen buffer. - // https://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx - setConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition") -) - -type ( - // Defines the coordinates of the upper left and lower right corners - // of a rectangle. - // See - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms686311(v=vs.85).aspx - smallRect struct { - Left, Top, Right, Bottom int16 - } - - // Defines the coordinates of a character cell in a console screen - // buffer. The origin of the coordinate system (0,0) is at the top, left cell - // of the buffer. - // See - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms682119(v=vs.85).aspx - coordinates struct { - X, Y int16 - } - - word int16 - - // Contains information about a console screen buffer. - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms682093(v=vs.85).aspx - consoleScreenBufferInfo struct { - dwSize coordinates - dwCursorPosition coordinates - wAttributes word - srWindow smallRect - dwMaximumWindowSize coordinates - } -) - -// terminalWidth returns width of the terminal. -func terminalWidth() (width int, err error) { - var info consoleScreenBufferInfo - _, _, e := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(syscall.Stdout), uintptr(unsafe.Pointer(&info)), 0) - if e != 0 { - return 0, error(e) - } - return int(info.dwSize.X) - 1, nil -} - -func getCursorPos() (pos coordinates, err error) { - var info consoleScreenBufferInfo - _, _, e := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(syscall.Stdout), uintptr(unsafe.Pointer(&info)), 0) - if e != 0 { - return info.dwCursorPosition, error(e) - } - return info.dwCursorPosition, nil -} - -func setCursorPos(pos coordinates) error { - _, _, e := syscall.Syscall(setConsoleCursorPosition.Addr(), 2, uintptr(syscall.Stdout), uintptr(uint32(uint16(pos.Y))<<16|uint32(uint16(pos.X))), 0) - if e != 0 { - return error(e) - } - return nil -} - -var ErrPoolWasStarted = errors.New("Bar pool was started") - -var echoLocked bool -var echoLockMutex sync.Mutex - -var oldState word - -func lockEcho() (quit chan int, err error) { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - if echoLocked { - err = ErrPoolWasStarted - return - } - echoLocked = true - - if _, _, e := syscall.Syscall(getConsoleMode.Addr(), 2, uintptr(syscall.Stdout), uintptr(unsafe.Pointer(&oldState)), 0); e != 0 { - err = fmt.Errorf("Can't get terminal settings: %v", e) - return - } - - newState := oldState - const ENABLE_ECHO_INPUT = 0x0004 - const ENABLE_LINE_INPUT = 0x0002 - newState = newState & (^(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT)) - if _, _, e := syscall.Syscall(setConsoleMode.Addr(), 2, uintptr(syscall.Stdout), uintptr(newState), 0); e != 0 { - err = fmt.Errorf("Can't set terminal settings: %v", e) - return - } - return -} - -func unlockEcho() (err error) { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - if !echoLocked { - return - } - echoLocked = false - if _, _, e := syscall.Syscall(setConsoleMode.Addr(), 2, uintptr(syscall.Stdout), uintptr(oldState), 0); e != 0 { - err = fmt.Errorf("Can't set terminal settings") - } - return -} diff --git a/vendor/github.com/cheggaaa/pb/pb_x.go b/vendor/github.com/cheggaaa/pb/pb_x.go deleted file mode 100644 index bbbe7c2d6..000000000 --- a/vendor/github.com/cheggaaa/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" - - "golang.org/x/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() (quit chan int, err error) { - echoLockMutex.Lock() - defer echoLockMutex.Unlock() - if origTermStatePtr != nil { - return quit, ErrPoolWasStarted - } - - fd := int(tty.Fd()) - - oldTermStatePtr, err := unix.IoctlGetTermios(fd, ioctlReadTermios) - if err != nil { - return nil, fmt.Errorf("Can't get terminal settings: %v", err) - } - - oldTermios := *oldTermStatePtr - 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) - } - - quit = make(chan int, 1) - go catchTerminate(quit) - 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(quit chan int) { - sig := make(chan os.Signal, 1) - signal.Notify(sig, os.Interrupt, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGKILL) - defer signal.Stop(sig) - select { - case <-quit: - unlockEcho() - case <-sig: - unlockEcho() - } -} diff --git a/vendor/github.com/cheggaaa/pb/pool.go b/vendor/github.com/cheggaaa/pb/pool.go deleted file mode 100644 index bc1a13886..000000000 --- a/vendor/github.com/cheggaaa/pb/pool.go +++ /dev/null @@ -1,82 +0,0 @@ -// +build linux darwin freebsd netbsd openbsd solaris dragonfly windows - -package pb - -import ( - "io" - "sync" - "time" -) - -// Create and start new pool with given bars -// You need call pool.Stop() after work -func StartPool(pbs ...*ProgressBar) (pool *Pool, err error) { - pool = new(Pool) - if err = pool.start(); err != nil { - return - } - pool.Add(pbs...) - return -} - -type Pool struct { - Output io.Writer - RefreshRate time.Duration - bars []*ProgressBar - lastBarsCount int - quit chan int - m sync.Mutex - finishOnce sync.Once -} - -// Add progress bars. -func (p *Pool) Add(pbs ...*ProgressBar) { - p.m.Lock() - defer p.m.Unlock() - for _, bar := range pbs { - bar.ManualUpdate = true - bar.NotPrint = true - bar.Start() - p.bars = append(p.bars, bar) - } -} - -func (p *Pool) start() (err error) { - p.RefreshRate = DefaultRefreshRate - quit, err := lockEcho() - if err != nil { - return - } - p.quit = make(chan int) - go p.writer(quit) - return -} - -func (p *Pool) writer(finish chan int) { - var first = true - for { - select { - case <-time.After(p.RefreshRate): - if p.print(first) { - p.print(false) - finish <- 1 - return - } - first = false - case <-p.quit: - finish <- 1 - return - } - } -} - -// Restore terminal state and close pool -func (p *Pool) Stop() error { - // Wait until one final refresh has passed. - time.Sleep(p.RefreshRate) - - p.finishOnce.Do(func() { - close(p.quit) - }) - return unlockEcho() -} diff --git a/vendor/github.com/cheggaaa/pb/pool_win.go b/vendor/github.com/cheggaaa/pb/pool_win.go deleted file mode 100644 index 63598d378..000000000 --- a/vendor/github.com/cheggaaa/pb/pool_win.go +++ /dev/null @@ -1,45 +0,0 @@ -// +build windows - -package pb - -import ( - "fmt" - "log" -) - -func (p *Pool) print(first bool) bool { - p.m.Lock() - defer p.m.Unlock() - var out string - if !first { - coords, err := getCursorPos() - if err != nil { - log.Panic(err) - } - coords.Y -= int16(p.lastBarsCount) - if coords.Y < 0 { - coords.Y = 0 - } - coords.X = 0 - - err = setCursorPos(coords) - if err != nil { - log.Panic(err) - } - } - isFinished := true - for _, bar := range p.bars { - if !bar.IsFinished() { - isFinished = false - } - bar.Update() - out += fmt.Sprintf("\r%s\n", bar.String()) - } - if p.Output != nil { - fmt.Fprint(p.Output, out) - } else { - fmt.Print(out) - } - p.lastBarsCount = len(p.bars) - return isFinished -} diff --git a/vendor/github.com/cheggaaa/pb/pool_x.go b/vendor/github.com/cheggaaa/pb/pool_x.go deleted file mode 100644 index a8ae14d2f..000000000 --- a/vendor/github.com/cheggaaa/pb/pool_x.go +++ /dev/null @@ -1,29 +0,0 @@ -// +build linux darwin freebsd netbsd openbsd solaris dragonfly - -package pb - -import "fmt" - -func (p *Pool) print(first bool) bool { - p.m.Lock() - defer p.m.Unlock() - var out string - if !first { - out = fmt.Sprintf("\033[%dA", p.lastBarsCount) - } - isFinished := true - for _, bar := range p.bars { - if !bar.IsFinished() { - isFinished = false - } - bar.Update() - out += fmt.Sprintf("\r%s\n", bar.String()) - } - if p.Output != nil { - fmt.Fprint(p.Output, out) - } else { - fmt.Print(out) - } - p.lastBarsCount = len(p.bars) - return isFinished -} diff --git a/vendor/github.com/cheggaaa/pb/reader.go b/vendor/github.com/cheggaaa/pb/reader.go deleted file mode 100644 index 9f3148b54..000000000 --- a/vendor/github.com/cheggaaa/pb/reader.go +++ /dev/null @@ -1,25 +0,0 @@ -package pb - -import ( - "io" -) - -// It's proxy reader, implement io.Reader -type Reader struct { - io.Reader - bar *ProgressBar -} - -func (r *Reader) Read(p []byte) (n int, err error) { - n, err = r.Reader.Read(p) - r.bar.Add(n) - return -} - -// Close the reader when it implements io.Closer -func (r *Reader) Close() (err error) { - if closer, ok := r.Reader.(io.Closer); ok { - return closer.Close() - } - return -} diff --git a/vendor/github.com/cheggaaa/pb/runecount.go b/vendor/github.com/cheggaaa/pb/runecount.go deleted file mode 100644 index c617c55ec..000000000 --- a/vendor/github.com/cheggaaa/pb/runecount.go +++ /dev/null @@ -1,17 +0,0 @@ -package pb - -import ( - "github.com/mattn/go-runewidth" - "regexp" -) - -// Finds the control character sequences (like colors) -var ctrlFinder = regexp.MustCompile("\x1b\x5b[0-9]+\x6d") - -func escapeAwareRuneCountInString(s string) int { - n := runewidth.StringWidth(s) - for _, sm := range ctrlFinder.FindAllString(s, -1) { - n -= runewidth.StringWidth(sm) - } - return n -} diff --git a/vendor/github.com/cheggaaa/pb/termios_bsd.go b/vendor/github.com/cheggaaa/pb/termios_bsd.go deleted file mode 100644 index 517ea8ed7..000000000 --- a/vendor/github.com/cheggaaa/pb/termios_bsd.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build darwin freebsd netbsd openbsd dragonfly -// +build !appengine - -package pb - -import "syscall" - -const ioctlReadTermios = syscall.TIOCGETA -const ioctlWriteTermios = syscall.TIOCSETA diff --git a/vendor/github.com/cheggaaa/pb/termios_sysv.go b/vendor/github.com/cheggaaa/pb/termios_sysv.go deleted file mode 100644 index b10f61859..000000000 --- a/vendor/github.com/cheggaaa/pb/termios_sysv.go +++ /dev/null @@ -1,13 +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 linux solaris -// +build !appengine - -package pb - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TCGETS -const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/github.com/chmduquesne/rollinghash/.travis.yml b/vendor/github.com/chmduquesne/rollinghash/.travis.yml new file mode 100644 index 000000000..d14a524e2 --- /dev/null +++ b/vendor/github.com/chmduquesne/rollinghash/.travis.yml @@ -0,0 +1,12 @@ +language: go +go: + - "1.10" + - "1.9" + - "1.8" + - "1.7" +before_install: + - go get github.com/mattn/goveralls +script: + - go test -v ./... + - go test -bench=. ./... + - $HOME/gopath/bin/goveralls -package=./... -service=travis-ci diff --git a/vendor/github.com/chmduquesne/rollinghash/README.md b/vendor/github.com/chmduquesne/rollinghash/README.md new file mode 100644 index 000000000..67ce2c238 --- /dev/null +++ b/vendor/github.com/chmduquesne/rollinghash/README.md @@ -0,0 +1,120 @@ +[![Build Status](https://travis-ci.org/chmduquesne/rollinghash.svg?branch=master)](https://travis-ci.org/chmduquesne/rollinghash) +[![Coverage Status](https://coveralls.io/repos/github/chmduquesne/rollinghash/badge.svg?branch=master)](https://coveralls.io/github/chmduquesne/rollinghash?branch=master) +[![GoDoc Reference](http://godoc.org/github.com/chmduquesne/rollinghash?status.svg)](https://godoc.org/github.com/chmduquesne/rollinghash) +![Go 1.7+](https://img.shields.io/badge/go-1.7%2B-orange.svg) + +Rolling Hashes +============== + +Philosophy +---------- + +This package contains several various rolling hashes for you to play with +crazy ideas. The API design philosophy is to stick as closely as possible +to the interface provided by the builtin hash package (the hashes +implemented here are effectively drop-in replacements for their builtin +counterparts), while providing simultaneously the highest speed and +simplicity. + +Usage +----- + +A [`rollinghash.Hash`](https://godoc.org/github.com/chmduquesne/rollinghash#Hash) +is just a [`hash.Hash`](https://golang.org/pkg/hash/#Hash) which +implements the +[`Roller`](https://godoc.org/github.com/chmduquesne/rollinghash#Roller) +interface. Here is how it is typically used: + +```golang +data := []byte("here is some data to roll on") +h := buzhash64.New() +n := 16 + +// Initialize the rolling window +h.Write(data[:n]) + +for _, c := range(data[n:]) { + + // Slide the window and update the hash + h.Roll(c) + + // Get the updated hash value + fmt.Println(h.Sum64()) +} +``` + +Gotchas +------- + +The rolling window MUST be initialized by calling `Write` first (which +saves a copy). The byte leaving the rolling window is inferred from the +internal copy of the rolling window, which is updated with every call to +`Roll`. + +If you want your code to run at the highest speed, do NOT cast the result +of a `New()` as a rollinghash.Hash. Instead, use the native type returned +by `New()`. This is because the go compiler cannot inline calls from an +interface. When later you call Roll(), the native type call will be +inlined by the compiler, but not the casted type call. + +```golang +var h1 rollinghash.Hash +h1 = buzhash32.New() +h2 := buzhash32.New() + +[...] + +h1.Roll(b) // Not inlined (slow) +h2.Roll(b) // inlined (fast) +``` + +What's new in v4 +---------------- + +In v4: + +* `Write` has become fully consistent with `hash.Hash`. As opposed to + previous versions, where writing data would reinitialize the window, it + now appends this data to the existing window. In order to reset the + window, one should instead use the `Reset` method. + +* Calling `Roll` on an empty window is considered a bug, and now triggers + a panic. + +Brief reminder of the behaviors in previous versions: + +* From v0.x.x to v2.x.x: `Roll` returns an error for an empty window. + `Write` reinitializes the rolling window. + +* v3.x.x : `Roll` does not return anything. `Write` still reinitializes + the rolling window. The rolling window always has a minimum size of 1, + which yields wrong results when using roll before having initialized the + window. + +Go versions +----------- + +The `RabinKarp64` rollinghash does not yield consistent results before +go1.7. This is because it uses `Rand.Read()` from the builtin `math/rand`. +This function was [fixed in go +1.7](https://golang.org/doc/go1.7#math_rand) to produce a consistent +stream of bytes that is independant of the size of the input buffer. If +you depend on this hash, it is strongly recommended to stick to versions +of go superior to 1.7. + +License +------- + +This code is delivered to you under the terms of the MIT public license, +except the `rabinkarp64` subpackage, which has been adapted from +[restic](https://github.com/restic/chunker) (BSD 2-clause "Simplified"). + +Notable users +------------- + +* [syncthing](https://syncthing.net/), a decentralized synchronisation + solution +* [muscato](https://github.com/kshedden/muscato), a genome analysis tool + +If you are using this in production or for research, let me know and I +will happily put a link here! diff --git a/vendor/github.com/chmduquesne/rollinghash/roll/main.go b/vendor/github.com/chmduquesne/rollinghash/roll/main.go deleted file mode 100644 index baa860f4c..000000000 --- a/vendor/github.com/chmduquesne/rollinghash/roll/main.go +++ /dev/null @@ -1,140 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "hash" - "io" - "log" - "os" - "runtime/pprof" - "time" - - "code.cloudfoundry.org/bytefmt" - //rollsum "github.com/chmduquesne/rollinghash/adler32" - //rollsum "github.com/chmduquesne/rollinghash/buzhash32" - rollsum "github.com/chmduquesne/rollinghash/buzhash64" - //rollsum "github.com/chmduquesne/rollinghash/bozo32" -) - -const ( - KiB = 1024 - MiB = 1024 * KiB - GiB = 1024 * MiB - - clearscreen = "\033[2J\033[1;1H" - clearline = "\x1b[2K" -) - -func genMasks() (res []uint64) { - res = make([]uint64, 64) - ones := ^uint64(0) // 0xffffffffffffffff - for i := 0; i < 64; i++ { - res[i] = ones >> uint(63-i) - } - return -} - -// Gets the hash sum as a uint64 -func sum64(h hash.Hash) (res uint64) { - buf := make([]byte, 0, 8) - s := h.Sum(buf) - for _, b := range s { - res <<= 8 - res |= uint64(b) - } - return -} - -func main() { - cpuprofile := flag.String("cpuprofile", "", "write cpu profile to file") - dostats := flag.Bool("stats", false, "Do some stats about the rolling sum") - size := flag.String("size", "256M", "How much data to read") - flag.Parse() - - if *cpuprofile != "" { - f, err := os.Create(*cpuprofile) - if err != nil { - log.Fatal(err) - } - pprof.StartCPUProfile(f) - defer pprof.StopCPUProfile() - } - - fileSize, err := bytefmt.ToBytes(*size) - if err != nil { - log.Fatal(err) - } - - bufsize := 16 * MiB - buf := make([]byte, bufsize) - t := time.Now() - - f, err := os.Open("/dev/urandom") - if err != nil { - log.Fatal(err) - } - defer func() { - if err := f.Close(); err != nil { - log.Fatal(err) - } - }() - - io.ReadFull(f, buf) - - roll := rollsum.New() - roll.Write(buf[:64]) - - masks := genMasks() - hits := make(map[uint64]uint64) - for _, m := range masks { - hits[m] = 0 - } - - n := uint64(0) - k := 0 - for n < fileSize { - if k >= bufsize { - status := fmt.Sprintf("Byte count: %s", bytefmt.ByteSize(n)) - if *dostats { - fmt.Printf(clearscreen) - fmt.Println(status) - for i, m := range masks { - frequency := "NaN" - if hits[m] != 0 { - frequency = bytefmt.ByteSize(n / hits[m]) - } - fmt.Printf("0x%016x (%02d bits): every %s\n", m, i+1, frequency) - } - } else { - fmt.Printf(clearline) - fmt.Printf(status) - fmt.Printf("\r") - } - _, err := io.ReadFull(f, buf) - if err != nil { - panic(err) - } - k = 0 - } - roll.Roll(buf[k]) - if *dostats { - s := sum64(roll) - for _, m := range masks { - if s&m == m { - hits[m] += 1 - } else { - break - } - } - } - k++ - n++ - } - duration := time.Since(t) - fmt.Printf("Rolled %s of data in %v (%s/s).\n", - bytefmt.ByteSize(n), - duration, - bytefmt.ByteSize(n*1e9/uint64(duration)), - ) -} diff --git a/vendor/github.com/d4l3k/messagediff/.coveralls.yml b/vendor/github.com/d4l3k/messagediff/.coveralls.yml new file mode 100644 index 000000000..036d07075 --- /dev/null +++ b/vendor/github.com/d4l3k/messagediff/.coveralls.yml @@ -0,0 +1 @@ +repo_token: LWIe7rP7M3hBnAxpsMaZhrVBs2DSyhzoQ diff --git a/vendor/github.com/d4l3k/messagediff/.gitignore b/vendor/github.com/d4l3k/messagediff/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/d4l3k/messagediff/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/d4l3k/messagediff/.travis.yml b/vendor/github.com/d4l3k/messagediff/.travis.yml new file mode 100644 index 000000000..f8639351c --- /dev/null +++ b/vendor/github.com/d4l3k/messagediff/.travis.yml @@ -0,0 +1,26 @@ +language: go + +os: + - linux + +go: + - 1 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7.x + - 1.8.x + - tip + +before_install: + - if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi + - go get github.com/axw/gocov/gocov + - go get github.com/modocache/gover + - go get github.com/mattn/goveralls + +script: + - go test -v -coverprofile=example.coverprofile ./example + - go test -v -coverprofile=main.coverprofile + - $HOME/gopath/bin/gover + - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=gover.coverprofile diff --git a/vendor/github.com/d4l3k/messagediff/CHANGELOG.md b/vendor/github.com/d4l3k/messagediff/CHANGELOG.md new file mode 100644 index 000000000..4090fd103 --- /dev/null +++ b/vendor/github.com/d4l3k/messagediff/CHANGELOG.md @@ -0,0 +1,14 @@ +## nightly +* Added support for ignoring fields. + +## v1.1.0 + +* Added support for recursive data structures. +* Fixed bug with embedded fixed length arrays in structs. +* Added `example/` directory. +* Minor test bug fixes for future go versions. +* Added change log. + +## v1.0.0 + +Initial tagged release release. diff --git a/vendor/github.com/d4l3k/messagediff/README.md b/vendor/github.com/d4l3k/messagediff/README.md new file mode 100644 index 000000000..147c34ad2 --- /dev/null +++ b/vendor/github.com/d4l3k/messagediff/README.md @@ -0,0 +1,90 @@ +# messagediff [![Build Status](https://travis-ci.org/d4l3k/messagediff.svg?branch=master)](https://travis-ci.org/d4l3k/messagediff) [![Coverage Status](https://coveralls.io/repos/github/d4l3k/messagediff/badge.svg?branch=master)](https://coveralls.io/github/d4l3k/messagediff?branch=master) [![GoDoc](https://godoc.org/github.com/d4l3k/messagediff?status.svg)](https://godoc.org/github.com/d4l3k/messagediff) + +A library for doing diffs of arbitrary Golang structs. + +If the unsafe package is available messagediff will diff unexported fields in +addition to exported fields. This is primarily used for testing purposes as it +allows for providing informative error messages. + +Optionally, fields in structs can be tagged as `testdiff:"ignore"` to make +messagediff skip it when doing the comparison. + + +## Example Usage +In a normal file: +```go +package main + +import "gopkg.in/d4l3k/messagediff.v1" + +type someStruct struct { + A, b int + C []int +} + +func main() { + a := someStruct{1, 2, []int{1}} + b := someStruct{1, 3, []int{1, 2}} + diff, equal := messagediff.PrettyDiff(a, b) + /* + diff = + `added: .C[1] = 2 + modified: .b = 3` + + equal = false + */ +} + +``` +In a test: +```go +import "gopkg.in/d4l3k/messagediff.v1" + +... + +type someStruct struct { + A, b int + C []int +} + +func TestSomething(t *testing.T) { + want := someStruct{1, 2, []int{1}} + got := someStruct{1, 3, []int{1, 2}} + if diff, equal := messagediff.PrettyDiff(want, got); !equal { + t.Errorf("Something() = %#v\n%s", got, diff) + } +} +``` +To ignore a field in a struct, just annotate it with testdiff:"ignore" like +this: +```go +package main + +import "gopkg.in/d4l3k/messagediff.v1" + +type someStruct struct { + A int + B int `testdiff:"ignore"` +} + +func main() { + a := someStruct{1, 2} + b := someStruct{1, 3} + diff, equal := messagediff.PrettyDiff(a, b) + /* + equal = true + diff = "" + */ +} +``` + +See the `DeepDiff` function for using the diff results programmatically. + +## License +Copyright (c) 2015 [Tristan Rice](https://fn.lc) + +messagediff is licensed under the MIT license. See the LICENSE file for more information. + +bypass.go and bypasssafe.go are borrowed from +[go-spew](https://github.com/davecgh/go-spew) and have a seperate copyright +notice. diff --git a/vendor/github.com/d4l3k/messagediff/example/example.go b/vendor/github.com/d4l3k/messagediff/example/example.go deleted file mode 100644 index c7842af75..000000000 --- a/vendor/github.com/d4l3k/messagediff/example/example.go +++ /dev/null @@ -1 +0,0 @@ -package examples diff --git a/vendor/github.com/dustin/go-humanize/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE deleted file mode 100644 index 8d9a94a90..000000000 --- a/vendor/github.com/dustin/go-humanize/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2005-2008 Dustin Sallings - -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/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go deleted file mode 100644 index f49dc337d..000000000 --- a/vendor/github.com/dustin/go-humanize/big.go +++ /dev/null @@ -1,31 +0,0 @@ -package humanize - -import ( - "math/big" -) - -// order of magnitude (to a max order) -func oomm(n, b *big.Int, maxmag int) (float64, int) { - mag := 0 - m := &big.Int{} - for n.Cmp(b) >= 0 { - n.DivMod(n, b, m) - mag++ - if mag == maxmag && maxmag >= 0 { - break - } - } - return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag -} - -// total order of magnitude -// (same as above, but with no upper limit) -func oom(n, b *big.Int) (float64, int) { - mag := 0 - m := &big.Int{} - for n.Cmp(b) >= 0 { - n.DivMod(n, b, m) - mag++ - } - return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag -} diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go deleted file mode 100644 index 1a2bf6172..000000000 --- a/vendor/github.com/dustin/go-humanize/bigbytes.go +++ /dev/null @@ -1,173 +0,0 @@ -package humanize - -import ( - "fmt" - "math/big" - "strings" - "unicode" -) - -var ( - bigIECExp = big.NewInt(1024) - - // BigByte is one byte in bit.Ints - BigByte = big.NewInt(1) - // BigKiByte is 1,024 bytes in bit.Ints - BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp) - // BigMiByte is 1,024 k bytes in bit.Ints - BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp) - // BigGiByte is 1,024 m bytes in bit.Ints - BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp) - // BigTiByte is 1,024 g bytes in bit.Ints - BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp) - // BigPiByte is 1,024 t bytes in bit.Ints - BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp) - // BigEiByte is 1,024 p bytes in bit.Ints - BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp) - // BigZiByte is 1,024 e bytes in bit.Ints - BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp) - // BigYiByte is 1,024 z bytes in bit.Ints - BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp) -) - -var ( - bigSIExp = big.NewInt(1000) - - // BigSIByte is one SI byte in big.Ints - BigSIByte = big.NewInt(1) - // BigKByte is 1,000 SI bytes in big.Ints - BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp) - // BigMByte is 1,000 SI k bytes in big.Ints - BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp) - // BigGByte is 1,000 SI m bytes in big.Ints - BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp) - // BigTByte is 1,000 SI g bytes in big.Ints - BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp) - // BigPByte is 1,000 SI t bytes in big.Ints - BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp) - // BigEByte is 1,000 SI p bytes in big.Ints - BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp) - // BigZByte is 1,000 SI e bytes in big.Ints - BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp) - // BigYByte is 1,000 SI z bytes in big.Ints - BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp) -) - -var bigBytesSizeTable = map[string]*big.Int{ - "b": BigByte, - "kib": BigKiByte, - "kb": BigKByte, - "mib": BigMiByte, - "mb": BigMByte, - "gib": BigGiByte, - "gb": BigGByte, - "tib": BigTiByte, - "tb": BigTByte, - "pib": BigPiByte, - "pb": BigPByte, - "eib": BigEiByte, - "eb": BigEByte, - "zib": BigZiByte, - "zb": BigZByte, - "yib": BigYiByte, - "yb": BigYByte, - // Without suffix - "": BigByte, - "ki": BigKiByte, - "k": BigKByte, - "mi": BigMiByte, - "m": BigMByte, - "gi": BigGiByte, - "g": BigGByte, - "ti": BigTiByte, - "t": BigTByte, - "pi": BigPiByte, - "p": BigPByte, - "ei": BigEiByte, - "e": BigEByte, - "z": BigZByte, - "zi": BigZiByte, - "y": BigYByte, - "yi": BigYiByte, -} - -var ten = big.NewInt(10) - -func humanateBigBytes(s, base *big.Int, sizes []string) string { - if s.Cmp(ten) < 0 { - return fmt.Sprintf("%d B", s) - } - c := (&big.Int{}).Set(s) - val, mag := oomm(c, base, len(sizes)-1) - suffix := sizes[mag] - f := "%.0f %s" - if val < 10 { - f = "%.1f %s" - } - - return fmt.Sprintf(f, val, suffix) - -} - -// BigBytes produces a human readable representation of an SI size. -// -// See also: ParseBigBytes. -// -// 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) -} - -// BigIBytes produces a human readable representation of an IEC size. -// -// See also: ParseBigBytes. -// -// 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) -} - -// ParseBigBytes parses a string representation of bytes into the number -// of bytes it represents. -// -// See also: BigBytes, BigIBytes. -// -// 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 == '.' || r == ',') { - break - } - if r == ',' { - hasComma = true - } - lastDigit++ - } - - num := s[:lastDigit] - if hasComma { - num = strings.Replace(num, ",", "", -1) - } - - val := &big.Rat{} - _, err := fmt.Sscanf(num, "%f", val) - if err != nil { - return nil, err - } - - extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) - if m, ok := bigBytesSizeTable[extra]; ok { - mv := (&big.Rat{}).SetInt(m) - val.Mul(val, mv) - rv := &big.Int{} - rv.Div(val.Num(), val.Denom()) - return rv, nil - } - - return nil, fmt.Errorf("unhandled size name: %v", extra) -} diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go deleted file mode 100644 index 0b498f488..000000000 --- a/vendor/github.com/dustin/go-humanize/bytes.go +++ /dev/null @@ -1,143 +0,0 @@ -package humanize - -import ( - "fmt" - "math" - "strconv" - "strings" - "unicode" -) - -// IEC Sizes. -// kibis of bits -const ( - Byte = 1 << (iota * 10) - KiByte - MiByte - GiByte - TiByte - PiByte - EiByte -) - -// SI Sizes. -const ( - IByte = 1 - KByte = IByte * 1000 - MByte = KByte * 1000 - GByte = MByte * 1000 - TByte = GByte * 1000 - PByte = TByte * 1000 - EByte = PByte * 1000 -) - -var bytesSizeTable = map[string]uint64{ - "b": Byte, - "kib": KiByte, - "kb": KByte, - "mib": MiByte, - "mb": MByte, - "gib": GiByte, - "gb": GByte, - "tib": TiByte, - "tb": TByte, - "pib": PiByte, - "pb": PByte, - "eib": EiByte, - "eb": EByte, - // Without suffix - "": Byte, - "ki": KiByte, - "k": KByte, - "mi": MiByte, - "m": MByte, - "gi": GiByte, - "g": GByte, - "ti": TiByte, - "t": TByte, - "pi": PiByte, - "p": PByte, - "ei": EiByte, - "e": EByte, -} - -func logn(n, b float64) float64 { - return math.Log(n) / math.Log(b) -} - -func humanateBytes(s uint64, base float64, sizes []string) string { - if s < 10 { - return fmt.Sprintf("%d B", s) - } - e := math.Floor(logn(float64(s), base)) - suffix := sizes[int(e)] - val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10 - f := "%.0f %s" - if val < 10 { - f = "%.1f %s" - } - - return fmt.Sprintf(f, val, suffix) -} - -// Bytes produces a human readable representation of an SI size. -// -// See also: ParseBytes. -// -// Bytes(82854982) -> 83 MB -func Bytes(s uint64) string { - sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} - return humanateBytes(s, 1000, sizes) -} - -// IBytes produces a human readable representation of an IEC size. -// -// See also: ParseBytes. -// -// IBytes(82854982) -> 79 MiB -func IBytes(s uint64) string { - sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} - return humanateBytes(s, 1024, sizes) -} - -// ParseBytes parses a string representation of bytes into the number -// of bytes it represents. -// -// See Also: Bytes, IBytes. -// -// 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 == '.' || r == ',') { - break - } - if r == ',' { - hasComma = true - } - lastDigit++ - } - - num := s[:lastDigit] - if hasComma { - num = strings.Replace(num, ",", "", -1) - } - - f, err := strconv.ParseFloat(num, 64) - if err != nil { - return 0, err - } - - extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) - if m, ok := bytesSizeTable[extra]; ok { - f *= float64(m) - if f >= math.MaxUint64 { - return 0, fmt.Errorf("too large: %v", s) - } - return uint64(f), nil - } - - return 0, fmt.Errorf("unhandled size name: %v", extra) -} diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go deleted file mode 100644 index 13611aaab..000000000 --- a/vendor/github.com/dustin/go-humanize/comma.go +++ /dev/null @@ -1,108 +0,0 @@ -package humanize - -import ( - "bytes" - "math" - "math/big" - "strconv" - "strings" -) - -// Comma produces a string form of the given number in base 10 with -// commas after every three orders of magnitude. -// -// 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 - } - - parts := []string{"", "", "", "", "", "", ""} - j := len(parts) - 1 - - for v > 999 { - parts[j] = strconv.FormatInt(v%1000, 10) - switch len(parts[j]) { - case 2: - parts[j] = "0" + parts[j] - case 1: - parts[j] = "00" + parts[j] - } - v = v / 1000 - j-- - } - parts[j] = strconv.Itoa(int(v)) - return sign + strings.Join(parts[j:], ",") -} - -// Commaf produces a string form of the given number in base 10 with -// commas after every three orders of magnitude. -// -// e.g. Commaf(834142.32) -> 834,142.32 -func Commaf(v float64) string { - buf := &bytes.Buffer{} - if v < 0 { - buf.Write([]byte{'-'}) - v = 0 - v - } - - comma := []byte{','} - - parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".") - pos := 0 - if len(parts[0])%3 != 0 { - pos += len(parts[0]) % 3 - buf.WriteString(parts[0][:pos]) - buf.Write(comma) - } - for ; pos < len(parts[0]); pos += 3 { - buf.WriteString(parts[0][pos : pos+3]) - buf.Write(comma) - } - buf.Truncate(buf.Len() - 1) - - if len(parts) > 1 { - buf.Write([]byte{'.'}) - buf.WriteString(parts[1]) - } - return buf.String() -} - -// 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 { - sign := "" - if b.Sign() < 0 { - sign = "-" - b.Abs(b) - } - - athousand := big.NewInt(1000) - c := (&big.Int{}).Set(b) - _, m := oom(c, athousand) - parts := make([]string, m+1) - j := len(parts) - 1 - - mod := &big.Int{} - for b.Cmp(athousand) >= 0 { - b.DivMod(b, athousand, mod) - parts[j] = strconv.FormatInt(mod.Int64(), 10) - switch len(parts[j]) { - case 2: - parts[j] = "0" + parts[j] - case 1: - parts[j] = "00" + parts[j] - } - j-- - } - parts[j] = strconv.Itoa(int(b.Int64())) - return sign + strings.Join(parts[j:], ",") -} diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go deleted file mode 100644 index 620690dec..000000000 --- a/vendor/github.com/dustin/go-humanize/commaf.go +++ /dev/null @@ -1,40 +0,0 @@ -// +build go1.6 - -package humanize - -import ( - "bytes" - "math/big" - "strings" -) - -// BigCommaf produces a string form of the given big.Float in base 10 -// with commas after every three orders of magnitude. -func BigCommaf(v *big.Float) string { - buf := &bytes.Buffer{} - if v.Sign() < 0 { - buf.Write([]byte{'-'}) - v.Abs(v) - } - - comma := []byte{','} - - parts := strings.Split(v.Text('f', -1), ".") - pos := 0 - if len(parts[0])%3 != 0 { - pos += len(parts[0]) % 3 - buf.WriteString(parts[0][:pos]) - buf.Write(comma) - } - for ; pos < len(parts[0]); pos += 3 { - buf.WriteString(parts[0][pos : pos+3]) - buf.Write(comma) - } - buf.Truncate(buf.Len() - 1) - - if len(parts) > 1 { - buf.Write([]byte{'.'}) - buf.WriteString(parts[1]) - } - return buf.String() -} diff --git a/vendor/github.com/dustin/go-humanize/english/words.go b/vendor/github.com/dustin/go-humanize/english/words.go deleted file mode 100644 index 26e9918bd..000000000 --- a/vendor/github.com/dustin/go-humanize/english/words.go +++ /dev/null @@ -1,96 +0,0 @@ -// Package english provides utilities to generate more user-friendly English output. -package english - -import ( - "fmt" - "strings" -) - -// These are included because they are common technical terms. -var specialPlurals = map[string]string{ - "index": "indices", - "matrix": "matrices", - "vertex": "vertices", -} - -var sibilantEndings = []string{"s", "sh", "tch", "x"} - -var isVowel = map[byte]bool{ - 'A': true, 'E': true, 'I': true, 'O': true, 'U': true, - 'a': true, 'e': true, 'i': true, 'o': true, 'u': true, -} - -// PluralWord builds the plural form of an English word. -// The simple English rules of regular pluralization will be used -// if the plural form is an empty string (i.e. not explicitly given). -// The special cases are not guaranteed to work for strings outside ASCII. -func PluralWord(quantity int, singular, plural string) string { - if quantity == 1 { - return singular - } - if plural != "" { - return plural - } - if plural = specialPlurals[singular]; plural != "" { - return plural - } - - // We need to guess what the English plural might be. Keep this - // function simple! It doesn't need to know about every possiblity; - // only regular rules and the most common special cases. - // - // Reference: http://en.wikipedia.org/wiki/English_plural - - for _, ending := range sibilantEndings { - if strings.HasSuffix(singular, ending) { - return singular + "es" - } - } - l := len(singular) - if l >= 2 && singular[l-1] == 'o' && !isVowel[singular[l-2]] { - return singular + "es" - } - if l >= 2 && singular[l-1] == 'y' && !isVowel[singular[l-2]] { - return singular[:l-1] + "ies" - } - - return singular + "s" -} - -// Plural formats an integer and a string into a single pluralized string. -// The simple English rules of regular pluralization will be used -// if the plural form is an empty string (i.e. not explicitly given). -func Plural(quantity int, singular, plural string) string { - return fmt.Sprintf("%d %s", quantity, PluralWord(quantity, singular, plural)) -} - -// WordSeries converts a list of words into a word series in English. -// It returns a string containing all the given words separated by commas, -// the coordinating conjunction, and a serial comma, as appropriate. -func WordSeries(words []string, conjunction string) string { - switch len(words) { - case 0: - return "" - case 1: - return words[0] - default: - return fmt.Sprintf("%s %s %s", strings.Join(words[:len(words)-1], ", "), conjunction, words[len(words)-1]) - } -} - -// OxfordWordSeries converts a list of words into a word series in English, -// using an Oxford comma (https://en.wikipedia.org/wiki/Serial_comma). It -// returns a string containing all the given words separated by commas, the -// coordinating conjunction, and a serial comma, as appropriate. -func OxfordWordSeries(words []string, conjunction string) string { - switch len(words) { - case 0: - return "" - case 1: - return words[0] - case 2: - return strings.Join(words, fmt.Sprintf(" %s ", conjunction)) - default: - return fmt.Sprintf("%s, %s %s", strings.Join(words[:len(words)-1], ", "), conjunction, words[len(words)-1]) - } -} diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go deleted file mode 100644 index c76190b10..000000000 --- a/vendor/github.com/dustin/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/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go deleted file mode 100644 index a2c2da31e..000000000 --- a/vendor/github.com/dustin/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, "83 MB" or -"79 MiB" (whichever you prefer). -*/ -package humanize diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go deleted file mode 100644 index dec618659..000000000 --- a/vendor/github.com/dustin/go-humanize/number.go +++ /dev/null @@ -1,192 +0,0 @@ -package humanize - -/* -Slightly adapted from the source to fit go-humanize. - -Author: https://github.com/gorhill -Source: https://gist.github.com/gorhill/5285193 - -*/ - -import ( - "math" - "strconv" -) - -var ( - renderFloatPrecisionMultipliers = [...]float64{ - 1, - 10, - 100, - 1000, - 10000, - 100000, - 1000000, - 10000000, - 100000000, - 1000000000, - } - - renderFloatPrecisionRounders = [...]float64{ - 0.5, - 0.05, - 0.005, - 0.0005, - 0.00005, - 0.000005, - 0.0000005, - 0.00000005, - 0.000000005, - 0.0000000005, - } -) - -// FormatFloat produces a formatted number as string based on the following user-specified criteria: -// * thousands separator -// * decimal separator -// * decimal precision -// -// Usage: s := RenderFloat(format, n) -// The format parameter tells how to render the number n. -// -// See examples: http://play.golang.org/p/LXc1Ddm1lJ -// -// Examples of format strings, given n = 12345.6789: -// "#,###.##" => "12,345.67" -// "#,###." => "12,345" -// "#,###" => "12345,678" -// "#\u202F###,##" => "12 345,68" -// "#.###,###### => 12.345,678900 -// "" (aka default format) => 12,345.67 -// -// The highest precision allowed is 9 digits after the decimal symbol. -// There is also a version for integer number, FormatInteger(), -// which is convenient for calls within template. -func FormatFloat(format string, n float64) string { - // Special cases: - // NaN = "NaN" - // +Inf = "+Infinity" - // -Inf = "-Infinity" - if math.IsNaN(n) { - return "NaN" - } - if n > math.MaxFloat64 { - return "Infinity" - } - if n < -math.MaxFloat64 { - return "-Infinity" - } - - // default format - precision := 2 - decimalStr := "." - thousandStr := "," - positiveStr := "" - negativeStr := "-" - - if len(format) > 0 { - format := []rune(format) - - // If there is an explicit format directive, - // then default values are these: - precision = 9 - thousandStr = "" - - // collect indices of meaningful formatting directives - formatIndx := []int{} - for i, char := range format { - if char != '#' && char != '0' { - formatIndx = append(formatIndx, i) - } - } - - if len(formatIndx) > 0 { - // Directive at index 0: - // Must be a '+' - // Raise an error if not the case - // index: 0123456789 - // +0.000,000 - // +000,000.0 - // +0000.00 - // +0000 - if formatIndx[0] == 0 { - if format[formatIndx[0]] != '+' { - panic("RenderFloat(): invalid positive sign directive") - } - positiveStr = "+" - formatIndx = formatIndx[1:] - } - - // Two directives: - // First is thousands separator - // Raise an error if not followed by 3-digit - // 0123456789 - // 0.000,000 - // 000,000.00 - if len(formatIndx) == 2 { - if (formatIndx[1] - formatIndx[0]) != 4 { - panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers") - } - thousandStr = string(format[formatIndx[0]]) - formatIndx = formatIndx[1:] - } - - // One directive: - // Directive is decimal separator - // The number of digit-specifier following the separator indicates wanted precision - // 0123456789 - // 0.00 - // 000,0000 - if len(formatIndx) == 1 { - decimalStr = string(format[formatIndx[0]]) - precision = len(format) - formatIndx[0] - 1 - } - } - } - - // generate sign part - var signStr string - if n >= 0.000000001 { - signStr = positiveStr - } else if n <= -0.000000001 { - signStr = negativeStr - n = -n - } else { - signStr = "" - n = 0.0 - } - - // split number into integer and fractional parts - intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision]) - - // generate integer part string - intStr := strconv.FormatInt(int64(intf), 10) - - // add thousand separator if required - if len(thousandStr) > 0 { - for i := len(intStr); i > 3; { - i -= 3 - intStr = intStr[:i] + thousandStr + intStr[i:] - } - } - - // no fractional part, we can leave now - if precision == 0 { - return signStr + intStr - } - - // generate fractional part - fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision])) - // may need padding - if len(fracStr) < precision { - fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr - } - - return signStr + intStr + decimalStr + fracStr -} - -// FormatInteger produces a formatted number as string. -// See FormatFloat. -func FormatInteger(format string, n int) string { - return FormatFloat(format, float64(n)) -} diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go deleted file mode 100644 index 43d88a861..000000000 --- a/vendor/github.com/dustin/go-humanize/ordinals.go +++ /dev/null @@ -1,25 +0,0 @@ -package humanize - -import "strconv" - -// Ordinal gives you the input number in a rank/ordinal format. -// -// Ordinal(3) -> 3rd -func Ordinal(x int) string { - suffix := "th" - switch x % 10 { - case 1: - if x%100 != 11 { - suffix = "st" - } - case 2: - if x%100 != 12 { - suffix = "nd" - } - case 3: - if x%100 != 13 { - suffix = "rd" - } - } - return strconv.Itoa(x) + suffix -} diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go deleted file mode 100644 index b24e48169..000000000 --- a/vendor/github.com/dustin/go-humanize/si.go +++ /dev/null @@ -1,113 +0,0 @@ -package humanize - -import ( - "errors" - "math" - "regexp" - "strconv" -) - -var siPrefixTable = map[float64]string{ - -24: "y", // yocto - -21: "z", // zepto - -18: "a", // atto - -15: "f", // femto - -12: "p", // pico - -9: "n", // nano - -6: "µ", // micro - -3: "m", // milli - 0: "", - 3: "k", // kilo - 6: "M", // mega - 9: "G", // giga - 12: "T", // tera - 15: "P", // peta - 18: "E", // exa - 21: "Z", // zetta - 24: "Y", // yotta -} - -var revSIPrefixTable = revfmap(siPrefixTable) - -// revfmap reverses the map and precomputes the power multiplier -func revfmap(in map[float64]string) map[string]float64 { - rv := map[string]float64{} - for k, v := range in { - rv[v] = math.Pow(10, k) - } - return rv -} - -var riParseRegex *regexp.Regexp - -func init() { - ri := `^([\-0-9.]+)\s?([` - for _, v := range siPrefixTable { - ri += v - } - ri += `]?)(.*)` - - riParseRegex = regexp.MustCompile(ri) -} - -// ComputeSI finds the most appropriate SI prefix for the given number -// and returns the prefix along with the value adjusted to be within -// that prefix. -// -// See also: SI, ParseSI. -// -// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p") -func ComputeSI(input float64) (float64, string) { - if input == 0 { - return 0, "" - } - mag := math.Abs(input) - exponent := math.Floor(logn(mag, 10)) - exponent = math.Floor(exponent/3) * 3 - - value := mag / math.Pow(10, exponent) - - // Handle special case where value is exactly 1000.0 - // Should return 1 M instead of 1000 k - if value == 1000.0 { - exponent += 3 - value = mag / math.Pow(10, exponent) - } - - value = math.Copysign(value, input) - - prefix := siPrefixTable[exponent] - return value, prefix -} - -// SI returns a string with default formatting. -// -// SI uses Ftoa to format float value, removing trailing zeros. -// -// See also: ComputeSI, ParseSI. -// -// 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 -} - -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.2345 pF") -> (2.2345e-12, "F", nil) -func ParseSI(input string) (float64, string, error) { - found := riParseRegex.FindStringSubmatch(input) - if len(found) != 4 { - return 0, "", errInvalid - } - mag := revSIPrefixTable[found[2]] - unit := found[3] - - base, err := strconv.ParseFloat(found[1], 64) - return base * mag, unit, err -} diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go deleted file mode 100644 index dd3fbf5ef..000000000 --- a/vendor/github.com/dustin/go-humanize/times.go +++ /dev/null @@ -1,117 +0,0 @@ -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/github.com/gernest/wow/LICENSE b/vendor/github.com/gernest/wow/LICENSE deleted file mode 100644 index ec1701e53..000000000 --- a/vendor/github.com/gernest/wow/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Geofrey Ernest - -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/gernest/wow/example/all/main.go b/vendor/github.com/gernest/wow/example/all/main.go deleted file mode 100644 index 93955d930..000000000 --- a/vendor/github.com/gernest/wow/example/all/main.go +++ /dev/null @@ -1,21 +0,0 @@ -//DO NOT EDIT : this file was automatically generated. -package main - -import ( - "os" - "time" - - "github.com/gernest/wow" - "github.com/gernest/wow/spin" -) - -var all = []spin.Name{spin.Toggle6, spin.BouncingBall, spin.Balloon, spin.Toggle, spin.Toggle12, spin.Dots5, spin.Dots6, spin.Dots7, spin.GrowVertical, spin.Noise, spin.Toggle8, spin.SimpleDots, spin.BoxBounce2, spin.Arc, spin.BouncingBar, spin.Christmas, spin.Squish, spin.Triangle, spin.Arrow3, spin.Hearts, spin.Earth, spin.Dqpb, spin.Line2, spin.SquareCorners, spin.Toggle3, spin.Toggle5, spin.Monkey, spin.Clock, spin.Shark, spin.Weather, spin.Dots2, spin.Dots3, spin.Dots12, spin.CircleHalves, spin.Arrow, spin.Moon, spin.Flip, spin.Hamburger, spin.Bounce, spin.Circle, spin.Toggle9, spin.Toggle13, spin.Toggle10, spin.Runner, spin.Dots9, spin.Line, spin.Star, spin.CircleQuarters, spin.Arrow2, spin.Smiley, spin.Dots, spin.Dots4, spin.Pipe, spin.Balloon2, spin.Dots10, spin.Dots11, spin.SimpleDotsScrolling, spin.BoxBounce, spin.Toggle4, spin.Dots8, spin.Toggle2, spin.Toggle7, spin.Toggle11, spin.Pong, spin.Star2, spin.GrowHorizontal} - -func main() { - for _, v := range all { - w := wow.New(os.Stdout, spin.Get(v), " "+v.String(), wow.ForceOutput) - w.Start() - time.Sleep(2) - w.Persist() - } -} diff --git a/vendor/github.com/gernest/wow/example/doge/main.go b/vendor/github.com/gernest/wow/example/doge/main.go deleted file mode 100644 index 8451c86d3..000000000 --- a/vendor/github.com/gernest/wow/example/doge/main.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "os" - "time" - - "github.com/gernest/wow" - "github.com/gernest/wow/spin" -) - -func main() { - w := wow.New(os.Stdout, spin.Get(spin.Dots), "Such Spins") - w.Start() - time.Sleep(2 * time.Second) - w.Text("Very emojis").Spinner(spin.Get(spin.Hearts)) - time.Sleep(2 * time.Second) - w.PersistWith(spin.Spinner{Frames: []string{"👍"}}, " Wow!") -} diff --git a/vendor/github.com/gernest/wow/magefile.go b/vendor/github.com/gernest/wow/magefile.go deleted file mode 100644 index c9a1eb5dc..000000000 --- a/vendor/github.com/gernest/wow/magefile.go +++ /dev/null @@ -1,228 +0,0 @@ -// +build mage - -package main - -import ( - "bytes" - "encoding/json" - "fmt" - "go/format" - "io/ioutil" - "os" - "path/filepath" - "strings" - "text/template" - - "github.com/magefile/mage/sh" - - "github.com/magefile/mage/mg" -) - -// Spinners generates easy/accessible Go types for spinners from -// cli-spinners/spinners.json. -func Spinners() error { - pkg := "spin" - mg.Deps(func() error { - _, err := os.Stat(pkg) - if err != nil { - if os.IsNotExist(err) { - return os.Mkdir(pkg, 0777) - } - return err - } - return nil - }) - b, err := ioutil.ReadFile("cli-spinners/spinners.json") - if err != nil { - return err - } - o := make(map[string]interface{}) - err = json.Unmarshal(b, &o) - if err != nil { - return err - } - tpl, err := template.New("spinner").Funcs(helpers()).Parse(spinnersTpl) - if err != nil { - return err - } - var buf bytes.Buffer - err = tpl.Execute(&buf, o) - if err != nil { - return err - } - bo, err := format.Source(buf.Bytes()) - if err != nil { - return err - } - return ioutil.WriteFile(filepath.Join(pkg, "spinners.go"), bo, 0600) -} - -// ExampleAll generates example executable file to demo all spinners -func ExampleAll() error { - b, err := ioutil.ReadFile("cli-spinners/spinners.json") - if err != nil { - return err - } - o := make(map[string]interface{}) - err = json.Unmarshal(b, &o) - if err != nil { - return err - } - - // Generate example/all/main.go - tpl, err := template.New("example-all").Funcs(helpers()).Parse(exampleAllTpl) - if err != nil { - return err - } - var buf bytes.Buffer - err = tpl.Execute(&buf, o) - if err != nil { - return err - } - bo, err := format.Source(buf.Bytes()) - if err != nil { - return err - } - return ioutil.WriteFile("example/all/main.go", bo, 0600) -} - -func helpers() template.FuncMap { - return template.FuncMap{ - "title": strings.Title, - "stringify": func(a []interface{}) string { - o := "" - switch len(a) { - case 0: - return "" - case 1: - return fmt.Sprintf("\"%s\"", a[0]) - default: - for k, v := range a { - if k == 0 { - o += fmt.Sprintf("`%s`", v) - } else { - if v == "`" { - o += fmt.Sprintf(",\"%s\"", v) - - } else { - o += fmt.Sprintf(",`%s`", v) - } - - } - } - - return fmt.Sprintf("[]string{ %v }", o) - } - }, - "all": func(a map[string]interface{}) string { - o := "" - for k := range a { - if o == "" { - o += fmt.Sprintf("%s", strings.Title(k)) - } else { - o += fmt.Sprintf(",%s", strings.Title(k)) - } - } - return fmt.Sprintf("[]Name{%s}", o) - }, - "allwithpkg": func(a map[string]interface{}) string { - o := "" - for k := range a { - if o == "" { - o += fmt.Sprintf("spin.%s", strings.Title(k)) - } else { - o += fmt.Sprintf(",spin.%s", strings.Title(k)) - } - } - return fmt.Sprintf("[]spin.Name{%s}", o) - }, - } -} - -const spinnersTpl = `//DO NOT EDIT : this file was automatically generated. -package spin - -// Spinner defines a spinner widget -type Spinner struct{ - Name Name - Interval int - Frames []string -} - -// Name represents a name for a spinner item. -type Name uint - -// available spinners -const( - Unknown Name=iota - {{range $k,$v:= .}} - {{- $k|title}} - {{end}} -) - -func (s Name)String()string{ - switch s{ - {{- range $k,$v:=.}} - case {{$k|title}} : - return "{{$k}}" - {{- end}} - default: - return "" - } -} - -func Get( name Name)Spinner{ - switch name{ - {{- range $k,$v:=.}} - case {{$k|title}} : - return Spinner{ - Name: {{$k|title}}, - Interval: {{$v.interval}}, - Frames: {{$v.frames|stringify }}, - } - {{- end}} - default: - return Spinner{} - } -} -` - -const exampleAllTpl = `//DO NOT EDIT : this file was automatically generated. -package main - -import ( - "os" - "time" - - "github.com/gernest/wow" - "github.com/gernest/wow/spin" -) - -var all = {{allwithpkg .}} - -func main() { - for _, v := range all { - w := wow.New(os.Stdout, spin.Get(v), " "+v.String()) - w.Start() - time.Sleep(2) - w.Persist() - } -} - -` - -// Update updates cli-spinners to get latest changes to the spinners.json file. -func Update() error { - return sh.Run("git", "submodule", "update", "--remote", "cli-spinners") -} - -//Setup prepares the project for local development. -// -// This runs git submodule init && git submodule update -func Setup() error { - err := sh.Run("git", "submodule", "init") - if err != nil { - return err - } - return sh.Run("git", "submodule", "update") -} diff --git a/vendor/github.com/gernest/wow/spin/spinners.go b/vendor/github.com/gernest/wow/spin/spinners.go deleted file mode 100644 index 7534c0b8d..000000000 --- a/vendor/github.com/gernest/wow/spin/spinners.go +++ /dev/null @@ -1,625 +0,0 @@ -//DO NOT EDIT : this file was automatically generated. -package spin - -// Spinner defines a spinner widget -type Spinner struct { - Name Name - Interval int - Frames []string -} - -// Name represents a name for a spinner item. -type Name uint - -// available spinners -const ( - Unknown Name = iota - Arc - Arrow - Arrow2 - Arrow3 - Balloon - Balloon2 - Bounce - BouncingBall - BouncingBar - BoxBounce - BoxBounce2 - Christmas - Circle - CircleHalves - CircleQuarters - Clock - Dots - Dots10 - Dots11 - Dots12 - Dots2 - Dots3 - Dots4 - Dots5 - Dots6 - Dots7 - Dots8 - Dots9 - Dqpb - Earth - Flip - GrowHorizontal - GrowVertical - Hamburger - Hearts - Line - Line2 - Monkey - Moon - Noise - Pipe - Pong - Runner - Shark - SimpleDots - SimpleDotsScrolling - Smiley - SquareCorners - Squish - Star - Star2 - Toggle - Toggle10 - Toggle11 - Toggle12 - Toggle13 - Toggle2 - Toggle3 - Toggle4 - Toggle5 - Toggle6 - Toggle7 - Toggle8 - Toggle9 - Triangle - Weather -) - -func (s Name) String() string { - switch s { - case Arc: - return "arc" - case Arrow: - return "arrow" - case Arrow2: - return "arrow2" - case Arrow3: - return "arrow3" - case Balloon: - return "balloon" - case Balloon2: - return "balloon2" - case Bounce: - return "bounce" - case BouncingBall: - return "bouncingBall" - case BouncingBar: - return "bouncingBar" - case BoxBounce: - return "boxBounce" - case BoxBounce2: - return "boxBounce2" - case Christmas: - return "christmas" - case Circle: - return "circle" - case CircleHalves: - return "circleHalves" - case CircleQuarters: - return "circleQuarters" - case Clock: - return "clock" - case Dots: - return "dots" - case Dots10: - return "dots10" - case Dots11: - return "dots11" - case Dots12: - return "dots12" - case Dots2: - return "dots2" - case Dots3: - return "dots3" - case Dots4: - return "dots4" - case Dots5: - return "dots5" - case Dots6: - return "dots6" - case Dots7: - return "dots7" - case Dots8: - return "dots8" - case Dots9: - return "dots9" - case Dqpb: - return "dqpb" - case Earth: - return "earth" - case Flip: - return "flip" - case GrowHorizontal: - return "growHorizontal" - case GrowVertical: - return "growVertical" - case Hamburger: - return "hamburger" - case Hearts: - return "hearts" - case Line: - return "line" - case Line2: - return "line2" - case Monkey: - return "monkey" - case Moon: - return "moon" - case Noise: - return "noise" - case Pipe: - return "pipe" - case Pong: - return "pong" - case Runner: - return "runner" - case Shark: - return "shark" - case SimpleDots: - return "simpleDots" - case SimpleDotsScrolling: - return "simpleDotsScrolling" - case Smiley: - return "smiley" - case SquareCorners: - return "squareCorners" - case Squish: - return "squish" - case Star: - return "star" - case Star2: - return "star2" - case Toggle: - return "toggle" - case Toggle10: - return "toggle10" - case Toggle11: - return "toggle11" - case Toggle12: - return "toggle12" - case Toggle13: - return "toggle13" - case Toggle2: - return "toggle2" - case Toggle3: - return "toggle3" - case Toggle4: - return "toggle4" - case Toggle5: - return "toggle5" - case Toggle6: - return "toggle6" - case Toggle7: - return "toggle7" - case Toggle8: - return "toggle8" - case Toggle9: - return "toggle9" - case Triangle: - return "triangle" - case Weather: - return "weather" - default: - return "" - } -} - -func Get(name Name) Spinner { - switch name { - case Arc: - return Spinner{ - Name: Arc, - Interval: 100, - Frames: []string{`◜`, `◠`, `◝`, `◞`, `◡`, `◟`}, - } - case Arrow: - return Spinner{ - Name: Arrow, - Interval: 100, - Frames: []string{`←`, `↖`, `↑`, `↗`, `→`, `↘`, `↓`, `↙`}, - } - case Arrow2: - return Spinner{ - Name: Arrow2, - Interval: 80, - Frames: []string{`⬆️ `, `↗️ `, `➡️ `, `↘️ `, `⬇️ `, `↙️ `, `⬅️ `, `↖️ `}, - } - case Arrow3: - return Spinner{ - Name: Arrow3, - Interval: 120, - Frames: []string{`▹▹▹▹▹`, `▸▹▹▹▹`, `▹▸▹▹▹`, `▹▹▸▹▹`, `▹▹▹▸▹`, `▹▹▹▹▸`}, - } - case Balloon: - return Spinner{ - Name: Balloon, - Interval: 140, - Frames: []string{` `, `.`, `o`, `O`, `@`, `*`, ` `}, - } - case Balloon2: - return Spinner{ - Name: Balloon2, - Interval: 120, - Frames: []string{`.`, `o`, `O`, `°`, `O`, `o`, `.`}, - } - case Bounce: - return Spinner{ - Name: Bounce, - Interval: 120, - Frames: []string{`⠁`, `⠂`, `⠄`, `⠂`}, - } - case BouncingBall: - return Spinner{ - Name: BouncingBall, - Interval: 80, - Frames: []string{`( ● )`, `( ● )`, `( ● )`, `( ● )`, `( ●)`, `( ● )`, `( ● )`, `( ● )`, `( ● )`, `(● )`}, - } - case BouncingBar: - return Spinner{ - Name: BouncingBar, - Interval: 80, - Frames: []string{`[ ]`, `[= ]`, `[== ]`, `[=== ]`, `[ ===]`, `[ ==]`, `[ =]`, `[ ]`, `[ =]`, `[ ==]`, `[ ===]`, `[====]`, `[=== ]`, `[== ]`, `[= ]`}, - } - case BoxBounce: - return Spinner{ - Name: BoxBounce, - Interval: 120, - Frames: []string{`▖`, `▘`, `▝`, `▗`}, - } - case BoxBounce2: - return Spinner{ - Name: BoxBounce2, - Interval: 100, - Frames: []string{`▌`, `▀`, `▐`, `▄`}, - } - case Christmas: - return Spinner{ - Name: Christmas, - Interval: 400, - Frames: []string{`🌲`, `🎄`}, - } - case Circle: - return Spinner{ - Name: Circle, - Interval: 120, - Frames: []string{`◡`, `⊙`, `◠`}, - } - case CircleHalves: - return Spinner{ - Name: CircleHalves, - Interval: 50, - Frames: []string{`◐`, `◓`, `◑`, `◒`}, - } - case CircleQuarters: - return Spinner{ - Name: CircleQuarters, - Interval: 120, - Frames: []string{`◴`, `◷`, `◶`, `◵`}, - } - case Clock: - return Spinner{ - Name: Clock, - Interval: 100, - Frames: []string{`🕐 `, `🕑 `, `🕒 `, `🕓 `, `🕔 `, `🕕 `, `🕖 `, `🕗 `, `🕘 `, `🕙 `, `🕚 `}, - } - case Dots: - return Spinner{ - Name: Dots, - Interval: 80, - Frames: []string{`⠋`, `⠙`, `⠹`, `⠸`, `⠼`, `⠴`, `⠦`, `⠧`, `⠇`, `⠏`}, - } - case Dots10: - return Spinner{ - Name: Dots10, - Interval: 80, - Frames: []string{`⢄`, `⢂`, `⢁`, `⡁`, `⡈`, `⡐`, `⡠`}, - } - case Dots11: - return Spinner{ - Name: Dots11, - Interval: 100, - Frames: []string{`⠁`, `⠂`, `⠄`, `⡀`, `⢀`, `⠠`, `⠐`, `⠈`}, - } - case Dots12: - return Spinner{ - Name: Dots12, - Interval: 80, - Frames: []string{`⢀⠀`, `⡀⠀`, `⠄⠀`, `⢂⠀`, `⡂⠀`, `⠅⠀`, `⢃⠀`, `⡃⠀`, `⠍⠀`, `⢋⠀`, `⡋⠀`, `⠍⠁`, `⢋⠁`, `⡋⠁`, `⠍⠉`, `⠋⠉`, `⠋⠉`, `⠉⠙`, `⠉⠙`, `⠉⠩`, `⠈⢙`, `⠈⡙`, `⢈⠩`, `⡀⢙`, `⠄⡙`, `⢂⠩`, `⡂⢘`, `⠅⡘`, `⢃⠨`, `⡃⢐`, `⠍⡐`, `⢋⠠`, `⡋⢀`, `⠍⡁`, `⢋⠁`, `⡋⠁`, `⠍⠉`, `⠋⠉`, `⠋⠉`, `⠉⠙`, `⠉⠙`, `⠉⠩`, `⠈⢙`, `⠈⡙`, `⠈⠩`, `⠀⢙`, `⠀⡙`, `⠀⠩`, `⠀⢘`, `⠀⡘`, `⠀⠨`, `⠀⢐`, `⠀⡐`, `⠀⠠`, `⠀⢀`, `⠀⡀`}, - } - case Dots2: - return Spinner{ - Name: Dots2, - Interval: 80, - Frames: []string{`⣾`, `⣽`, `⣻`, `⢿`, `⡿`, `⣟`, `⣯`, `⣷`}, - } - case Dots3: - return Spinner{ - Name: Dots3, - Interval: 80, - Frames: []string{`⠋`, `⠙`, `⠚`, `⠞`, `⠖`, `⠦`, `⠴`, `⠲`, `⠳`, `⠓`}, - } - case Dots4: - return Spinner{ - Name: Dots4, - Interval: 80, - Frames: []string{`⠄`, `⠆`, `⠇`, `⠋`, `⠙`, `⠸`, `⠰`, `⠠`, `⠰`, `⠸`, `⠙`, `⠋`, `⠇`, `⠆`}, - } - case Dots5: - return Spinner{ - Name: Dots5, - Interval: 80, - Frames: []string{`⠋`, `⠙`, `⠚`, `⠒`, `⠂`, `⠂`, `⠒`, `⠲`, `⠴`, `⠦`, `⠖`, `⠒`, `⠐`, `⠐`, `⠒`, `⠓`, `⠋`}, - } - case Dots6: - return Spinner{ - Name: Dots6, - Interval: 80, - Frames: []string{`⠁`, `⠉`, `⠙`, `⠚`, `⠒`, `⠂`, `⠂`, `⠒`, `⠲`, `⠴`, `⠤`, `⠄`, `⠄`, `⠤`, `⠴`, `⠲`, `⠒`, `⠂`, `⠂`, `⠒`, `⠚`, `⠙`, `⠉`, `⠁`}, - } - case Dots7: - return Spinner{ - Name: Dots7, - Interval: 80, - Frames: []string{`⠈`, `⠉`, `⠋`, `⠓`, `⠒`, `⠐`, `⠐`, `⠒`, `⠖`, `⠦`, `⠤`, `⠠`, `⠠`, `⠤`, `⠦`, `⠖`, `⠒`, `⠐`, `⠐`, `⠒`, `⠓`, `⠋`, `⠉`, `⠈`}, - } - case Dots8: - return Spinner{ - Name: Dots8, - Interval: 80, - Frames: []string{`⠁`, `⠁`, `⠉`, `⠙`, `⠚`, `⠒`, `⠂`, `⠂`, `⠒`, `⠲`, `⠴`, `⠤`, `⠄`, `⠄`, `⠤`, `⠠`, `⠠`, `⠤`, `⠦`, `⠖`, `⠒`, `⠐`, `⠐`, `⠒`, `⠓`, `⠋`, `⠉`, `⠈`, `⠈`}, - } - case Dots9: - return Spinner{ - Name: Dots9, - Interval: 80, - Frames: []string{`⢹`, `⢺`, `⢼`, `⣸`, `⣇`, `⡧`, `⡗`, `⡏`}, - } - case Dqpb: - return Spinner{ - Name: Dqpb, - Interval: 100, - Frames: []string{`d`, `q`, `p`, `b`}, - } - case Earth: - return Spinner{ - Name: Earth, - Interval: 180, - Frames: []string{`🌍 `, `🌎 `, `🌏 `}, - } - case Flip: - return Spinner{ - Name: Flip, - Interval: 70, - Frames: []string{`_`, `_`, `_`, `-`, "`", "`", `'`, `´`, `-`, `_`, `_`, `_`}, - } - case GrowHorizontal: - return Spinner{ - Name: GrowHorizontal, - Interval: 120, - Frames: []string{`▏`, `▎`, `▍`, `▌`, `▋`, `▊`, `▉`, `▊`, `▋`, `▌`, `▍`, `▎`}, - } - case GrowVertical: - return Spinner{ - Name: GrowVertical, - Interval: 120, - Frames: []string{`▁`, `▃`, `▄`, `▅`, `▆`, `▇`, `▆`, `▅`, `▄`, `▃`}, - } - case Hamburger: - return Spinner{ - Name: Hamburger, - Interval: 100, - Frames: []string{`☱`, `☲`, `☴`}, - } - case Hearts: - return Spinner{ - Name: Hearts, - Interval: 100, - Frames: []string{`💛 `, `💙 `, `💜 `, `💚 `, `❤️ `}, - } - case Line: - return Spinner{ - Name: Line, - Interval: 130, - Frames: []string{`-`, `\`, `|`, `/`}, - } - case Line2: - return Spinner{ - Name: Line2, - Interval: 100, - Frames: []string{`⠂`, `-`, `–`, `—`, `–`, `-`}, - } - case Monkey: - return Spinner{ - Name: Monkey, - Interval: 300, - Frames: []string{`🙈 `, `🙈 `, `🙉 `, `🙊 `}, - } - case Moon: - return Spinner{ - Name: Moon, - Interval: 80, - Frames: []string{`🌑 `, `🌒 `, `🌓 `, `🌔 `, `🌕 `, `🌖 `, `🌗 `, `🌘 `}, - } - case Noise: - return Spinner{ - Name: Noise, - Interval: 100, - Frames: []string{`▓`, `▒`, `░`}, - } - case Pipe: - return Spinner{ - Name: Pipe, - Interval: 100, - Frames: []string{`┤`, `┘`, `┴`, `└`, `├`, `┌`, `┬`, `┐`}, - } - case Pong: - return Spinner{ - Name: Pong, - Interval: 80, - Frames: []string{`▐⠂ ▌`, `▐⠈ ▌`, `▐ ⠂ ▌`, `▐ ⠠ ▌`, `▐ ⡀ ▌`, `▐ ⠠ ▌`, `▐ ⠂ ▌`, `▐ ⠈ ▌`, `▐ ⠂ ▌`, `▐ ⠠ ▌`, `▐ ⡀ ▌`, `▐ ⠠ ▌`, `▐ ⠂ ▌`, `▐ ⠈ ▌`, `▐ ⠂▌`, `▐ ⠠▌`, `▐ ⡀▌`, `▐ ⠠ ▌`, `▐ ⠂ ▌`, `▐ ⠈ ▌`, `▐ ⠂ ▌`, `▐ ⠠ ▌`, `▐ ⡀ ▌`, `▐ ⠠ ▌`, `▐ ⠂ ▌`, `▐ ⠈ ▌`, `▐ ⠂ ▌`, `▐ ⠠ ▌`, `▐ ⡀ ▌`, `▐⠠ ▌`}, - } - case Runner: - return Spinner{ - Name: Runner, - Interval: 140, - Frames: []string{`🚶 `, `🏃 `}, - } - case Shark: - return Spinner{ - Name: Shark, - Interval: 120, - Frames: []string{`▐|\____________▌`, `▐_|\___________▌`, `▐__|\__________▌`, `▐___|\_________▌`, `▐____|\________▌`, `▐_____|\_______▌`, `▐______|\______▌`, `▐_______|\_____▌`, `▐________|\____▌`, `▐_________|\___▌`, `▐__________|\__▌`, `▐___________|\_▌`, `▐____________|\▌`, `▐____________/|▌`, `▐___________/|_▌`, `▐__________/|__▌`, `▐_________/|___▌`, `▐________/|____▌`, `▐_______/|_____▌`, `▐______/|______▌`, `▐_____/|_______▌`, `▐____/|________▌`, `▐___/|_________▌`, `▐__/|__________▌`, `▐_/|___________▌`, `▐/|____________▌`}, - } - case SimpleDots: - return Spinner{ - Name: SimpleDots, - Interval: 400, - Frames: []string{`. `, `.. `, `...`, ` `}, - } - case SimpleDotsScrolling: - return Spinner{ - Name: SimpleDotsScrolling, - Interval: 200, - Frames: []string{`. `, `.. `, `...`, ` ..`, ` .`, ` `}, - } - case Smiley: - return Spinner{ - Name: Smiley, - Interval: 200, - Frames: []string{`😄 `, `😝 `}, - } - case SquareCorners: - return Spinner{ - Name: SquareCorners, - Interval: 180, - Frames: []string{`◰`, `◳`, `◲`, `◱`}, - } - case Squish: - return Spinner{ - Name: Squish, - Interval: 100, - Frames: []string{`╫`, `╪`}, - } - case Star: - return Spinner{ - Name: Star, - Interval: 70, - Frames: []string{`✶`, `✸`, `✹`, `✺`, `✹`, `✷`}, - } - case Star2: - return Spinner{ - Name: Star2, - Interval: 80, - Frames: []string{`+`, `x`, `*`}, - } - case Toggle: - return Spinner{ - Name: Toggle, - Interval: 250, - Frames: []string{`⊶`, `⊷`}, - } - case Toggle10: - return Spinner{ - Name: Toggle10, - Interval: 100, - Frames: []string{`㊂`, `㊀`, `㊁`}, - } - case Toggle11: - return Spinner{ - Name: Toggle11, - Interval: 50, - Frames: []string{`⧇`, `⧆`}, - } - case Toggle12: - return Spinner{ - Name: Toggle12, - Interval: 120, - Frames: []string{`☗`, `☖`}, - } - case Toggle13: - return Spinner{ - Name: Toggle13, - Interval: 80, - Frames: []string{`=`, `*`, `-`}, - } - case Toggle2: - return Spinner{ - Name: Toggle2, - Interval: 80, - Frames: []string{`▫`, `▪`}, - } - case Toggle3: - return Spinner{ - Name: Toggle3, - Interval: 120, - Frames: []string{`□`, `■`}, - } - case Toggle4: - return Spinner{ - Name: Toggle4, - Interval: 100, - Frames: []string{`■`, `□`, `▪`, `▫`}, - } - case Toggle5: - return Spinner{ - Name: Toggle5, - Interval: 100, - Frames: []string{`▮`, `▯`}, - } - case Toggle6: - return Spinner{ - Name: Toggle6, - Interval: 300, - Frames: []string{`ဝ`, `၀`}, - } - case Toggle7: - return Spinner{ - Name: Toggle7, - Interval: 80, - Frames: []string{`⦾`, `⦿`}, - } - case Toggle8: - return Spinner{ - Name: Toggle8, - Interval: 100, - Frames: []string{`◍`, `◌`}, - } - case Toggle9: - return Spinner{ - Name: Toggle9, - Interval: 100, - Frames: []string{`◉`, `◎`}, - } - case Triangle: - return Spinner{ - Name: Triangle, - Interval: 50, - Frames: []string{`◢`, `◣`, `◤`, `◥`}, - } - case Weather: - return Spinner{ - Name: Weather, - Interval: 100, - Frames: []string{`☀️ `, `☀️ `, `☀️ `, `🌤 `, `⛅️ `, `🌥 `, `☁️ `, `🌧 `, `🌨 `, `🌧 `, `🌨 `, `🌧 `, `🌨 `, `⛈ `, `🌨 `, `🌧 `, `🌨 `, `☁️ `, `🌥 `, `⛅️ `, `🌤 `, `☀️ `, `☀️ `}, - } - default: - return Spinner{} - } -} diff --git a/vendor/github.com/gernest/wow/symbols.go b/vendor/github.com/gernest/wow/symbols.go deleted file mode 100644 index cf98acea5..000000000 --- a/vendor/github.com/gernest/wow/symbols.go +++ /dev/null @@ -1,41 +0,0 @@ -package wow - -import "runtime" - -// LogSymbol is a log severity level -type LogSymbol uint - -// common log symbos -const ( - INFO LogSymbol = iota - SUCCESS - WARNING - ERROR -) - -func (s LogSymbol) String() string { - if runtime.GOOS != "windows" { - switch s { - case INFO: - return "ℹ" - case SUCCESS: - return "✔" - case WARNING: - return "⚠" - case ERROR: - return "✖" - } - } else { - switch s { - case INFO: - return "i" - case SUCCESS: - return "v" - case WARNING: - return "!!" - case ERROR: - return "x" - } - } - return "" -} diff --git a/vendor/github.com/gernest/wow/wow.go b/vendor/github.com/gernest/wow/wow.go deleted file mode 100644 index e10f3d69b..000000000 --- a/vendor/github.com/gernest/wow/wow.go +++ /dev/null @@ -1,122 +0,0 @@ -package wow - -import ( - "context" - "fmt" - "io" - "os" - "sync" - "time" - - "github.com/gernest/wow/spin" - "golang.org/x/crypto/ssh/terminal" -) - -const erase = "\033[2K\r" - -// Wow writes beautiful spinners on the terminal. -type Wow struct { - txt string - s spin.Spinner - out io.Writer - running bool - done func() - mu sync.RWMutex - IsTerminal bool -} - -// New creates a new wow instance ready to start spinning. -func New(o io.Writer, s spin.Spinner, text string, options ...func(*Wow)) *Wow { - isTerminal := terminal.IsTerminal(int(os.Stdout.Fd())) - - wow := Wow{out: o, s: s, txt: text, IsTerminal: isTerminal} - - for _, option := range options { - option(&wow) - } - - return &wow -} - -// Start starts the spinner. The frames are written based on the spinner -// interval. -func (w *Wow) Start() { - if !w.running { - ctx, done := context.WithCancel(context.Background()) - t := time.NewTicker(time.Duration(w.s.Interval) * time.Millisecond) - w.done = done - w.running = true - go func() { - at := 0 - for { - select { - case <-ctx.Done(): - t.Stop() - break - case <-t.C: - txt := erase + w.s.Frames[at%len(w.s.Frames)] + w.txt - if w.IsTerminal { - fmt.Fprint(w.out, txt) - } - at++ - } - } - }() - } -} - -// Stop stops the spinner -func (w *Wow) Stop() { - if w.done != nil { - w.done() - } - w.running = false -} - -// Spinner sets s to the current spinner -func (w *Wow) Spinner(s spin.Spinner) *Wow { - w.Stop() - w.s = s - w.Start() - return w -} - -// Text adds text to the current spinner -func (w *Wow) Text(txt string) *Wow { - w.mu.Lock() - w.txt = txt - w.mu.Unlock() - return w -} - -// Persist writes the last character of the currect spinner frames together with -// the text on stdout. -// -// A new line is added at the end to ensure the text stay that way. -func (w *Wow) Persist() { - w.Stop() - at := len(w.s.Frames) - 1 - txt := erase + w.s.Frames[at] + w.txt + "\n" - if w.IsTerminal { - fmt.Fprint(w.out, txt) - } -} - -// PersistWith writes the last frame of s together with text with a new line -// added to make it stick. -func (w *Wow) PersistWith(s spin.Spinner, text string) { - w.Stop() - var a string - if len(s.Frames) > 0 { - a = s.Frames[len(s.Frames)-1] - } - txt := erase + a + text + "\n" - if w.IsTerminal { - fmt.Fprint(w.out, txt) - } -} - -// ForceOutput forces all output even if not not outputting directly to a terminal -func ForceOutput(w *Wow) { - w.IsTerminal = true -} diff --git a/vendor/github.com/go-ini/ini/LICENSE b/vendor/github.com/go-ini/ini/LICENSE deleted file mode 100644 index d361bbcdf..000000000 --- a/vendor/github.com/go-ini/ini/LICENSE +++ /dev/null @@ -1,191 +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: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -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 -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 2014 Unknwon - - 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. diff --git a/vendor/github.com/go-ini/ini/error.go b/vendor/github.com/go-ini/ini/error.go deleted file mode 100644 index 80afe7431..000000000 --- a/vendor/github.com/go-ini/ini/error.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2016 Unknwon -// -// 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 ini - -import ( - "fmt" -) - -type ErrDelimiterNotFound struct { - Line string -} - -func IsErrDelimiterNotFound(err error) bool { - _, ok := err.(ErrDelimiterNotFound) - return ok -} - -func (err ErrDelimiterNotFound) Error() string { - return fmt.Sprintf("key-value delimiter not found: %s", err.Line) -} diff --git a/vendor/github.com/go-ini/ini/file.go b/vendor/github.com/go-ini/ini/file.go deleted file mode 100644 index ce26c3b31..000000000 --- a/vendor/github.com/go-ini/ini/file.go +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright 2017 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "strings" - "sync" -) - -// File represents a combination of a or more INI file(s) in memory. -type File struct { - options LoadOptions - dataSources []dataSource - - // Should make things safe, but sometimes doesn't matter. - BlockMode bool - lock sync.RWMutex - - // To keep data in order. - sectionList []string - // Actual data is stored here. - sections map[string]*Section - - NameMapper - ValueMapper -} - -// newFile initializes File object with given data sources. -func newFile(dataSources []dataSource, opts LoadOptions) *File { - return &File{ - BlockMode: true, - dataSources: dataSources, - sections: make(map[string]*Section), - sectionList: make([]string, 0, 10), - options: opts, - } -} - -// Empty returns an empty file object. -func Empty() *File { - // Ignore error here, we sure our data is good. - f, _ := Load([]byte("")) - return f -} - -// NewSection creates a new section. -func (f *File) NewSection(name string) (*Section, error) { - if len(name) == 0 { - return nil, errors.New("error creating new section: empty section name") - } else if f.options.Insensitive && name != DEFAULT_SECTION { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if inSlice(name, f.sectionList) { - return f.sections[name], nil - } - - f.sectionList = append(f.sectionList, name) - f.sections[name] = newSection(f, name) - return f.sections[name], nil -} - -// NewRawSection creates a new section with an unparseable body. -func (f *File) NewRawSection(name, body string) (*Section, error) { - section, err := f.NewSection(name) - if err != nil { - return nil, err - } - - section.isRawSection = true - section.rawBody = body - return section, nil -} - -// NewSections creates a list of sections. -func (f *File) NewSections(names ...string) (err error) { - for _, name := range names { - if _, err = f.NewSection(name); err != nil { - return err - } - } - return nil -} - -// GetSection returns section by given name. -func (f *File) GetSection(name string) (*Section, error) { - if len(name) == 0 { - name = DEFAULT_SECTION - } - if f.options.Insensitive { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.RLock() - defer f.lock.RUnlock() - } - - sec := f.sections[name] - if sec == nil { - return nil, fmt.Errorf("section '%s' does not exist", name) - } - return sec, nil -} - -// Section assumes named section exists and returns a zero-value when not. -func (f *File) Section(name string) *Section { - sec, err := f.GetSection(name) - if err != nil { - // Note: It's OK here because the only possible error is empty section name, - // but if it's empty, this piece of code won't be executed. - sec, _ = f.NewSection(name) - return sec - } - return sec -} - -// Section returns list of Section. -func (f *File) Sections() []*Section { - sections := make([]*Section, len(f.sectionList)) - for i := range f.sectionList { - sections[i] = f.Section(f.sectionList[i]) - } - return sections -} - -// ChildSections returns a list of child sections of given section name. -func (f *File) ChildSections(name string) []*Section { - return f.Section(name).ChildSections() -} - -// SectionStrings returns list of section names. -func (f *File) SectionStrings() []string { - list := make([]string, len(f.sectionList)) - copy(list, f.sectionList) - return list -} - -// DeleteSection deletes a section. -func (f *File) DeleteSection(name string) { - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if len(name) == 0 { - name = DEFAULT_SECTION - } - - for i, s := range f.sectionList { - if s == name { - f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...) - delete(f.sections, name) - return - } - } -} - -func (f *File) reload(s dataSource) error { - r, err := s.ReadCloser() - if err != nil { - return err - } - defer r.Close() - - return f.parse(r) -} - -// Reload reloads and parses all data sources. -func (f *File) Reload() (err error) { - for _, s := range f.dataSources { - if err = f.reload(s); err != nil { - // In loose mode, we create an empty default section for nonexistent files. - if os.IsNotExist(err) && f.options.Loose { - f.parse(bytes.NewBuffer(nil)) - continue - } - return err - } - } - return nil -} - -// Append appends one or more data sources and reloads automatically. -func (f *File) Append(source interface{}, others ...interface{}) error { - ds, err := parseDataSource(source) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - for _, s := range others { - ds, err = parseDataSource(s) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - } - return f.Reload() -} - -func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { - equalSign := "=" - if PrettyFormat { - equalSign = " = " - } - - // Use buffer to make sure target is safe until finish encoding. - buf := bytes.NewBuffer(nil) - for i, sname := range f.sectionList { - sec := f.Section(sname) - if len(sec.Comment) > 0 { - if sec.Comment[0] != '#' && sec.Comment[0] != ';' { - sec.Comment = "; " + sec.Comment - } else { - sec.Comment = sec.Comment[:1] + " " + strings.TrimSpace(sec.Comment[1:]) - } - if _, err := buf.WriteString(sec.Comment + LineBreak); err != nil { - return nil, err - } - } - - if i > 0 || DefaultHeader { - if _, err := buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return nil, err - } - } else { - // Write nothing if default section is empty - if len(sec.keyList) == 0 { - continue - } - } - - if sec.isRawSection { - if _, err := buf.WriteString(sec.rawBody); err != nil { - return nil, err - } - - if PrettySection { - // Put a line between sections - if _, err := buf.WriteString(LineBreak); err != nil { - return nil, err - } - } - continue - } - - // Count and generate alignment length and buffer spaces using the - // longest key. Keys may be modifed if they contain certain characters so - // we need to take that into account in our calculation. - alignLength := 0 - if PrettyFormat { - for _, kname := range sec.keyList { - keyLength := len(kname) - // First case will surround key by ` and second by """ - if strings.ContainsAny(kname, "\"=:") { - keyLength += 2 - } else if strings.Contains(kname, "`") { - keyLength += 6 - } - - if keyLength > alignLength { - alignLength = keyLength - } - } - } - alignSpaces := bytes.Repeat([]byte(" "), alignLength) - - KEY_LIST: - for _, kname := range sec.keyList { - key := sec.Key(kname) - if len(key.Comment) > 0 { - if len(indent) > 0 && sname != DEFAULT_SECTION { - buf.WriteString(indent) - } - if key.Comment[0] != '#' && key.Comment[0] != ';' { - key.Comment = "; " + key.Comment - } else { - key.Comment = key.Comment[:1] + " " + strings.TrimSpace(key.Comment[1:]) - } - if _, err := buf.WriteString(key.Comment + LineBreak); err != nil { - return nil, err - } - } - - if len(indent) > 0 && sname != DEFAULT_SECTION { - buf.WriteString(indent) - } - - switch { - case key.isAutoIncrement: - kname = "-" - case strings.ContainsAny(kname, "\"=:"): - kname = "`" + kname + "`" - case strings.Contains(kname, "`"): - kname = `"""` + kname + `"""` - } - - for _, val := range key.ValueWithShadows() { - if _, err := buf.WriteString(kname); err != nil { - return nil, err - } - - if key.isBooleanType { - if kname != sec.keyList[len(sec.keyList)-1] { - buf.WriteString(LineBreak) - } - continue KEY_LIST - } - - // Write out alignment spaces before "=" sign - if PrettyFormat { - buf.Write(alignSpaces[:alignLength-len(kname)]) - } - - // In case key value contains "\n", "`", "\"", "#" or ";" - if strings.ContainsAny(val, "\n`") { - val = `"""` + val + `"""` - } else if !f.options.IgnoreInlineComment && strings.ContainsAny(val, "#;") { - val = "`" + val + "`" - } - if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil { - return nil, err - } - } - - for _, val := range key.nestedValues { - if _, err := buf.WriteString(indent + " " + val + LineBreak); err != nil { - return nil, err - } - } - } - - if PrettySection { - // Put a line between sections - if _, err := buf.WriteString(LineBreak); err != nil { - return nil, err - } - } - } - - return buf, nil -} - -// WriteToIndent writes content into io.Writer with given indention. -// If PrettyFormat has been set to be true, -// it will align "=" sign with spaces under each section. -func (f *File) WriteToIndent(w io.Writer, indent string) (int64, error) { - buf, err := f.writeToBuffer(indent) - if err != nil { - return 0, err - } - return buf.WriteTo(w) -} - -// WriteTo writes file content into io.Writer. -func (f *File) WriteTo(w io.Writer) (int64, error) { - return f.WriteToIndent(w, "") -} - -// SaveToIndent writes content to file system with given value indention. -func (f *File) SaveToIndent(filename, indent string) error { - // Note: Because we are truncating with os.Create, - // so it's safer to save to a temporary file location and rename afte done. - buf, err := f.writeToBuffer(indent) - if err != nil { - return err - } - - return ioutil.WriteFile(filename, buf.Bytes(), 0666) -} - -// SaveTo writes content to file system. -func (f *File) SaveTo(filename string) error { - return f.SaveToIndent(filename, "") -} diff --git a/vendor/github.com/go-ini/ini/ini.go b/vendor/github.com/go-ini/ini/ini.go deleted file mode 100644 index 535d3588a..000000000 --- a/vendor/github.com/go-ini/ini/ini.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini provides INI file read and write functionality in Go. -package ini - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "os" - "regexp" - "runtime" -) - -const ( - // Name for default section. You can use this constant or the string literal. - // In most of cases, an empty string is all you need to access the section. - DEFAULT_SECTION = "DEFAULT" - - // Maximum allowed depth when recursively substituing variable names. - _DEPTH_VALUES = 99 - _VERSION = "1.32.0" -) - -// Version returns current package version literal. -func Version() string { - return _VERSION -} - -var ( - // Delimiter to determine or compose a new line. - // This variable will be changed to "\r\n" automatically on Windows - // at package init time. - LineBreak = "\n" - - // Variable regexp pattern: %(variable)s - varPattern = regexp.MustCompile(`%\(([^\)]+)\)s`) - - // Indicate whether to align "=" sign with spaces to produce pretty output - // or reduce all possible spaces for compact format. - PrettyFormat = true - - // Explicitly write DEFAULT section header - DefaultHeader = false - - // Indicate whether to put a line between sections - PrettySection = true -) - -func init() { - if runtime.GOOS == "windows" { - LineBreak = "\r\n" - } -} - -func inSlice(str string, s []string) bool { - for _, v := range s { - if str == v { - return true - } - } - return false -} - -// dataSource is an interface that returns object which can be read and closed. -type dataSource interface { - ReadCloser() (io.ReadCloser, error) -} - -// sourceFile represents an object that contains content on the local file system. -type sourceFile struct { - name string -} - -func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) { - return os.Open(s.name) -} - -// sourceData represents an object that contains content in memory. -type sourceData struct { - data []byte -} - -func (s *sourceData) ReadCloser() (io.ReadCloser, error) { - return ioutil.NopCloser(bytes.NewReader(s.data)), nil -} - -// sourceReadCloser represents an input stream with Close method. -type sourceReadCloser struct { - reader io.ReadCloser -} - -func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) { - return s.reader, nil -} - -func parseDataSource(source interface{}) (dataSource, error) { - switch s := source.(type) { - case string: - return sourceFile{s}, nil - case []byte: - return &sourceData{s}, nil - case io.ReadCloser: - return &sourceReadCloser{s}, nil - default: - return nil, fmt.Errorf("error parsing data source: unknown type '%s'", s) - } -} - -type LoadOptions struct { - // Loose indicates whether the parser should ignore nonexistent files or return error. - Loose bool - // Insensitive indicates whether the parser forces all section and key names to lowercase. - Insensitive bool - // IgnoreContinuation indicates whether to ignore continuation lines while parsing. - IgnoreContinuation bool - // IgnoreInlineComment indicates whether to ignore comments at the end of value and treat it as part of value. - IgnoreInlineComment bool - // AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing. - // This type of keys are mostly used in my.cnf. - AllowBooleanKeys bool - // AllowShadows indicates whether to keep track of keys with same name under same section. - AllowShadows bool - // AllowNestedValues indicates whether to allow AWS-like nested values. - // Docs: http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#nested-values - AllowNestedValues bool - // UnescapeValueDoubleQuotes indicates whether to unescape double quotes inside value to regular format - // when value is surrounded by double quotes, e.g. key="a \"value\"" => key=a "value" - UnescapeValueDoubleQuotes bool - // UnescapeValueCommentSymbols indicates to unescape comment symbols (\# and \;) inside value to regular format - // when value is NOT surrounded by any quotes. - // Note: UNSTABLE, behavior might change to only unescape inside double quotes but may noy necessary at all. - UnescapeValueCommentSymbols bool - // Some INI formats allow group blocks that store a block of raw content that doesn't otherwise - // conform to key/value pairs. Specify the names of those blocks here. - UnparseableSections []string -} - -func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) { - sources := make([]dataSource, len(others)+1) - sources[0], err = parseDataSource(source) - if err != nil { - return nil, err - } - for i := range others { - sources[i+1], err = parseDataSource(others[i]) - if err != nil { - return nil, err - } - } - f := newFile(sources, opts) - if err = f.Reload(); err != nil { - return nil, err - } - return f, nil -} - -// Load loads and parses from INI data sources. -// Arguments can be mixed of file name with string type, or raw data in []byte. -// It will return error if list contains nonexistent files. -func Load(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{}, source, others...) -} - -// LooseLoad has exactly same functionality as Load function -// except it ignores nonexistent files instead of returning error. -func LooseLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Loose: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it forces all section and key names to be lowercased. -func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Insensitive: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it allows have shadow keys. -func ShadowLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{AllowShadows: true}, source, others...) -} diff --git a/vendor/github.com/go-ini/ini/key.go b/vendor/github.com/go-ini/ini/key.go deleted file mode 100644 index 7c8566a1b..000000000 --- a/vendor/github.com/go-ini/ini/key.go +++ /dev/null @@ -1,751 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "strconv" - "strings" - "time" -) - -// Key represents a key under a section. -type Key struct { - s *Section - Comment string - name string - value string - isAutoIncrement bool - isBooleanType bool - - isShadow bool - shadows []*Key - - nestedValues []string -} - -// newKey simply return a key object with given values. -func newKey(s *Section, name, val string) *Key { - return &Key{ - s: s, - name: name, - value: val, - } -} - -func (k *Key) addShadow(val string) error { - if k.isShadow { - return errors.New("cannot add shadow to another shadow key") - } else if k.isAutoIncrement || k.isBooleanType { - return errors.New("cannot add shadow to auto-increment or boolean key") - } - - shadow := newKey(k.s, k.name, val) - shadow.isShadow = true - k.shadows = append(k.shadows, shadow) - return nil -} - -// AddShadow adds a new shadow key to itself. -func (k *Key) AddShadow(val string) error { - if !k.s.f.options.AllowShadows { - return errors.New("shadow key is not allowed") - } - return k.addShadow(val) -} - -func (k *Key) addNestedValue(val string) error { - if k.isAutoIncrement || k.isBooleanType { - return errors.New("cannot add nested value to auto-increment or boolean key") - } - - k.nestedValues = append(k.nestedValues, val) - return nil -} - -func (k *Key) AddNestedValue(val string) error { - if !k.s.f.options.AllowNestedValues { - return errors.New("nested value is not allowed") - } - return k.addNestedValue(val) -} - -// ValueMapper represents a mapping function for values, e.g. os.ExpandEnv -type ValueMapper func(string) string - -// Name returns name of key. -func (k *Key) Name() string { - return k.name -} - -// Value returns raw value of key for performance purpose. -func (k *Key) Value() string { - return k.value -} - -// ValueWithShadows returns raw values of key and its shadows if any. -func (k *Key) ValueWithShadows() []string { - if len(k.shadows) == 0 { - return []string{k.value} - } - vals := make([]string, len(k.shadows)+1) - vals[0] = k.value - for i := range k.shadows { - vals[i+1] = k.shadows[i].value - } - return vals -} - -// NestedValues returns nested values stored in the key. -// It is possible returned value is nil if no nested values stored in the key. -func (k *Key) NestedValues() []string { - return k.nestedValues -} - -// transformValue takes a raw value and transforms to its final string. -func (k *Key) transformValue(val string) string { - if k.s.f.ValueMapper != nil { - val = k.s.f.ValueMapper(val) - } - - // Fail-fast if no indicate char found for recursive value - if !strings.Contains(val, "%") { - return val - } - for i := 0; i < _DEPTH_VALUES; i++ { - vr := varPattern.FindString(val) - if len(vr) == 0 { - break - } - - // Take off leading '%(' and trailing ')s'. - noption := strings.TrimLeft(vr, "%(") - noption = strings.TrimRight(noption, ")s") - - // Search in the same section. - nk, err := k.s.GetKey(noption) - if err != nil || k == nk { - // Search again in default section. - nk, _ = k.s.f.Section("").GetKey(noption) - } - - // Substitute by new value and take off leading '%(' and trailing ')s'. - val = strings.Replace(val, vr, nk.value, -1) - } - return val -} - -// String returns string representation of value. -func (k *Key) String() string { - return k.transformValue(k.value) -} - -// Validate accepts a validate function which can -// return modifed result as key value. -func (k *Key) Validate(fn func(string) string) string { - return fn(k.String()) -} - -// parseBool returns the boolean value represented by the string. -// -// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On, -// 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off. -// Any other value returns an error. -func parseBool(str string) (value bool, err error) { - switch str { - case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": - return true, nil - case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": - return false, nil - } - return false, fmt.Errorf("parsing \"%s\": invalid syntax", str) -} - -// Bool returns bool type value. -func (k *Key) Bool() (bool, error) { - return parseBool(k.String()) -} - -// Float64 returns float64 type value. -func (k *Key) Float64() (float64, error) { - return strconv.ParseFloat(k.String(), 64) -} - -// Int returns int type value. -func (k *Key) Int() (int, error) { - return strconv.Atoi(k.String()) -} - -// Int64 returns int64 type value. -func (k *Key) Int64() (int64, error) { - return strconv.ParseInt(k.String(), 10, 64) -} - -// Uint returns uint type valued. -func (k *Key) Uint() (uint, error) { - u, e := strconv.ParseUint(k.String(), 10, 64) - return uint(u), e -} - -// Uint64 returns uint64 type value. -func (k *Key) Uint64() (uint64, error) { - return strconv.ParseUint(k.String(), 10, 64) -} - -// Duration returns time.Duration type value. -func (k *Key) Duration() (time.Duration, error) { - return time.ParseDuration(k.String()) -} - -// TimeFormat parses with given format and returns time.Time type value. -func (k *Key) TimeFormat(format string) (time.Time, error) { - return time.Parse(format, k.String()) -} - -// Time parses with RFC3339 format and returns time.Time type value. -func (k *Key) Time() (time.Time, error) { - return k.TimeFormat(time.RFC3339) -} - -// MustString returns default value if key value is empty. -func (k *Key) MustString(defaultVal string) string { - val := k.String() - if len(val) == 0 { - k.value = defaultVal - return defaultVal - } - return val -} - -// MustBool always returns value without error, -// it returns false if error occurs. -func (k *Key) MustBool(defaultVal ...bool) bool { - val, err := k.Bool() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatBool(defaultVal[0]) - return defaultVal[0] - } - return val -} - -// MustFloat64 always returns value without error, -// it returns 0.0 if error occurs. -func (k *Key) MustFloat64(defaultVal ...float64) float64 { - val, err := k.Float64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatFloat(defaultVal[0], 'f', -1, 64) - return defaultVal[0] - } - return val -} - -// MustInt always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt(defaultVal ...int) int { - val, err := k.Int() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatInt(int64(defaultVal[0]), 10) - return defaultVal[0] - } - return val -} - -// MustInt64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt64(defaultVal ...int64) int64 { - val, err := k.Int64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatInt(defaultVal[0], 10) - return defaultVal[0] - } - return val -} - -// MustUint always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint(defaultVal ...uint) uint { - val, err := k.Uint() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatUint(uint64(defaultVal[0]), 10) - return defaultVal[0] - } - return val -} - -// MustUint64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint64(defaultVal ...uint64) uint64 { - val, err := k.Uint64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatUint(defaultVal[0], 10) - return defaultVal[0] - } - return val -} - -// MustDuration always returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration { - val, err := k.Duration() - if len(defaultVal) > 0 && err != nil { - k.value = defaultVal[0].String() - return defaultVal[0] - } - return val -} - -// MustTimeFormat always parses with given format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time { - val, err := k.TimeFormat(format) - if len(defaultVal) > 0 && err != nil { - k.value = defaultVal[0].Format(format) - return defaultVal[0] - } - return val -} - -// MustTime always parses with RFC3339 format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTime(defaultVal ...time.Time) time.Time { - return k.MustTimeFormat(time.RFC3339, defaultVal...) -} - -// In always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) In(defaultVal string, candidates []string) string { - val := k.String() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InFloat64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 { - val := k.MustFloat64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt(defaultVal int, candidates []int) int { - val := k.MustInt() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 { - val := k.MustInt64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint(defaultVal uint, candidates []uint) uint { - val := k.MustUint() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 { - val := k.MustUint64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTimeFormat always parses with given format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time { - val := k.MustTimeFormat(format) - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTime always parses with RFC3339 format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time { - return k.InTimeFormat(time.RFC3339, defaultVal, candidates) -} - -// RangeFloat64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 { - val := k.MustFloat64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt(defaultVal, min, max int) int { - val := k.MustInt() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt64(defaultVal, min, max int64) int64 { - val := k.MustInt64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeTimeFormat checks if value with given format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time { - val := k.MustTimeFormat(format) - if val.Unix() < min.Unix() || val.Unix() > max.Unix() { - return defaultVal - } - return val -} - -// RangeTime checks if value with RFC3339 format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time { - return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max) -} - -// Strings returns list of string divided by given delimiter. -func (k *Key) Strings(delim string) []string { - str := k.String() - if len(str) == 0 { - return []string{} - } - - runes := []rune(str) - vals := make([]string, 0, 2) - var buf bytes.Buffer - escape := false - idx := 0 - for { - if escape { - escape = false - if runes[idx] != '\\' && !strings.HasPrefix(string(runes[idx:]), delim) { - buf.WriteRune('\\') - } - buf.WriteRune(runes[idx]) - } else { - if runes[idx] == '\\' { - escape = true - } else if strings.HasPrefix(string(runes[idx:]), delim) { - idx += len(delim) - 1 - vals = append(vals, strings.TrimSpace(buf.String())) - buf.Reset() - } else { - buf.WriteRune(runes[idx]) - } - } - idx += 1 - if idx == len(runes) { - break - } - } - - if buf.Len() > 0 { - vals = append(vals, strings.TrimSpace(buf.String())) - } - - return vals -} - -// StringsWithShadows returns list of string divided by given delimiter. -// Shadows will also be appended if any. -func (k *Key) StringsWithShadows(delim string) []string { - vals := k.ValueWithShadows() - results := make([]string, 0, len(vals)*2) - for i := range vals { - if len(vals) == 0 { - continue - } - - results = append(results, strings.Split(vals[i], delim)...) - } - - for i := range results { - results[i] = k.transformValue(strings.TrimSpace(results[i])) - } - return results -} - -// Float64s returns list of float64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Float64s(delim string) []float64 { - vals, _ := k.parseFloat64s(k.Strings(delim), true, false) - return vals -} - -// Ints returns list of int divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Ints(delim string) []int { - vals, _ := k.parseInts(k.Strings(delim), true, false) - return vals -} - -// Int64s returns list of int64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Int64s(delim string) []int64 { - vals, _ := k.parseInt64s(k.Strings(delim), true, false) - return vals -} - -// Uints returns list of uint divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Uints(delim string) []uint { - vals, _ := k.parseUints(k.Strings(delim), true, false) - return vals -} - -// Uint64s returns list of uint64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Uint64s(delim string) []uint64 { - vals, _ := k.parseUint64s(k.Strings(delim), true, false) - return vals -} - -// TimesFormat parses with given format and returns list of time.Time divided by given delimiter. -// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). -func (k *Key) TimesFormat(format, delim string) []time.Time { - vals, _ := k.parseTimesFormat(format, k.Strings(delim), true, false) - return vals -} - -// Times parses with RFC3339 format and returns list of time.Time divided by given delimiter. -// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). -func (k *Key) Times(delim string) []time.Time { - return k.TimesFormat(time.RFC3339, delim) -} - -// ValidFloat64s returns list of float64 divided by given delimiter. If some value is not float, then -// it will not be included to result list. -func (k *Key) ValidFloat64s(delim string) []float64 { - vals, _ := k.parseFloat64s(k.Strings(delim), false, false) - return vals -} - -// ValidInts returns list of int divided by given delimiter. If some value is not integer, then it will -// not be included to result list. -func (k *Key) ValidInts(delim string) []int { - vals, _ := k.parseInts(k.Strings(delim), false, false) - return vals -} - -// ValidInt64s returns list of int64 divided by given delimiter. If some value is not 64-bit integer, -// then it will not be included to result list. -func (k *Key) ValidInt64s(delim string) []int64 { - vals, _ := k.parseInt64s(k.Strings(delim), false, false) - return vals -} - -// ValidUints returns list of uint divided by given delimiter. If some value is not unsigned integer, -// then it will not be included to result list. -func (k *Key) ValidUints(delim string) []uint { - vals, _ := k.parseUints(k.Strings(delim), false, false) - return vals -} - -// ValidUint64s returns list of uint64 divided by given delimiter. If some value is not 64-bit unsigned -// integer, then it will not be included to result list. -func (k *Key) ValidUint64s(delim string) []uint64 { - vals, _ := k.parseUint64s(k.Strings(delim), false, false) - return vals -} - -// ValidTimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) ValidTimesFormat(format, delim string) []time.Time { - vals, _ := k.parseTimesFormat(format, k.Strings(delim), false, false) - return vals -} - -// ValidTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter. -func (k *Key) ValidTimes(delim string) []time.Time { - return k.ValidTimesFormat(time.RFC3339, delim) -} - -// StrictFloat64s returns list of float64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictFloat64s(delim string) ([]float64, error) { - return k.parseFloat64s(k.Strings(delim), false, true) -} - -// StrictInts returns list of int divided by given delimiter or error on first invalid input. -func (k *Key) StrictInts(delim string) ([]int, error) { - return k.parseInts(k.Strings(delim), false, true) -} - -// StrictInt64s returns list of int64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictInt64s(delim string) ([]int64, error) { - return k.parseInt64s(k.Strings(delim), false, true) -} - -// StrictUints returns list of uint divided by given delimiter or error on first invalid input. -func (k *Key) StrictUints(delim string) ([]uint, error) { - return k.parseUints(k.Strings(delim), false, true) -} - -// StrictUint64s returns list of uint64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictUint64s(delim string) ([]uint64, error) { - return k.parseUint64s(k.Strings(delim), false, true) -} - -// StrictTimesFormat parses with given format and returns list of time.Time divided by given delimiter -// or error on first invalid input. -func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, error) { - return k.parseTimesFormat(format, k.Strings(delim), false, true) -} - -// StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter -// or error on first invalid input. -func (k *Key) StrictTimes(delim string) ([]time.Time, error) { - return k.StrictTimesFormat(time.RFC3339, delim) -} - -// parseFloat64s transforms strings to float64s. -func (k *Key) parseFloat64s(strs []string, addInvalid, returnOnInvalid bool) ([]float64, error) { - vals := make([]float64, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseFloat(str, 64) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseInts transforms strings to ints. -func (k *Key) parseInts(strs []string, addInvalid, returnOnInvalid bool) ([]int, error) { - vals := make([]int, 0, len(strs)) - for _, str := range strs { - val, err := strconv.Atoi(str) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseInt64s transforms strings to int64s. -func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid bool) ([]int64, error) { - vals := make([]int64, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseInt(str, 10, 64) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseUints transforms strings to uints. -func (k *Key) parseUints(strs []string, addInvalid, returnOnInvalid bool) ([]uint, error) { - vals := make([]uint, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseUint(str, 10, 0) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, uint(val)) - } - } - return vals, nil -} - -// parseUint64s transforms strings to uint64s. -func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]uint64, error) { - vals := make([]uint64, 0, len(strs)) - for _, str := range strs { - val, err := strconv.ParseUint(str, 10, 64) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// parseTimesFormat transforms strings to times in given format. -func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { - vals := make([]time.Time, 0, len(strs)) - for _, str := range strs { - val, err := time.Parse(format, str) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// SetValue changes key value. -func (k *Key) SetValue(v string) { - if k.s.f.BlockMode { - k.s.f.lock.Lock() - defer k.s.f.lock.Unlock() - } - - k.value = v - k.s.keysHash[k.name] = v -} diff --git a/vendor/github.com/go-ini/ini/parser.go b/vendor/github.com/go-ini/ini/parser.go deleted file mode 100644 index db3af8f00..000000000 --- a/vendor/github.com/go-ini/ini/parser.go +++ /dev/null @@ -1,401 +0,0 @@ -// Copyright 2015 Unknwon -// -// 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 ini - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - "unicode" -) - -type tokenType int - -const ( - _TOKEN_INVALID tokenType = iota - _TOKEN_COMMENT - _TOKEN_SECTION - _TOKEN_KEY -) - -type parser struct { - buf *bufio.Reader - isEOF bool - count int - comment *bytes.Buffer -} - -func newParser(r io.Reader) *parser { - return &parser{ - buf: bufio.NewReader(r), - count: 1, - comment: &bytes.Buffer{}, - } -} - -// BOM handles header of UTF-8, UTF-16 LE and UTF-16 BE's BOM format. -// http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding -func (p *parser) BOM() error { - mask, err := p.buf.Peek(2) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 2 { - return nil - } - - switch { - case mask[0] == 254 && mask[1] == 255: - fallthrough - case mask[0] == 255 && mask[1] == 254: - p.buf.Read(mask) - case mask[0] == 239 && mask[1] == 187: - mask, err := p.buf.Peek(3) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 3 { - return nil - } - if mask[2] == 191 { - p.buf.Read(mask) - } - } - return nil -} - -func (p *parser) readUntil(delim byte) ([]byte, error) { - data, err := p.buf.ReadBytes(delim) - if err != nil { - if err == io.EOF { - p.isEOF = true - } else { - return nil, err - } - } - return data, nil -} - -func cleanComment(in []byte) ([]byte, bool) { - i := bytes.IndexAny(in, "#;") - if i == -1 { - return nil, false - } - return in[i:], true -} - -func readKeyName(in []byte) (string, int, error) { - line := string(in) - - // Check if key name surrounded by quotes. - var keyQuote string - if line[0] == '"' { - if len(line) > 6 && string(line[0:3]) == `"""` { - keyQuote = `"""` - } else { - keyQuote = `"` - } - } else if line[0] == '`' { - keyQuote = "`" - } - - // Get out key name - endIdx := -1 - if len(keyQuote) > 0 { - startIdx := len(keyQuote) - // FIXME: fail case -> """"""name"""=value - pos := strings.Index(line[startIdx:], keyQuote) - if pos == -1 { - return "", -1, fmt.Errorf("missing closing key quote: %s", line) - } - pos += startIdx - - // Find key-value delimiter - i := strings.IndexAny(line[pos+startIdx:], "=:") - if i < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - endIdx = pos + i - return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil - } - - endIdx = strings.IndexAny(line, "=:") - if endIdx < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil -} - -func (p *parser) readMultilines(line, val, valQuote string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := string(data) - - pos := strings.LastIndex(next, valQuote) - if pos > -1 { - val += next[:pos] - - comment, has := cleanComment([]byte(next[pos:])) - if has { - p.comment.Write(bytes.TrimSpace(comment)) - } - break - } - val += next - if p.isEOF { - return "", fmt.Errorf("missing closing key quote from '%s' to '%s'", line, next) - } - } - return val, nil -} - -func (p *parser) readContinuationLines(val string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := strings.TrimSpace(string(data)) - - if len(next) == 0 { - break - } - val += next - if val[len(val)-1] != '\\' { - break - } - val = val[:len(val)-1] - } - return val, nil -} - -// hasSurroundedQuote check if and only if the first and last characters -// are quotes \" or \'. -// It returns false if any other parts also contain same kind of quotes. -func hasSurroundedQuote(in string, quote byte) bool { - return len(in) >= 2 && in[0] == quote && in[len(in)-1] == quote && - strings.IndexByte(in[1:], quote) == len(in)-2 -} - -func (p *parser) readValue(in []byte, - ignoreContinuation, ignoreInlineComment, unescapeValueDoubleQuotes, unescapeValueCommentSymbols bool) (string, error) { - - line := strings.TrimLeftFunc(string(in), unicode.IsSpace) - if len(line) == 0 { - return "", nil - } - - var valQuote string - if len(line) > 3 && string(line[0:3]) == `"""` { - valQuote = `"""` - } else if line[0] == '`' { - valQuote = "`" - } else if unescapeValueDoubleQuotes && line[0] == '"' { - valQuote = `"` - } - - if len(valQuote) > 0 { - startIdx := len(valQuote) - pos := strings.LastIndex(line[startIdx:], valQuote) - // Check for multi-line value - if pos == -1 { - return p.readMultilines(line, line[startIdx:], valQuote) - } - - if unescapeValueDoubleQuotes && valQuote == `"` { - return strings.Replace(line[startIdx:pos+startIdx], `\"`, `"`, -1), nil - } - return line[startIdx : pos+startIdx], nil - } - - // Won't be able to reach here if value only contains whitespace - line = strings.TrimSpace(line) - - // Check continuation lines when desired - if !ignoreContinuation && line[len(line)-1] == '\\' { - return p.readContinuationLines(line[:len(line)-1]) - } - - // Check if ignore inline comment - if !ignoreInlineComment { - i := strings.IndexAny(line, "#;") - if i > -1 { - p.comment.WriteString(line[i:]) - line = strings.TrimSpace(line[:i]) - } - } - - // Trim single and double quotes - if hasSurroundedQuote(line, '\'') || - hasSurroundedQuote(line, '"') { - line = line[1 : len(line)-1] - } else if len(valQuote) == 0 && unescapeValueCommentSymbols { - if strings.Contains(line, `\;`) { - line = strings.Replace(line, `\;`, ";", -1) - } - if strings.Contains(line, `\#`) { - line = strings.Replace(line, `\#`, "#", -1) - } - } - return line, nil -} - -// parse parses data through an io.Reader. -func (f *File) parse(reader io.Reader) (err error) { - p := newParser(reader) - if err = p.BOM(); err != nil { - return fmt.Errorf("BOM: %v", err) - } - - // Ignore error because default section name is never empty string. - name := DEFAULT_SECTION - if f.options.Insensitive { - name = strings.ToLower(DEFAULT_SECTION) - } - section, _ := f.NewSection(name) - - // This "last" is not strictly equivalent to "previous one" if current key is not the first nested key - var isLastValueEmpty bool - var lastRegularKey *Key - - var line []byte - var inUnparseableSection bool - for !p.isEOF { - line, err = p.readUntil('\n') - if err != nil { - return err - } - - if f.options.AllowNestedValues && - isLastValueEmpty && len(line) > 0 { - if line[0] == ' ' || line[0] == '\t' { - lastRegularKey.addNestedValue(string(bytes.TrimSpace(line))) - continue - } - } - - line = bytes.TrimLeftFunc(line, unicode.IsSpace) - if len(line) == 0 { - continue - } - - // Comments - if line[0] == '#' || line[0] == ';' { - // Note: we do not care ending line break, - // it is needed for adding second line, - // so just clean it once at the end when set to value. - p.comment.Write(line) - continue - } - - // Section - if line[0] == '[' { - // Read to the next ']' (TODO: support quoted strings) - // TODO(unknwon): use LastIndexByte when stop supporting Go1.4 - closeIdx := bytes.LastIndex(line, []byte("]")) - if closeIdx == -1 { - return fmt.Errorf("unclosed section: %s", line) - } - - name := string(line[1:closeIdx]) - section, err = f.NewSection(name) - if err != nil { - return err - } - - comment, has := cleanComment(line[closeIdx+1:]) - if has { - p.comment.Write(comment) - } - - section.Comment = strings.TrimSpace(p.comment.String()) - - // Reset aotu-counter and comments - p.comment.Reset() - p.count = 1 - - inUnparseableSection = false - for i := range f.options.UnparseableSections { - if f.options.UnparseableSections[i] == name || - (f.options.Insensitive && strings.ToLower(f.options.UnparseableSections[i]) == strings.ToLower(name)) { - inUnparseableSection = true - continue - } - } - continue - } - - if inUnparseableSection { - section.isRawSection = true - section.rawBody += string(line) - continue - } - - kname, offset, err := readKeyName(line) - if err != nil { - // Treat as boolean key when desired, and whole line is key name. - if IsErrDelimiterNotFound(err) && f.options.AllowBooleanKeys { - kname, err := p.readValue(line, - f.options.IgnoreContinuation, - f.options.IgnoreInlineComment, - f.options.UnescapeValueDoubleQuotes, - f.options.UnescapeValueCommentSymbols) - if err != nil { - return err - } - key, err := section.NewBooleanKey(kname) - if err != nil { - return err - } - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - continue - } - return err - } - - // Auto increment. - isAutoIncr := false - if kname == "-" { - isAutoIncr = true - kname = "#" + strconv.Itoa(p.count) - p.count++ - } - - value, err := p.readValue(line[offset:], - f.options.IgnoreContinuation, - f.options.IgnoreInlineComment, - f.options.UnescapeValueDoubleQuotes, - f.options.UnescapeValueCommentSymbols) - if err != nil { - return err - } - isLastValueEmpty = len(value) == 0 - - key, err := section.NewKey(kname, value) - if err != nil { - return err - } - key.isAutoIncrement = isAutoIncr - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - lastRegularKey = key - } - return nil -} diff --git a/vendor/github.com/go-ini/ini/section.go b/vendor/github.com/go-ini/ini/section.go deleted file mode 100644 index d8a402619..000000000 --- a/vendor/github.com/go-ini/ini/section.go +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "errors" - "fmt" - "strings" -) - -// Section represents a config section. -type Section struct { - f *File - Comment string - name string - keys map[string]*Key - keyList []string - keysHash map[string]string - - isRawSection bool - rawBody string -} - -func newSection(f *File, name string) *Section { - return &Section{ - f: f, - name: name, - keys: make(map[string]*Key), - keyList: make([]string, 0, 10), - keysHash: make(map[string]string), - } -} - -// Name returns name of Section. -func (s *Section) Name() string { - return s.name -} - -// Body returns rawBody of Section if the section was marked as unparseable. -// It still follows the other rules of the INI format surrounding leading/trailing whitespace. -func (s *Section) Body() string { - return strings.TrimSpace(s.rawBody) -} - -// SetBody updates body content only if section is raw. -func (s *Section) SetBody(body string) { - if !s.isRawSection { - return - } - s.rawBody = body -} - -// NewKey creates a new key to given section. -func (s *Section) NewKey(name, val string) (*Key, error) { - if len(name) == 0 { - return nil, errors.New("error creating new key: empty key name") - } else if s.f.options.Insensitive { - name = strings.ToLower(name) - } - - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - if inSlice(name, s.keyList) { - if s.f.options.AllowShadows { - if err := s.keys[name].addShadow(val); err != nil { - return nil, err - } - } else { - s.keys[name].value = val - } - return s.keys[name], nil - } - - s.keyList = append(s.keyList, name) - s.keys[name] = newKey(s, name, val) - s.keysHash[name] = val - return s.keys[name], nil -} - -// NewBooleanKey creates a new boolean type key to given section. -func (s *Section) NewBooleanKey(name string) (*Key, error) { - key, err := s.NewKey(name, "true") - if err != nil { - return nil, err - } - - key.isBooleanType = true - return key, nil -} - -// GetKey returns key in section by given name. -func (s *Section) GetKey(name string) (*Key, error) { - // FIXME: change to section level lock? - if s.f.BlockMode { - s.f.lock.RLock() - } - if s.f.options.Insensitive { - name = strings.ToLower(name) - } - key := s.keys[name] - if s.f.BlockMode { - s.f.lock.RUnlock() - } - - if key == nil { - // Check if it is a child-section. - sname := s.name - for { - if i := strings.LastIndex(sname, "."); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - return sec.GetKey(name) - } else { - break - } - } - return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name) - } - return key, nil -} - -// HasKey returns true if section contains a key with given name. -func (s *Section) HasKey(name string) bool { - key, _ := s.GetKey(name) - return key != nil -} - -// Haskey is a backwards-compatible name for HasKey. -// TODO: delete me in v2 -func (s *Section) Haskey(name string) bool { - return s.HasKey(name) -} - -// HasValue returns true if section contains given raw value. -func (s *Section) HasValue(value string) bool { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - for _, k := range s.keys { - if value == k.value { - return true - } - } - return false -} - -// Key assumes named Key exists in section and returns a zero-value when not. -func (s *Section) Key(name string) *Key { - key, err := s.GetKey(name) - if err != nil { - // It's OK here because the only possible error is empty key name, - // but if it's empty, this piece of code won't be executed. - key, _ = s.NewKey(name, "") - return key - } - return key -} - -// Keys returns list of keys of section. -func (s *Section) Keys() []*Key { - keys := make([]*Key, len(s.keyList)) - for i := range s.keyList { - keys[i] = s.Key(s.keyList[i]) - } - return keys -} - -// ParentKeys returns list of keys of parent section. -func (s *Section) ParentKeys() []*Key { - var parentKeys []*Key - sname := s.name - for { - if i := strings.LastIndex(sname, "."); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - parentKeys = append(parentKeys, sec.Keys()...) - } else { - break - } - - } - return parentKeys -} - -// KeyStrings returns list of key names of section. -func (s *Section) KeyStrings() []string { - list := make([]string, len(s.keyList)) - copy(list, s.keyList) - return list -} - -// KeysHash returns keys hash consisting of names and values. -func (s *Section) KeysHash() map[string]string { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - hash := map[string]string{} - for key, value := range s.keysHash { - hash[key] = value - } - return hash -} - -// DeleteKey deletes a key from section. -func (s *Section) DeleteKey(name string) { - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - for i, k := range s.keyList { - if k == name { - s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) - delete(s.keys, name) - return - } - } -} - -// ChildSections returns a list of child sections of current section. -// For example, "[parent.child1]" and "[parent.child12]" are child sections -// of section "[parent]". -func (s *Section) ChildSections() []*Section { - prefix := s.name + "." - children := make([]*Section, 0, 3) - for _, name := range s.f.sectionList { - if strings.HasPrefix(name, prefix) { - children = append(children, s.f.sections[name]) - } - } - return children -} diff --git a/vendor/github.com/go-ini/ini/struct.go b/vendor/github.com/go-ini/ini/struct.go deleted file mode 100644 index 9719dc698..000000000 --- a/vendor/github.com/go-ini/ini/struct.go +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "reflect" - "strings" - "time" - "unicode" -) - -// NameMapper represents a ini tag name mapper. -type NameMapper func(string) string - -// Built-in name getters. -var ( - // AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE. - AllCapsUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - } - newstr = append(newstr, unicode.ToUpper(chr)) - } - return string(newstr) - } - // TitleUnderscore converts to format title_underscore. - TitleUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - chr -= ('A' - 'a') - } - newstr = append(newstr, chr) - } - return string(newstr) - } -) - -func (s *Section) parseFieldName(raw, actual string) string { - if len(actual) > 0 { - return actual - } - if s.f.NameMapper != nil { - return s.f.NameMapper(raw) - } - return raw -} - -func parseDelim(actual string) string { - if len(actual) > 0 { - return actual - } - return "," -} - -var reflectTime = reflect.TypeOf(time.Now()).Kind() - -// setSliceWithProperType sets proper values to slice based on its type. -func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { - var strs []string - if allowShadow { - strs = key.StringsWithShadows(delim) - } else { - strs = key.Strings(delim) - } - - numVals := len(strs) - if numVals == 0 { - return nil - } - - var vals interface{} - var err error - - sliceOf := field.Type().Elem().Kind() - switch sliceOf { - case reflect.String: - vals = strs - case reflect.Int: - vals, err = key.parseInts(strs, true, false) - case reflect.Int64: - vals, err = key.parseInt64s(strs, true, false) - case reflect.Uint: - vals, err = key.parseUints(strs, true, false) - case reflect.Uint64: - vals, err = key.parseUint64s(strs, true, false) - case reflect.Float64: - vals, err = key.parseFloat64s(strs, true, false) - case reflectTime: - vals, err = key.parseTimesFormat(time.RFC3339, strs, true, false) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - if err != nil && isStrict { - return err - } - - slice := reflect.MakeSlice(field.Type(), numVals, numVals) - for i := 0; i < numVals; i++ { - switch sliceOf { - case reflect.String: - slice.Index(i).Set(reflect.ValueOf(vals.([]string)[i])) - case reflect.Int: - slice.Index(i).Set(reflect.ValueOf(vals.([]int)[i])) - case reflect.Int64: - slice.Index(i).Set(reflect.ValueOf(vals.([]int64)[i])) - case reflect.Uint: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint)[i])) - case reflect.Uint64: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint64)[i])) - case reflect.Float64: - slice.Index(i).Set(reflect.ValueOf(vals.([]float64)[i])) - case reflectTime: - slice.Index(i).Set(reflect.ValueOf(vals.([]time.Time)[i])) - } - } - field.Set(slice) - return nil -} - -func wrapStrictError(err error, isStrict bool) error { - if isStrict { - return err - } - return nil -} - -// setWithProperType sets proper value to field based on its type, -// but it does not return error for failing parsing, -// because we want to use default value that is already assigned to strcut. -func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { - switch t.Kind() { - case reflect.String: - if len(key.String()) == 0 { - return nil - } - field.SetString(key.String()) - case reflect.Bool: - boolVal, err := key.Bool() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetBool(boolVal) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int64(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - intVal, err := key.Int64() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetInt(intVal) - // byte is an alias for uint8, so supporting uint8 breaks support for byte - case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && int(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - return nil - } - - uintVal, err := key.Uint64() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetUint(uintVal) - - case reflect.Float32, reflect.Float64: - floatVal, err := key.Float64() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.SetFloat(floatVal) - case reflectTime: - timeVal, err := key.Time() - if err != nil { - return wrapStrictError(err, isStrict) - } - field.Set(reflect.ValueOf(timeVal)) - case reflect.Slice: - return setSliceWithProperType(key, field, delim, allowShadow, isStrict) - default: - return fmt.Errorf("unsupported type '%s'", t) - } - return nil -} - -func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool) { - opts := strings.SplitN(tag, ",", 3) - rawName = opts[0] - if len(opts) > 1 { - omitEmpty = opts[1] == "omitempty" - } - if len(opts) > 2 { - allowShadow = opts[2] == "allowshadow" - } - return rawName, omitEmpty, allowShadow -} - -func (s *Section) mapTo(val reflect.Value, isStrict bool) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - rawName, _, allowShadow := parseTagOptions(tag) - fieldName := s.parseFieldName(tpField.Name, rawName) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - isAnonymous := tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous - isStruct := tpField.Type.Kind() == reflect.Struct - if isAnonymous { - field.Set(reflect.New(tpField.Type.Elem())) - } - - if isAnonymous || isStruct { - if sec, err := s.f.GetSection(fieldName); err == nil { - if err = sec.mapTo(field, isStrict); err != nil { - return fmt.Errorf("error mapping field(%s): %v", fieldName, err) - } - continue - } - } - - if key, err := s.GetKey(fieldName); err == nil { - delim := parseDelim(tpField.Tag.Get("delim")) - if err = setWithProperType(tpField.Type, key, field, delim, allowShadow, isStrict); err != nil { - return fmt.Errorf("error mapping field(%s): %v", fieldName, err) - } - } - } - return nil -} - -// MapTo maps section to given struct. -func (s *Section) MapTo(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot map to non-pointer struct") - } - - return s.mapTo(val, false) -} - -// MapTo maps section to given struct in strict mode, -// which returns all possible error including value parsing error. -func (s *Section) StrictMapTo(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot map to non-pointer struct") - } - - return s.mapTo(val, true) -} - -// MapTo maps file to given struct. -func (f *File) MapTo(v interface{}) error { - return f.Section("").MapTo(v) -} - -// MapTo maps file to given struct in strict mode, -// which returns all possible error including value parsing error. -func (f *File) StrictMapTo(v interface{}) error { - return f.Section("").StrictMapTo(v) -} - -// MapTo maps data sources to given struct with name mapper. -func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.MapTo(v) -} - -// StrictMapToWithMapper maps data sources to given struct with name mapper in strict mode, -// which returns all possible error including value parsing error. -func StrictMapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.StrictMapTo(v) -} - -// MapTo maps data sources to given struct. -func MapTo(v, source interface{}, others ...interface{}) error { - return MapToWithMapper(v, nil, source, others...) -} - -// StrictMapTo maps data sources to given struct in strict mode, -// which returns all possible error including value parsing error. -func StrictMapTo(v, source interface{}, others ...interface{}) error { - return StrictMapToWithMapper(v, nil, source, others...) -} - -// reflectSliceWithProperType does the opposite thing as setSliceWithProperType. -func reflectSliceWithProperType(key *Key, field reflect.Value, delim string) error { - slice := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - - var buf bytes.Buffer - sliceOf := field.Type().Elem().Kind() - for i := 0; i < field.Len(); i++ { - switch sliceOf { - case reflect.String: - buf.WriteString(slice.Index(i).String()) - case reflect.Int, reflect.Int64: - buf.WriteString(fmt.Sprint(slice.Index(i).Int())) - case reflect.Uint, reflect.Uint64: - buf.WriteString(fmt.Sprint(slice.Index(i).Uint())) - case reflect.Float64: - buf.WriteString(fmt.Sprint(slice.Index(i).Float())) - case reflectTime: - buf.WriteString(slice.Index(i).Interface().(time.Time).Format(time.RFC3339)) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - buf.WriteString(delim) - } - key.SetValue(buf.String()[:buf.Len()-1]) - return nil -} - -// reflectWithProperType does the opposite thing as setWithProperType. -func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string) error { - switch t.Kind() { - case reflect.String: - key.SetValue(field.String()) - case reflect.Bool: - key.SetValue(fmt.Sprint(field.Bool())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - key.SetValue(fmt.Sprint(field.Int())) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - key.SetValue(fmt.Sprint(field.Uint())) - case reflect.Float32, reflect.Float64: - key.SetValue(fmt.Sprint(field.Float())) - case reflectTime: - key.SetValue(fmt.Sprint(field.Interface().(time.Time).Format(time.RFC3339))) - case reflect.Slice: - return reflectSliceWithProperType(key, field, delim) - default: - return fmt.Errorf("unsupported type '%s'", t) - } - return nil -} - -// CR: copied from encoding/json/encode.go with modifications of time.Time support. -// TODO: add more test coverage. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflectTime: - t, ok := v.Interface().(time.Time) - return ok && t.IsZero() - } - return false -} - -func (s *Section) reflectFrom(val reflect.Value) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - opts := strings.SplitN(tag, ",", 2) - if len(opts) == 2 && opts[1] == "omitempty" && isEmptyValue(field) { - continue - } - - fieldName := s.parseFieldName(tpField.Name, opts[0]) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - if (tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous) || - (tpField.Type.Kind() == reflect.Struct && tpField.Type.Name() != "Time") { - // Note: The only error here is section doesn't exist. - sec, err := s.f.GetSection(fieldName) - if err != nil { - // Note: fieldName can never be empty here, ignore error. - sec, _ = s.f.NewSection(fieldName) - } - - // Add comment from comment tag - if len(sec.Comment) == 0 { - sec.Comment = tpField.Tag.Get("comment") - } - - if err = sec.reflectFrom(field); err != nil { - return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) - } - continue - } - - // Note: Same reason as secion. - key, err := s.GetKey(fieldName) - if err != nil { - key, _ = s.NewKey(fieldName, "") - } - - // Add comment from comment tag - if len(key.Comment) == 0 { - key.Comment = tpField.Tag.Get("comment") - } - - if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil { - return fmt.Errorf("error reflecting field (%s): %v", fieldName, err) - } - - } - return nil -} - -// ReflectFrom reflects secion from given struct. -func (s *Section) ReflectFrom(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("cannot reflect from non-pointer struct") - } - - return s.reflectFrom(val) -} - -// ReflectFrom reflects file from given struct. -func (f *File) ReflectFrom(v interface{}) error { - return f.Section("").ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct with name mapper. -func ReflectFromWithMapper(cfg *File, v interface{}, mapper NameMapper) error { - cfg.NameMapper = mapper - return cfg.ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct. -func ReflectFrom(cfg *File, v interface{}) error { - return ReflectFromWithMapper(cfg, v, nil) -} diff --git a/vendor/github.com/gobwas/glob/.gitignore b/vendor/github.com/gobwas/glob/.gitignore new file mode 100644 index 000000000..b4ae623be --- /dev/null +++ b/vendor/github.com/gobwas/glob/.gitignore @@ -0,0 +1,8 @@ +glob.iml +.idea +*.cpu +*.mem +*.test +*.dot +*.png +*.svg diff --git a/vendor/github.com/gobwas/glob/.travis.yml b/vendor/github.com/gobwas/glob/.travis.yml new file mode 100644 index 000000000..e8a276826 --- /dev/null +++ b/vendor/github.com/gobwas/glob/.travis.yml @@ -0,0 +1,9 @@ +sudo: false + +language: go + +go: + - 1.5.3 + +script: + - go test -v ./... diff --git a/vendor/github.com/gobwas/glob/bench.sh b/vendor/github.com/gobwas/glob/bench.sh new file mode 100644 index 000000000..804cf22e6 --- /dev/null +++ b/vendor/github.com/gobwas/glob/bench.sh @@ -0,0 +1,26 @@ +#! /bin/bash + +bench() { + filename="/tmp/$1-$2.bench" + if test -e "${filename}"; + then + echo "Already exists ${filename}" + else + backup=`git rev-parse --abbrev-ref HEAD` + git checkout $1 + echo -n "Creating ${filename}... " + go test ./... -run=NONE -bench=$2 > "${filename}" -benchmem + echo "OK" + git checkout ${backup} + sleep 5 + fi +} + + +to=$1 +current=`git rev-parse --abbrev-ref HEAD` + +bench ${to} $2 +bench ${current} $2 + +benchcmp $3 "/tmp/${to}-$2.bench" "/tmp/${current}-$2.bench" diff --git a/vendor/github.com/gobwas/glob/cmd/globdraw/main.go b/vendor/github.com/gobwas/glob/cmd/globdraw/main.go deleted file mode 100644 index 585880db9..000000000 --- a/vendor/github.com/gobwas/glob/cmd/globdraw/main.go +++ /dev/null @@ -1,44 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "github.com/gobwas/glob" - "github.com/gobwas/glob/match" - "github.com/gobwas/glob/match/debug" - "os" - "strings" - "unicode/utf8" -) - -func main() { - pattern := flag.String("p", "", "pattern to draw") - sep := flag.String("s", "", "comma separated list of separators characters") - flag.Parse() - - if *pattern == "" { - flag.Usage() - os.Exit(1) - } - - var separators []rune - if len(*sep) > 0 { - for _, c := range strings.Split(*sep, ",") { - if r, w := utf8.DecodeRuneInString(c); len(c) > w { - fmt.Println("only single charactered separators are allowed") - os.Exit(1) - } else { - separators = append(separators, r) - } - } - } - - glob, err := glob.Compile(*pattern, separators...) - if err != nil { - fmt.Println("could not compile pattern:", err) - os.Exit(1) - } - - matcher := glob.(match.Matcher) - fmt.Fprint(os.Stdout, debug.Graphviz(*pattern, matcher)) -} diff --git a/vendor/github.com/gobwas/glob/cmd/globtest/main.go b/vendor/github.com/gobwas/glob/cmd/globtest/main.go deleted file mode 100644 index 95c102f73..000000000 --- a/vendor/github.com/gobwas/glob/cmd/globtest/main.go +++ /dev/null @@ -1,82 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "github.com/gobwas/glob" - "os" - "strings" - "testing" - "unicode/utf8" -) - -func benchString(r testing.BenchmarkResult) string { - nsop := r.NsPerOp() - ns := fmt.Sprintf("%10d ns/op", nsop) - allocs := "0" - if r.N > 0 { - if nsop < 100 { - // The format specifiers here make sure that - // the ones digits line up for all three possible formats. - if nsop < 10 { - ns = fmt.Sprintf("%13.2f ns/op", float64(r.T.Nanoseconds())/float64(r.N)) - } else { - ns = fmt.Sprintf("%12.1f ns/op", float64(r.T.Nanoseconds())/float64(r.N)) - } - } - - allocs = fmt.Sprintf("%d", r.MemAllocs/uint64(r.N)) - } - - return fmt.Sprintf("%8d\t%s\t%s allocs", r.N, ns, allocs) -} - -func main() { - pattern := flag.String("p", "", "pattern to draw") - sep := flag.String("s", "", "comma separated list of separators") - fixture := flag.String("f", "", "fixture") - verbose := flag.Bool("v", false, "verbose") - flag.Parse() - - if *pattern == "" { - flag.Usage() - os.Exit(1) - } - - var separators []rune - for _, c := range strings.Split(*sep, ",") { - if r, w := utf8.DecodeRuneInString(c); len(c) > w { - fmt.Println("only single charactered separators are allowed") - os.Exit(1) - } else { - separators = append(separators, r) - } - } - - g, err := glob.Compile(*pattern, separators...) - if err != nil { - fmt.Println("could not compile pattern:", err) - os.Exit(1) - } - - if !*verbose { - fmt.Println(g.Match(*fixture)) - return - } - - fmt.Printf("result: %t\n", g.Match(*fixture)) - - cb := testing.Benchmark(func(b *testing.B) { - for i := 0; i < b.N; i++ { - glob.Compile(*pattern, separators...) - } - }) - fmt.Println("compile:", benchString(cb)) - - mb := testing.Benchmark(func(b *testing.B) { - for i := 0; i < b.N; i++ { - g.Match(*fixture) - } - }) - fmt.Println("match: ", benchString(mb)) -} diff --git a/vendor/github.com/gobwas/glob/match/debug/debug.go b/vendor/github.com/gobwas/glob/match/debug/debug.go deleted file mode 100644 index 5c5dbc1a4..000000000 --- a/vendor/github.com/gobwas/glob/match/debug/debug.go +++ /dev/null @@ -1,55 +0,0 @@ -package debug - -import ( - "bytes" - "fmt" - "github.com/gobwas/glob/match" - "math/rand" -) - -func Graphviz(pattern string, m match.Matcher) string { - return fmt.Sprintf(`digraph G {graph[label="%s"];%s}`, pattern, graphviz_internal(m, fmt.Sprintf("%x", rand.Int63()))) -} - -func graphviz_internal(m match.Matcher, id string) string { - buf := &bytes.Buffer{} - - switch matcher := m.(type) { - case match.BTree: - fmt.Fprintf(buf, `"%s"[label="%s"];`, id, matcher.Value.String()) - for _, m := range []match.Matcher{matcher.Left, matcher.Right} { - switch n := m.(type) { - case nil: - rnd := rand.Int63() - fmt.Fprintf(buf, `"%x"[label=""];`, rnd) - fmt.Fprintf(buf, `"%s"->"%x";`, id, rnd) - - default: - sub := fmt.Sprintf("%x", rand.Int63()) - fmt.Fprintf(buf, `"%s"->"%s";`, id, sub) - fmt.Fprintf(buf, graphviz_internal(n, sub)) - } - } - - case match.AnyOf: - fmt.Fprintf(buf, `"%s"[label="AnyOf"];`, id) - for _, m := range matcher.Matchers { - rnd := rand.Int63() - fmt.Fprintf(buf, graphviz_internal(m, fmt.Sprintf("%x", rnd))) - fmt.Fprintf(buf, `"%s"->"%x";`, id, rnd) - } - - case match.EveryOf: - fmt.Fprintf(buf, `"%s"[label="EveryOf"];`, id) - for _, m := range matcher.Matchers { - rnd := rand.Int63() - fmt.Fprintf(buf, graphviz_internal(m, fmt.Sprintf("%x", rnd))) - fmt.Fprintf(buf, `"%s"->"%x";`, id, rnd) - } - - default: - fmt.Fprintf(buf, `"%s"[label="%s"];`, id, m.String()) - } - - return buf.String() -} diff --git a/vendor/github.com/gobwas/glob/readme.md b/vendor/github.com/gobwas/glob/readme.md new file mode 100644 index 000000000..f58144e73 --- /dev/null +++ b/vendor/github.com/gobwas/glob/readme.md @@ -0,0 +1,148 @@ +# glob.[go](https://golang.org) + +[![GoDoc][godoc-image]][godoc-url] [![Build Status][travis-image]][travis-url] + +> Go Globbing Library. + +## Install + +```shell + go get github.com/gobwas/glob +``` + +## Example + +```go + +package main + +import "github.com/gobwas/glob" + +func main() { + var g glob.Glob + + // create simple glob + g = glob.MustCompile("*.github.com") + g.Match("api.github.com") // true + + // quote meta characters and then create simple glob + g = glob.MustCompile(glob.QuoteMeta("*.github.com")) + g.Match("*.github.com") // true + + // create new glob with set of delimiters as ["."] + g = glob.MustCompile("api.*.com", '.') + g.Match("api.github.com") // true + g.Match("api.gi.hub.com") // false + + // create new glob with set of delimiters as ["."] + // but now with super wildcard + g = glob.MustCompile("api.**.com", '.') + g.Match("api.github.com") // true + g.Match("api.gi.hub.com") // true + + // create glob with single symbol wildcard + g = glob.MustCompile("?at") + g.Match("cat") // true + g.Match("fat") // true + g.Match("at") // false + + // create glob with single symbol wildcard and delimiters ['f'] + g = glob.MustCompile("?at", 'f') + g.Match("cat") // true + g.Match("fat") // false + g.Match("at") // false + + // create glob with character-list matchers + g = glob.MustCompile("[abc]at") + g.Match("cat") // true + g.Match("bat") // true + g.Match("fat") // false + g.Match("at") // false + + // create glob with character-list matchers + g = glob.MustCompile("[!abc]at") + g.Match("cat") // false + g.Match("bat") // false + g.Match("fat") // true + g.Match("at") // false + + // create glob with character-range matchers + g = glob.MustCompile("[a-c]at") + g.Match("cat") // true + g.Match("bat") // true + g.Match("fat") // false + g.Match("at") // false + + // create glob with character-range matchers + g = glob.MustCompile("[!a-c]at") + g.Match("cat") // false + g.Match("bat") // false + g.Match("fat") // true + g.Match("at") // false + + // create glob with pattern-alternatives list + g = glob.MustCompile("{cat,bat,[fr]at}") + g.Match("cat") // true + g.Match("bat") // true + g.Match("fat") // true + g.Match("rat") // true + g.Match("at") // false + g.Match("zat") // false +} + +``` + +## Performance + +This library is created for compile-once patterns. This means, that compilation could take time, but +strings matching is done faster, than in case when always parsing template. + +If you will not use compiled `glob.Glob` object, and do `g := glob.MustCompile(pattern); g.Match(...)` every time, then your code will be much more slower. + +Run `go test -bench=.` from source root to see the benchmarks: + +Pattern | Fixture | Match | Speed (ns/op) +--------|---------|-------|-------------- +`[a-z][!a-x]*cat*[h][!b]*eyes*` | `my cat has very bright eyes` | `true` | 432 +`[a-z][!a-x]*cat*[h][!b]*eyes*` | `my dog has very bright eyes` | `false` | 199 +`https://*.google.*` | `https://account.google.com` | `true` | 96 +`https://*.google.*` | `https://google.com` | `false` | 66 +`{https://*.google.*,*yandex.*,*yahoo.*,*mail.ru}` | `http://yahoo.com` | `true` | 163 +`{https://*.google.*,*yandex.*,*yahoo.*,*mail.ru}` | `http://google.com` | `false` | 197 +`{https://*gobwas.com,http://exclude.gobwas.com}` | `https://safe.gobwas.com` | `true` | 22 +`{https://*gobwas.com,http://exclude.gobwas.com}` | `http://safe.gobwas.com` | `false` | 24 +`abc*` | `abcdef` | `true` | 8.15 +`abc*` | `af` | `false` | 5.68 +`*def` | `abcdef` | `true` | 8.84 +`*def` | `af` | `false` | 5.74 +`ab*ef` | `abcdef` | `true` | 15.2 +`ab*ef` | `af` | `false` | 10.4 + +The same things with `regexp` package: + +Pattern | Fixture | Match | Speed (ns/op) +--------|---------|-------|-------------- +`^[a-z][^a-x].*cat.*[h][^b].*eyes.*$` | `my cat has very bright eyes` | `true` | 2553 +`^[a-z][^a-x].*cat.*[h][^b].*eyes.*$` | `my dog has very bright eyes` | `false` | 1383 +`^https:\/\/.*\.google\..*$` | `https://account.google.com` | `true` | 1205 +`^https:\/\/.*\.google\..*$` | `https://google.com` | `false` | 767 +`^(https:\/\/.*\.google\..*|.*yandex\..*|.*yahoo\..*|.*mail\.ru)$` | `http://yahoo.com` | `true` | 1435 +`^(https:\/\/.*\.google\..*|.*yandex\..*|.*yahoo\..*|.*mail\.ru)$` | `http://google.com` | `false` | 1674 +`^(https:\/\/.*gobwas\.com|http://exclude.gobwas.com)$` | `https://safe.gobwas.com` | `true` | 1039 +`^(https:\/\/.*gobwas\.com|http://exclude.gobwas.com)$` | `http://safe.gobwas.com` | `false` | 272 +`^abc.*$` | `abcdef` | `true` | 237 +`^abc.*$` | `af` | `false` | 100 +`^.*def$` | `abcdef` | `true` | 464 +`^.*def$` | `af` | `false` | 265 +`^ab.*ef$` | `abcdef` | `true` | 375 +`^ab.*ef$` | `af` | `false` | 145 + +[godoc-image]: https://godoc.org/github.com/gobwas/glob?status.svg +[godoc-url]: https://godoc.org/github.com/gobwas/glob +[travis-image]: https://travis-ci.org/gobwas/glob.svg?branch=master +[travis-url]: https://travis-ci.org/gobwas/glob + +## Syntax + +Syntax is inspired by [standard wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm), +except that `**` is aka super-asterisk, that do not sensitive for separators. \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/.gitignore b/vendor/github.com/gogo/protobuf/.gitignore deleted file mode 100644 index 76009479d..000000000 --- a/vendor/github.com/gogo/protobuf/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -._* -*.js -*.js.map diff --git a/vendor/github.com/gogo/protobuf/.mailmap b/vendor/github.com/gogo/protobuf/.mailmap deleted file mode 100644 index bc0010219..000000000 --- a/vendor/github.com/gogo/protobuf/.mailmap +++ /dev/null @@ -1,8 +0,0 @@ -Walter Schulze Walter Schulze -Walter Schulze -Walter Schulze awalterschulze -Walter Schulze awalterschulze@gmail.com -John Tuley -Anton Povarov -Denis Smirnov dennwc -DongYun Kang \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/.travis.yml b/vendor/github.com/gogo/protobuf/.travis.yml deleted file mode 100644 index 12302e006..000000000 --- a/vendor/github.com/gogo/protobuf/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -env: - - PROTOBUF_VERSION=2.6.1 - - PROTOBUF_VERSION=3.0.2 - - PROTOBUF_VERSION=3.5.1 - -before_install: - - ./install-protobuf.sh - - PATH=/home/travis/bin:$PATH protoc --version - -script: - - PATH=/home/travis/bin:$PATH make buildserverall - - echo $TRAVIS_GO_VERSION - - if [[ "$PROTOBUF_VERSION" == "3.5.1" ]] && [[ "$TRAVIS_GO_VERSION" =~ ^1\.9\.[0-9]+$ ]]; then ! git status --porcelain | read || (git status; git diff; exit 1); fi - -language: go - -go: - - 1.8.x - - 1.9.x - - 1.10beta1 diff --git a/vendor/github.com/gogo/protobuf/Makefile b/vendor/github.com/gogo/protobuf/Makefile deleted file mode 100644 index 1d9ad1f56..000000000 --- a/vendor/github.com/gogo/protobuf/Makefile +++ /dev/null @@ -1,162 +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. - -GO_VERSION:=$(shell go version) - -.PHONY: nuke regenerate tests clean install gofmt vet contributors - -all: clean install regenerate install tests errcheck vet - -buildserverall: clean install regenerate install tests vet js - -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-gen-gostring - go install ./protoc-min-version - go install ./protoc-gen-combo - go install ./gogoreplace - -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 protoc-gen-gogo/testdata regenerate - make -C gogoproto regenerate - make -C proto/testdata regenerate - make -C jsonpb/jsonpb_test_proto regenerate - make -C _conformance regenerate - make -C types 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/enumcustomname regenerate - make -C test/packed regenerate - make -C test/protosize regenerate - make -C test/tags regenerate - make -C test/oneof regenerate - make -C test/oneof3 regenerate - make -C test/theproto3 regenerate - make -C test/mapdefaults 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/importduplicate 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 -C test/filedotname regenerate - make -C test/nopackage regenerate - make -C test/types regenerate - make -C test/proto3extension regenerate - make -C test/stdtypes regenerate - make -C test/data regenerate - make -C test/typedecl regenerate - make -C test/issue260 regenerate - make -C test/issue261 regenerate - make -C test/issue262 regenerate - make -C test/issue312 regenerate - make -C test/enumdecl regenerate - make -C test/typedecl_all regenerate - make -C test/enumdecl_all regenerate - make -C test/int64support regenerate - make -C test/issue322 regenerate - make -C test/issue330 regenerate - make gofmt - -tests: - go build ./test/enumprefix - go test ./... - (cd test/stdtypes && make test) - -vet: - go vet ./... - go tool vet --shadow . - -errcheck: - go get github.com/kisielk/errcheck - errcheck ./test/... - -drone: - sudo apt-get install protobuf-compiler - (cd $(GOPATH)/src/github.com/gogo/protobuf && make buildserverall) - -testall: - go get -u github.com/golang/protobuf/proto - make -C protoc-gen-gogo/testdata test - make -C vanity/test test - make -C test/registration test - make tests - -bench: - go get golang.org/x/tools/cmd/benchcmp - (cd test/mixbench && go build .) - ./test/mixbench/mixbench - -contributors: - git log --format='%aN <%aE>' | sort -fu > CONTRIBUTORS - -js: -ifeq (go1.9, $(findstring go1.9, $(GO_VERSION))) - go get -u github.com/gopherjs/gopherjs - gopherjs build github.com/gogo/protobuf/protoc-gen-gogo -endif - -update: - (cd protobuf && make update) diff --git a/vendor/github.com/gogo/protobuf/README b/vendor/github.com/gogo/protobuf/README deleted file mode 100644 index 035426df5..000000000 --- a/vendor/github.com/gogo/protobuf/README +++ /dev/null @@ -1,258 +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/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. - -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. - -Consider file test.proto, containing - -```proto - syntax = "proto2"; - 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, - -```go - 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), - Reps: []int64{1, 2, 3}, - 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. - } -``` - - -## Parameters ## - -To pass extra parameters to the plugin, use a comma-separated -parameter list separated from the output directory by a colon: - - - protoc --gogo_out=plugins=grpc,import_path=mypackage:. *.proto - - -- `import_prefix=xxx` - a prefix that is added onto the beginning of - all imports. Useful for things like generating protos in a - subdirectory, or regenerating vendored protobufs in-place. -- `import_path=foo/bar` - used as the package if no input files - declare `go_package`. If it contains slashes, everything up to the - rightmost slash is ignored. -- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to - load. The only plugin in this repo is `grpc`. -- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is - associated with Go package quux/shme. This is subject to the - import_prefix parameter. - -## 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 - -## Compatibility ## - -The library and the generated code are expected to be stable over time. -However, we reserve the right to make breaking changes without notice for the -following reasons: - -- Security. A security issue in the specification or implementation may come to - light whose resolution requires breaking compatibility. We reserve the right - to address such security issues. -- Unspecified behavior. There are some aspects of the Protocol Buffers - specification that are undefined. Programs that depend on such unspecified - behavior may break in future releases. -- Specification errors or changes. If it becomes necessary to address an - inconsistency, incompleteness, or change in the Protocol Buffers - specification, resolving the issue could affect the meaning or legality of - existing programs. We reserve the right to address such issues, including - updating the implementations. -- Bugs. If the library has a bug that violates the specification, a program - that depends on the buggy behavior may break if the bug is fixed. We reserve - the right to fix such bugs. -- Adding methods or fields to generated structs. These may conflict with field - names that already exist in a schema, causing applications to break. When the - code generator encounters a field in the schema that would collide with a - generated field or method name, the code generator will append an underscore - to the generated field or method name. -- Adding, removing, or changing methods or fields in generated structs that - start with `XXX`. These parts of the generated code are exported out of - necessity, but should not be considered part of the public API. -- Adding, removing, or changing unexported symbols in generated code. - -Any breaking changes outside of these will be announced 6 months in advance to -protobuf@googlegroups.com. - -You should, whenever possible, use generated code created by the `protoc-gen-go` -tool built at the same commit as the `proto` package. The `proto` package -declares package-level constants in the form `ProtoPackageIsVersionX`. -Application code and generated code may depend on one of these constants to -ensure that compilation will fail if the available version of the proto library -is too old. Whenever we make a change to the generated code that requires newer -library support, in the same commit we will increment the version number of the -generated code and declare a new package-level constant whose name incorporates -the latest version number. Removing a compatibility constant is considered a -breaking change and would be subject to the announcement policy stated above. - -## Plugins ## - -The `protoc-gen-go/generator` package exposes a plugin interface, -which is used by the gRPC code generation. This interface is not -supported and is subject to incompatible changes without notice. diff --git a/vendor/github.com/gogo/protobuf/Readme.md b/vendor/github.com/gogo/protobuf/Readme.md deleted file mode 100644 index bb0dbb5d4..000000000 --- a/vendor/github.com/gogo/protobuf/Readme.md +++ /dev/null @@ -1,129 +0,0 @@ -# Protocol Buffers for Go with Gadgets - -[![Build Status](https://travis-ci.org/gogo/protobuf.svg?branch=master)](https://travis-ci.org/gogo/protobuf) - -gogoprotobuf is a fork of golang/protobuf with extra code generation features. - -This code generation is used to achieve: - - - fast marshalling and unmarshalling - - more canonical Go structures - - goprotobuf compatibility - - less typing by optionally generating extra helper code - - peace of mind by optionally generating test and benchmark code - - other serialization formats - -Keeping track of how up to date gogoprotobuf is relative to golang/protobuf is done in this -issue - -## Users - -These projects use gogoprotobuf: - - - etcd - blog - sample proto file - - spacemonkey - blog - - badoo - sample proto file - - mesos-go - sample proto file - - heka - the switch from golang/protobuf to gogo/protobuf when it was still on code.google.com - - cockroachdb - sample proto file - - go-ipfs - sample proto file - - rkive-go - sample proto file - - dropbox - - srclib - sample proto file - - adyoulike - - cloudfoundry - sample proto file - - kubernetes - go2idl built on top of gogoprotobuf - - dgraph - release notes - benchmarks - - centrifugo - release notes - blog - - docker swarmkit - sample proto file - - nats.io - go-nats-streaming - - tidb - Communication between tidb and tikv - - protoactor-go - vanity command that also generates actors from service definitions - - containerd - vanity command with custom field names that conforms to the golang convention. - - nakama - - proteus - - carbonzipper stack - - sendgrid - - zero-os/0-stor - -Please let us know if you are using gogoprotobuf by posting on our GoogleGroup. - -### Mentioned - - - Cloudflare - go serialization talk - Albert Strasheim - - GopherCon 2014 Writing High Performance Databases in Go by Ben Johnson - - alecthomas' go serialization benchmarks - -## Getting Started - -There are several ways to use gogoprotobuf, but for all you need to install go and protoc. -After that you can choose: - - - Speed - - More Speed and more generated code - - Most Speed and most customization - -### Installation - -To install it, you must first have Go (at least version 1.6.3) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). Latest patch versions of Go 1.8, 1.9 and 1.10 are continuously 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.6.1, 3.0.2 and 3.5.1 are continuously tested. - -### Speed - -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 your protocol buffers. - - protoc --gofast_out=. myproto.proto - -This does not allow you to use any of the other gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). - -### More Speed and more generated code - -Fields without pointers cause less time in the garbage collector. -More code generation results in more convenient methods. - -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) - -Installing any of these binaries is easy. Simply run: - - go get github.com/gogo/protobuf/proto - go get github.com/gogo/protobuf/{binary} - go get github.com/gogo/protobuf/gogoproto - -These binaries allow you to use gogoprotobuf [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md). You can also use your own binary. - -To generate the code, you also need to set the include path properly. - - protoc -I=. -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf --{binary}_out=. myproto.proto - -Note that in the protoc command, {binary} does not contain the initial prefix of "protoc-gen". - -### Most Speed and most customization - -Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize. -gogoprotobuf also offers more serialization formats and generation of tests and even more methods. - -Please visit the [extensions](https://github.com/gogo/protobuf/blob/master/extensions.md) page for more documentation. - -Install protoc-gen-gogo: - - go get github.com/gogo/protobuf/proto - go get github.com/gogo/protobuf/jsonpb - go get github.com/gogo/protobuf/protoc-gen-gogo - go get github.com/gogo/protobuf/gogoproto - -## 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/github.com/gogo/protobuf/_conformance/Makefile b/vendor/github.com/gogo/protobuf/_conformance/Makefile deleted file mode 100644 index 74aa200ef..000000000 --- a/vendor/github.com/gogo/protobuf/_conformance/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# Go support for Protocol Buffers - Google's data interchange format -# -# Copyright 2016 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" --proto_path=$(GOPATH)/src:$(GOPATH)/src/github.com/gogo/protobuf/protobuf:. --gogo_out=\ - Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types\ - :. conformance_proto/conformance.proto diff --git a/vendor/github.com/gogo/protobuf/_conformance/conformance.go b/vendor/github.com/gogo/protobuf/_conformance/conformance.go deleted file mode 100644 index 45b37881b..000000000 --- a/vendor/github.com/gogo/protobuf/_conformance/conformance.go +++ /dev/null @@ -1,161 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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. - -// conformance implements the conformance test subprocess protocol as -// documented in conformance.proto. -package main - -import ( - "encoding/binary" - "fmt" - "io" - "os" - - pb "github.com/gogo/protobuf/_conformance/conformance_proto" - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -func main() { - var sizeBuf [4]byte - inbuf := make([]byte, 0, 4096) - outbuf := proto.NewBuffer(nil) - for { - if _, err := io.ReadFull(os.Stdin, sizeBuf[:]); err == io.EOF { - break - } else if err != nil { - fmt.Fprintln(os.Stderr, "go conformance: read request:", err) - os.Exit(1) - } - size := binary.LittleEndian.Uint32(sizeBuf[:]) - if int(size) > cap(inbuf) { - inbuf = make([]byte, size) - } - inbuf = inbuf[:size] - if _, err := io.ReadFull(os.Stdin, inbuf); err != nil { - fmt.Fprintln(os.Stderr, "go conformance: read request:", err) - os.Exit(1) - } - - req := new(pb.ConformanceRequest) - if err := proto.Unmarshal(inbuf, req); err != nil { - fmt.Fprintln(os.Stderr, "go conformance: parse request:", err) - os.Exit(1) - } - res := handle(req) - - if err := outbuf.Marshal(res); err != nil { - fmt.Fprintln(os.Stderr, "go conformance: marshal response:", err) - os.Exit(1) - } - binary.LittleEndian.PutUint32(sizeBuf[:], uint32(len(outbuf.Bytes()))) - if _, err := os.Stdout.Write(sizeBuf[:]); err != nil { - fmt.Fprintln(os.Stderr, "go conformance: write response:", err) - os.Exit(1) - } - if _, err := os.Stdout.Write(outbuf.Bytes()); err != nil { - fmt.Fprintln(os.Stderr, "go conformance: write response:", err) - os.Exit(1) - } - outbuf.Reset() - } -} - -var jsonMarshaler = jsonpb.Marshaler{ - OrigName: true, -} - -func handle(req *pb.ConformanceRequest) *pb.ConformanceResponse { - var err error - var msg pb.TestAllTypes - switch p := req.Payload.(type) { - case *pb.ConformanceRequest_ProtobufPayload: - err = proto.Unmarshal(p.ProtobufPayload, &msg) - case *pb.ConformanceRequest_JsonPayload: - err = jsonpb.UnmarshalString(p.JsonPayload, &msg) - if err != nil && err.Error() == "unmarshaling Any not supported yet" { - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_Skipped{ - Skipped: err.Error(), - }, - } - } - default: - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_RuntimeError{ - RuntimeError: "unknown request payload type", - }, - } - } - if err != nil { - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_ParseError{ - ParseError: err.Error(), - }, - } - } - switch req.RequestedOutputFormat { - case pb.WireFormat_PROTOBUF: - p, err := proto.Marshal(&msg) - if err != nil { - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_SerializeError{ - SerializeError: err.Error(), - }, - } - } - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_ProtobufPayload{ - ProtobufPayload: p, - }, - } - case pb.WireFormat_JSON: - p, err := jsonMarshaler.MarshalToString(&msg) - if err != nil { - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_SerializeError{ - SerializeError: err.Error(), - }, - } - } - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_JsonPayload{ - JsonPayload: p, - }, - } - default: - return &pb.ConformanceResponse{ - Result: &pb.ConformanceResponse_RuntimeError{ - RuntimeError: "unknown output format", - }, - } - } -} diff --git a/vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.pb.go b/vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.pb.go deleted file mode 100644 index 49c6fb329..000000000 --- a/vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.pb.go +++ /dev/null @@ -1,1889 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: conformance_proto/conformance.proto - -/* -Package conformance is a generated protocol buffer package. - -It is generated from these files: - conformance_proto/conformance.proto - -It has these top-level messages: - ConformanceRequest - ConformanceResponse - TestAllTypes - ForeignMessage -*/ -package conformance - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/gogo/protobuf/types" -import google_protobuf1 "github.com/gogo/protobuf/types" -import google_protobuf2 "github.com/gogo/protobuf/types" -import google_protobuf3 "github.com/gogo/protobuf/types" -import google_protobuf4 "github.com/gogo/protobuf/types" -import google_protobuf5 "github.com/gogo/protobuf/types" - -// 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 WireFormat int32 - -const ( - WireFormat_UNSPECIFIED WireFormat = 0 - WireFormat_PROTOBUF WireFormat = 1 - WireFormat_JSON WireFormat = 2 -) - -var WireFormat_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "PROTOBUF", - 2: "JSON", -} -var WireFormat_value = map[string]int32{ - "UNSPECIFIED": 0, - "PROTOBUF": 1, - "JSON": 2, -} - -func (x WireFormat) String() string { - return proto.EnumName(WireFormat_name, int32(x)) -} -func (WireFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptorConformance, []int{0} } - -type ForeignEnum int32 - -const ( - ForeignEnum_FOREIGN_FOO ForeignEnum = 0 - ForeignEnum_FOREIGN_BAR ForeignEnum = 1 - ForeignEnum_FOREIGN_BAZ ForeignEnum = 2 -) - -var ForeignEnum_name = map[int32]string{ - 0: "FOREIGN_FOO", - 1: "FOREIGN_BAR", - 2: "FOREIGN_BAZ", -} -var ForeignEnum_value = map[string]int32{ - "FOREIGN_FOO": 0, - "FOREIGN_BAR": 1, - "FOREIGN_BAZ": 2, -} - -func (x ForeignEnum) String() string { - return proto.EnumName(ForeignEnum_name, int32(x)) -} -func (ForeignEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorConformance, []int{1} } - -type TestAllTypes_NestedEnum int32 - -const ( - TestAllTypes_FOO TestAllTypes_NestedEnum = 0 - TestAllTypes_BAR TestAllTypes_NestedEnum = 1 - TestAllTypes_BAZ TestAllTypes_NestedEnum = 2 - TestAllTypes_NEG TestAllTypes_NestedEnum = -1 -) - -var TestAllTypes_NestedEnum_name = map[int32]string{ - 0: "FOO", - 1: "BAR", - 2: "BAZ", - -1: "NEG", -} -var TestAllTypes_NestedEnum_value = map[string]int32{ - "FOO": 0, - "BAR": 1, - "BAZ": 2, - "NEG": -1, -} - -func (x TestAllTypes_NestedEnum) String() string { - return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x)) -} -func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptorConformance, []int{2, 0} -} - -// Represents a single test case's input. The testee should: -// -// 1. parse this proto (which should always succeed) -// 2. parse the protobuf or JSON payload in "payload" (which may fail) -// 3. if the parse succeeded, serialize the message in the requested format. -type ConformanceRequest struct { - // The payload (whether protobuf of JSON) is always for a TestAllTypes proto - // (see below). - // - // Types that are valid to be assigned to Payload: - // *ConformanceRequest_ProtobufPayload - // *ConformanceRequest_JsonPayload - Payload isConformanceRequest_Payload `protobuf_oneof:"payload"` - // Which format should the testee serialize its message to? - RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,proto3,enum=conformance.WireFormat" json:"requested_output_format,omitempty"` -} - -func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} } -func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) } -func (*ConformanceRequest) ProtoMessage() {} -func (*ConformanceRequest) Descriptor() ([]byte, []int) { return fileDescriptorConformance, []int{0} } - -type isConformanceRequest_Payload interface { - isConformanceRequest_Payload() -} - -type ConformanceRequest_ProtobufPayload struct { - ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` -} -type ConformanceRequest_JsonPayload struct { - JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"` -} - -func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {} -func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {} - -func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload { - if m != nil { - return m.Payload - } - return nil -} - -func (m *ConformanceRequest) GetProtobufPayload() []byte { - if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok { - return x.ProtobufPayload - } - return nil -} - -func (m *ConformanceRequest) GetJsonPayload() string { - if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok { - return x.JsonPayload - } - return "" -} - -func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat { - if m != nil { - return m.RequestedOutputFormat - } - return WireFormat_UNSPECIFIED -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{ - (*ConformanceRequest_ProtobufPayload)(nil), - (*ConformanceRequest_JsonPayload)(nil), - } -} - -func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ConformanceRequest) - // payload - switch x := m.Payload.(type) { - case *ConformanceRequest_ProtobufPayload: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.ProtobufPayload) - case *ConformanceRequest_JsonPayload: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.JsonPayload) - case nil: - default: - return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x) - } - return nil -} - -func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ConformanceRequest) - switch tag { - case 1: // payload.protobuf_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Payload = &ConformanceRequest_ProtobufPayload{x} - return true, err - case 2: // payload.json_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Payload = &ConformanceRequest_JsonPayload{x} - return true, err - default: - return false, nil - } -} - -func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ConformanceRequest) - // payload - switch x := m.Payload.(type) { - case *ConformanceRequest_ProtobufPayload: - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) - n += len(x.ProtobufPayload) - case *ConformanceRequest_JsonPayload: - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.JsonPayload))) - n += len(x.JsonPayload) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// Represents a single test case's output. -type ConformanceResponse struct { - // Types that are valid to be assigned to Result: - // *ConformanceResponse_ParseError - // *ConformanceResponse_SerializeError - // *ConformanceResponse_RuntimeError - // *ConformanceResponse_ProtobufPayload - // *ConformanceResponse_JsonPayload - // *ConformanceResponse_Skipped - Result isConformanceResponse_Result `protobuf_oneof:"result"` -} - -func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} } -func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) } -func (*ConformanceResponse) ProtoMessage() {} -func (*ConformanceResponse) Descriptor() ([]byte, []int) { return fileDescriptorConformance, []int{1} } - -type isConformanceResponse_Result interface { - isConformanceResponse_Result() -} - -type ConformanceResponse_ParseError struct { - ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"` -} -type ConformanceResponse_SerializeError struct { - SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"` -} -type ConformanceResponse_RuntimeError struct { - RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"` -} -type ConformanceResponse_ProtobufPayload struct { - ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"` -} -type ConformanceResponse_JsonPayload struct { - JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"` -} -type ConformanceResponse_Skipped struct { - Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"` -} - -func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {} -func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {} -func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {} -func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {} -func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {} -func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {} - -func (m *ConformanceResponse) GetResult() isConformanceResponse_Result { - if m != nil { - return m.Result - } - return nil -} - -func (m *ConformanceResponse) GetParseError() string { - if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok { - return x.ParseError - } - return "" -} - -func (m *ConformanceResponse) GetSerializeError() string { - if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok { - return x.SerializeError - } - return "" -} - -func (m *ConformanceResponse) GetRuntimeError() string { - if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok { - return x.RuntimeError - } - return "" -} - -func (m *ConformanceResponse) GetProtobufPayload() []byte { - if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok { - return x.ProtobufPayload - } - return nil -} - -func (m *ConformanceResponse) GetJsonPayload() string { - if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok { - return x.JsonPayload - } - return "" -} - -func (m *ConformanceResponse) GetSkipped() string { - if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok { - return x.Skipped - } - return "" -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ConformanceResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{ - (*ConformanceResponse_ParseError)(nil), - (*ConformanceResponse_SerializeError)(nil), - (*ConformanceResponse_RuntimeError)(nil), - (*ConformanceResponse_ProtobufPayload)(nil), - (*ConformanceResponse_JsonPayload)(nil), - (*ConformanceResponse_Skipped)(nil), - } -} - -func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ConformanceResponse) - // result - switch x := m.Result.(type) { - case *ConformanceResponse_ParseError: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.ParseError) - case *ConformanceResponse_SerializeError: - _ = b.EncodeVarint(6<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.SerializeError) - case *ConformanceResponse_RuntimeError: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.RuntimeError) - case *ConformanceResponse_ProtobufPayload: - _ = b.EncodeVarint(3<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.ProtobufPayload) - case *ConformanceResponse_JsonPayload: - _ = b.EncodeVarint(4<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.JsonPayload) - case *ConformanceResponse_Skipped: - _ = b.EncodeVarint(5<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.Skipped) - case nil: - default: - return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x) - } - return nil -} - -func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ConformanceResponse) - switch tag { - case 1: // result.parse_error - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_ParseError{x} - return true, err - case 6: // result.serialize_error - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_SerializeError{x} - return true, err - case 2: // result.runtime_error - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_RuntimeError{x} - return true, err - case 3: // result.protobuf_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.Result = &ConformanceResponse_ProtobufPayload{x} - return true, err - case 4: // result.json_payload - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_JsonPayload{x} - return true, err - case 5: // result.skipped - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Result = &ConformanceResponse_Skipped{x} - return true, err - default: - return false, nil - } -} - -func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ConformanceResponse) - // result - switch x := m.Result.(type) { - case *ConformanceResponse_ParseError: - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.ParseError))) - n += len(x.ParseError) - case *ConformanceResponse_SerializeError: - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.SerializeError))) - n += len(x.SerializeError) - case *ConformanceResponse_RuntimeError: - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.RuntimeError))) - n += len(x.RuntimeError) - case *ConformanceResponse_ProtobufPayload: - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.ProtobufPayload))) - n += len(x.ProtobufPayload) - case *ConformanceResponse_JsonPayload: - n += proto.SizeVarint(4<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.JsonPayload))) - n += len(x.JsonPayload) - case *ConformanceResponse_Skipped: - n += proto.SizeVarint(5<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Skipped))) - n += len(x.Skipped) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -// This proto includes every type of field in both singular and repeated -// forms. -type TestAllTypes struct { - // Singular - OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"` - OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"` - OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"` - OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"` - OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"` - OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"` - OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"` - OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"` - OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"` - OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"` - OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"` - OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"` - OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"` - OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"` - OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"` - OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage" json:"optional_nested_message,omitempty"` - OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage" json:"optional_foreign_message,omitempty"` - OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"` - OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,proto3,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"` - OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece,proto3" json:"optional_string_piece,omitempty"` - OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord,proto3" json:"optional_cord,omitempty"` - RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage" json:"recursive_message,omitempty"` - // Repeated - RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32" json:"repeated_int32,omitempty"` - RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64" json:"repeated_int64,omitempty"` - RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32" json:"repeated_uint32,omitempty"` - RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64" json:"repeated_uint64,omitempty"` - RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32" json:"repeated_sint32,omitempty"` - RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64" json:"repeated_sint64,omitempty"` - RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32" json:"repeated_fixed32,omitempty"` - RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64" json:"repeated_fixed64,omitempty"` - RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32" json:"repeated_sfixed32,omitempty"` - RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64" json:"repeated_sfixed64,omitempty"` - RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat" json:"repeated_float,omitempty"` - RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble" json:"repeated_double,omitempty"` - RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool" json:"repeated_bool,omitempty"` - RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString" json:"repeated_string,omitempty"` - RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes" json:"repeated_bytes,omitempty"` - RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage" json:"repeated_nested_message,omitempty"` - RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage" json:"repeated_foreign_message,omitempty"` - RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` - RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"` - RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece" json:"repeated_string_piece,omitempty"` - RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord" json:"repeated_cord,omitempty"` - // Map - MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"` - MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"` - MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"` - MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` - MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.TestAllTypes_NestedEnum"` - MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.ForeignEnum"` - // Types that are valid to be assigned to OneofField: - // *TestAllTypes_OneofUint32 - // *TestAllTypes_OneofNestedMessage - // *TestAllTypes_OneofString - // *TestAllTypes_OneofBytes - // *TestAllTypes_OneofBool - // *TestAllTypes_OneofUint64 - // *TestAllTypes_OneofFloat - // *TestAllTypes_OneofDouble - // *TestAllTypes_OneofEnum - OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"` - // Well-known types - OptionalBoolWrapper *google_protobuf5.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper" json:"optional_bool_wrapper,omitempty"` - OptionalInt32Wrapper *google_protobuf5.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper" json:"optional_int32_wrapper,omitempty"` - OptionalInt64Wrapper *google_protobuf5.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper" json:"optional_int64_wrapper,omitempty"` - OptionalUint32Wrapper *google_protobuf5.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper" json:"optional_uint32_wrapper,omitempty"` - OptionalUint64Wrapper *google_protobuf5.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper" json:"optional_uint64_wrapper,omitempty"` - OptionalFloatWrapper *google_protobuf5.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper" json:"optional_float_wrapper,omitempty"` - OptionalDoubleWrapper *google_protobuf5.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper" json:"optional_double_wrapper,omitempty"` - OptionalStringWrapper *google_protobuf5.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper" json:"optional_string_wrapper,omitempty"` - OptionalBytesWrapper *google_protobuf5.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper" json:"optional_bytes_wrapper,omitempty"` - RepeatedBoolWrapper []*google_protobuf5.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper" json:"repeated_bool_wrapper,omitempty"` - RepeatedInt32Wrapper []*google_protobuf5.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper" json:"repeated_int32_wrapper,omitempty"` - RepeatedInt64Wrapper []*google_protobuf5.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper" json:"repeated_int64_wrapper,omitempty"` - RepeatedUint32Wrapper []*google_protobuf5.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper" json:"repeated_uint32_wrapper,omitempty"` - RepeatedUint64Wrapper []*google_protobuf5.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper" json:"repeated_uint64_wrapper,omitempty"` - RepeatedFloatWrapper []*google_protobuf5.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper" json:"repeated_float_wrapper,omitempty"` - RepeatedDoubleWrapper []*google_protobuf5.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper" json:"repeated_double_wrapper,omitempty"` - RepeatedStringWrapper []*google_protobuf5.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper" json:"repeated_string_wrapper,omitempty"` - RepeatedBytesWrapper []*google_protobuf5.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper" json:"repeated_bytes_wrapper,omitempty"` - OptionalDuration *google_protobuf1.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration" json:"optional_duration,omitempty"` - OptionalTimestamp *google_protobuf4.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp" json:"optional_timestamp,omitempty"` - OptionalFieldMask *google_protobuf2.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask" json:"optional_field_mask,omitempty"` - OptionalStruct *google_protobuf3.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct" json:"optional_struct,omitempty"` - OptionalAny *google_protobuf.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny" json:"optional_any,omitempty"` - OptionalValue *google_protobuf3.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue" json:"optional_value,omitempty"` - RepeatedDuration []*google_protobuf1.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration" json:"repeated_duration,omitempty"` - RepeatedTimestamp []*google_protobuf4.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp" json:"repeated_timestamp,omitempty"` - RepeatedFieldmask []*google_protobuf2.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask" json:"repeated_fieldmask,omitempty"` - RepeatedStruct []*google_protobuf3.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct" json:"repeated_struct,omitempty"` - RepeatedAny []*google_protobuf.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny" json:"repeated_any,omitempty"` - RepeatedValue []*google_protobuf3.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue" json:"repeated_value,omitempty"` - // Test field-name-to-JSON-name convention. - // (protobuf says names can be any valid C/C++ identifier.) - Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"` - FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"` - XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"` - Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"` - Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"` - Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"` - FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"` - FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"` - Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"` - Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"` - FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"` - FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"` - XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13,proto3" json:"__field_name13,omitempty"` - X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14,proto3" json:"__Field_name14,omitempty"` - Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15,proto3" json:"field__name15,omitempty"` - Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16,proto3" json:"field__Name16,omitempty"` - FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17,proto3" json:"field_name17__,omitempty"` - FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18,proto3" json:"Field_name18__,omitempty"` -} - -func (m *TestAllTypes) Reset() { *m = TestAllTypes{} } -func (m *TestAllTypes) String() string { return proto.CompactTextString(m) } -func (*TestAllTypes) ProtoMessage() {} -func (*TestAllTypes) Descriptor() ([]byte, []int) { return fileDescriptorConformance, []int{2} } - -type isTestAllTypes_OneofField interface { - isTestAllTypes_OneofField() -} - -type TestAllTypes_OneofUint32 struct { - OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"` -} -type TestAllTypes_OneofNestedMessage struct { - OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,oneof"` -} -type TestAllTypes_OneofString struct { - OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"` -} -type TestAllTypes_OneofBytes struct { - OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"` -} -type TestAllTypes_OneofBool struct { - OneofBool bool `protobuf:"varint,115,opt,name=oneof_bool,json=oneofBool,proto3,oneof"` -} -type TestAllTypes_OneofUint64 struct { - OneofUint64 uint64 `protobuf:"varint,116,opt,name=oneof_uint64,json=oneofUint64,proto3,oneof"` -} -type TestAllTypes_OneofFloat struct { - OneofFloat float32 `protobuf:"fixed32,117,opt,name=oneof_float,json=oneofFloat,proto3,oneof"` -} -type TestAllTypes_OneofDouble struct { - OneofDouble float64 `protobuf:"fixed64,118,opt,name=oneof_double,json=oneofDouble,proto3,oneof"` -} -type TestAllTypes_OneofEnum struct { - OneofEnum TestAllTypes_NestedEnum `protobuf:"varint,119,opt,name=oneof_enum,json=oneofEnum,proto3,enum=conformance.TestAllTypes_NestedEnum,oneof"` -} - -func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofBool) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofUint64) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofFloat) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofDouble) isTestAllTypes_OneofField() {} -func (*TestAllTypes_OneofEnum) isTestAllTypes_OneofField() {} - -func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField { - if m != nil { - return m.OneofField - } - return nil -} - -func (m *TestAllTypes) GetOptionalInt32() int32 { - if m != nil { - return m.OptionalInt32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalInt64() int64 { - if m != nil { - return m.OptionalInt64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalUint32() uint32 { - if m != nil { - return m.OptionalUint32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalUint64() uint64 { - if m != nil { - return m.OptionalUint64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSint32() int32 { - if m != nil { - return m.OptionalSint32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSint64() int64 { - if m != nil { - return m.OptionalSint64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalFixed32() uint32 { - if m != nil { - return m.OptionalFixed32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalFixed64() uint64 { - if m != nil { - return m.OptionalFixed64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSfixed32() int32 { - if m != nil { - return m.OptionalSfixed32 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalSfixed64() int64 { - if m != nil { - return m.OptionalSfixed64 - } - return 0 -} - -func (m *TestAllTypes) GetOptionalFloat() float32 { - if m != nil { - return m.OptionalFloat - } - return 0 -} - -func (m *TestAllTypes) GetOptionalDouble() float64 { - if m != nil { - return m.OptionalDouble - } - return 0 -} - -func (m *TestAllTypes) GetOptionalBool() bool { - if m != nil { - return m.OptionalBool - } - return false -} - -func (m *TestAllTypes) GetOptionalString() string { - if m != nil { - return m.OptionalString - } - return "" -} - -func (m *TestAllTypes) GetOptionalBytes() []byte { - if m != nil { - return m.OptionalBytes - } - return nil -} - -func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage { - if m != nil { - return m.OptionalNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage { - if m != nil { - return m.OptionalForeignMessage - } - return nil -} - -func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum { - if m != nil { - return m.OptionalNestedEnum - } - return TestAllTypes_FOO -} - -func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum { - if m != nil { - return m.OptionalForeignEnum - } - return ForeignEnum_FOREIGN_FOO -} - -func (m *TestAllTypes) GetOptionalStringPiece() string { - if m != nil { - return m.OptionalStringPiece - } - return "" -} - -func (m *TestAllTypes) GetOptionalCord() string { - if m != nil { - return m.OptionalCord - } - return "" -} - -func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes { - if m != nil { - return m.RecursiveMessage - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt32() []int32 { - if m != nil { - return m.RepeatedInt32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt64() []int64 { - if m != nil { - return m.RepeatedInt64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint32() []uint32 { - if m != nil { - return m.RepeatedUint32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint64() []uint64 { - if m != nil { - return m.RepeatedUint64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSint32() []int32 { - if m != nil { - return m.RepeatedSint32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSint64() []int64 { - if m != nil { - return m.RepeatedSint64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFixed32() []uint32 { - if m != nil { - return m.RepeatedFixed32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFixed64() []uint64 { - if m != nil { - return m.RepeatedFixed64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSfixed32() []int32 { - if m != nil { - return m.RepeatedSfixed32 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedSfixed64() []int64 { - if m != nil { - return m.RepeatedSfixed64 - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFloat() []float32 { - if m != nil { - return m.RepeatedFloat - } - return nil -} - -func (m *TestAllTypes) GetRepeatedDouble() []float64 { - if m != nil { - return m.RepeatedDouble - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBool() []bool { - if m != nil { - return m.RepeatedBool - } - return nil -} - -func (m *TestAllTypes) GetRepeatedString() []string { - if m != nil { - return m.RepeatedString - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBytes() [][]byte { - if m != nil { - return m.RepeatedBytes - } - return nil -} - -func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { - if m != nil { - return m.RepeatedNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage { - if m != nil { - return m.RepeatedForeignMessage - } - return nil -} - -func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { - if m != nil { - return m.RepeatedNestedEnum - } - return nil -} - -func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum { - if m != nil { - return m.RepeatedForeignEnum - } - return nil -} - -func (m *TestAllTypes) GetRepeatedStringPiece() []string { - if m != nil { - return m.RepeatedStringPiece - } - return nil -} - -func (m *TestAllTypes) GetRepeatedCord() []string { - if m != nil { - return m.RepeatedCord - } - return nil -} - -func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 { - if m != nil { - return m.MapInt32Int32 - } - return nil -} - -func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 { - if m != nil { - return m.MapInt64Int64 - } - return nil -} - -func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 { - if m != nil { - return m.MapUint32Uint32 - } - return nil -} - -func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 { - if m != nil { - return m.MapUint64Uint64 - } - return nil -} - -func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 { - if m != nil { - return m.MapSint32Sint32 - } - return nil -} - -func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 { - if m != nil { - return m.MapSint64Sint64 - } - return nil -} - -func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 { - if m != nil { - return m.MapFixed32Fixed32 - } - return nil -} - -func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 { - if m != nil { - return m.MapFixed64Fixed64 - } - return nil -} - -func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 { - if m != nil { - return m.MapSfixed32Sfixed32 - } - return nil -} - -func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 { - if m != nil { - return m.MapSfixed64Sfixed64 - } - return nil -} - -func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 { - if m != nil { - return m.MapInt32Float - } - return nil -} - -func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 { - if m != nil { - return m.MapInt32Double - } - return nil -} - -func (m *TestAllTypes) GetMapBoolBool() map[bool]bool { - if m != nil { - return m.MapBoolBool - } - return nil -} - -func (m *TestAllTypes) GetMapStringString() map[string]string { - if m != nil { - return m.MapStringString - } - return nil -} - -func (m *TestAllTypes) GetMapStringBytes() map[string][]byte { - if m != nil { - return m.MapStringBytes - } - return nil -} - -func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage { - if m != nil { - return m.MapStringNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage { - if m != nil { - return m.MapStringForeignMessage - } - return nil -} - -func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum { - if m != nil { - return m.MapStringNestedEnum - } - return nil -} - -func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum { - if m != nil { - return m.MapStringForeignEnum - } - return nil -} - -func (m *TestAllTypes) GetOneofUint32() uint32 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok { - return x.OneofUint32 - } - return 0 -} - -func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok { - return x.OneofNestedMessage - } - return nil -} - -func (m *TestAllTypes) GetOneofString() string { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok { - return x.OneofString - } - return "" -} - -func (m *TestAllTypes) GetOneofBytes() []byte { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok { - return x.OneofBytes - } - return nil -} - -func (m *TestAllTypes) GetOneofBool() bool { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofBool); ok { - return x.OneofBool - } - return false -} - -func (m *TestAllTypes) GetOneofUint64() uint64 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint64); ok { - return x.OneofUint64 - } - return 0 -} - -func (m *TestAllTypes) GetOneofFloat() float32 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofFloat); ok { - return x.OneofFloat - } - return 0 -} - -func (m *TestAllTypes) GetOneofDouble() float64 { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofDouble); ok { - return x.OneofDouble - } - return 0 -} - -func (m *TestAllTypes) GetOneofEnum() TestAllTypes_NestedEnum { - if x, ok := m.GetOneofField().(*TestAllTypes_OneofEnum); ok { - return x.OneofEnum - } - return TestAllTypes_FOO -} - -func (m *TestAllTypes) GetOptionalBoolWrapper() *google_protobuf5.BoolValue { - if m != nil { - return m.OptionalBoolWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalInt32Wrapper() *google_protobuf5.Int32Value { - if m != nil { - return m.OptionalInt32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalInt64Wrapper() *google_protobuf5.Int64Value { - if m != nil { - return m.OptionalInt64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalUint32Wrapper() *google_protobuf5.UInt32Value { - if m != nil { - return m.OptionalUint32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalUint64Wrapper() *google_protobuf5.UInt64Value { - if m != nil { - return m.OptionalUint64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalFloatWrapper() *google_protobuf5.FloatValue { - if m != nil { - return m.OptionalFloatWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalDoubleWrapper() *google_protobuf5.DoubleValue { - if m != nil { - return m.OptionalDoubleWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalStringWrapper() *google_protobuf5.StringValue { - if m != nil { - return m.OptionalStringWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalBytesWrapper() *google_protobuf5.BytesValue { - if m != nil { - return m.OptionalBytesWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBoolWrapper() []*google_protobuf5.BoolValue { - if m != nil { - return m.RepeatedBoolWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*google_protobuf5.Int32Value { - if m != nil { - return m.RepeatedInt32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*google_protobuf5.Int64Value { - if m != nil { - return m.RepeatedInt64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*google_protobuf5.UInt32Value { - if m != nil { - return m.RepeatedUint32Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*google_protobuf5.UInt64Value { - if m != nil { - return m.RepeatedUint64Wrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFloatWrapper() []*google_protobuf5.FloatValue { - if m != nil { - return m.RepeatedFloatWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*google_protobuf5.DoubleValue { - if m != nil { - return m.RepeatedDoubleWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedStringWrapper() []*google_protobuf5.StringValue { - if m != nil { - return m.RepeatedStringWrapper - } - return nil -} - -func (m *TestAllTypes) GetRepeatedBytesWrapper() []*google_protobuf5.BytesValue { - if m != nil { - return m.RepeatedBytesWrapper - } - return nil -} - -func (m *TestAllTypes) GetOptionalDuration() *google_protobuf1.Duration { - if m != nil { - return m.OptionalDuration - } - return nil -} - -func (m *TestAllTypes) GetOptionalTimestamp() *google_protobuf4.Timestamp { - if m != nil { - return m.OptionalTimestamp - } - return nil -} - -func (m *TestAllTypes) GetOptionalFieldMask() *google_protobuf2.FieldMask { - if m != nil { - return m.OptionalFieldMask - } - return nil -} - -func (m *TestAllTypes) GetOptionalStruct() *google_protobuf3.Struct { - if m != nil { - return m.OptionalStruct - } - return nil -} - -func (m *TestAllTypes) GetOptionalAny() *google_protobuf.Any { - if m != nil { - return m.OptionalAny - } - return nil -} - -func (m *TestAllTypes) GetOptionalValue() *google_protobuf3.Value { - if m != nil { - return m.OptionalValue - } - return nil -} - -func (m *TestAllTypes) GetRepeatedDuration() []*google_protobuf1.Duration { - if m != nil { - return m.RepeatedDuration - } - return nil -} - -func (m *TestAllTypes) GetRepeatedTimestamp() []*google_protobuf4.Timestamp { - if m != nil { - return m.RepeatedTimestamp - } - return nil -} - -func (m *TestAllTypes) GetRepeatedFieldmask() []*google_protobuf2.FieldMask { - if m != nil { - return m.RepeatedFieldmask - } - return nil -} - -func (m *TestAllTypes) GetRepeatedStruct() []*google_protobuf3.Struct { - if m != nil { - return m.RepeatedStruct - } - return nil -} - -func (m *TestAllTypes) GetRepeatedAny() []*google_protobuf.Any { - if m != nil { - return m.RepeatedAny - } - return nil -} - -func (m *TestAllTypes) GetRepeatedValue() []*google_protobuf3.Value { - if m != nil { - return m.RepeatedValue - } - return nil -} - -func (m *TestAllTypes) GetFieldname1() int32 { - if m != nil { - return m.Fieldname1 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName2() int32 { - if m != nil { - return m.FieldName2 - } - return 0 -} - -func (m *TestAllTypes) GetXFieldName3() int32 { - if m != nil { - return m.XFieldName3 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name4_() int32 { - if m != nil { - return m.Field_Name4_ - } - return 0 -} - -func (m *TestAllTypes) GetField0Name5() int32 { - if m != nil { - return m.Field0Name5 - } - return 0 -} - -func (m *TestAllTypes) GetField_0Name6() int32 { - if m != nil { - return m.Field_0Name6 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName7() int32 { - if m != nil { - return m.FieldName7 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName8() int32 { - if m != nil { - return m.FieldName8 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name9() int32 { - if m != nil { - return m.Field_Name9 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name10() int32 { - if m != nil { - return m.Field_Name10 - } - return 0 -} - -func (m *TestAllTypes) GetFIELD_NAME11() int32 { - if m != nil { - return m.FIELD_NAME11 - } - return 0 -} - -func (m *TestAllTypes) GetFIELDName12() int32 { - if m != nil { - return m.FIELDName12 - } - return 0 -} - -func (m *TestAllTypes) GetXFieldName13() int32 { - if m != nil { - return m.XFieldName13 - } - return 0 -} - -func (m *TestAllTypes) GetX_FieldName14() int32 { - if m != nil { - return m.X_FieldName14 - } - return 0 -} - -func (m *TestAllTypes) GetField_Name15() int32 { - if m != nil { - return m.Field_Name15 - } - return 0 -} - -func (m *TestAllTypes) GetField__Name16() int32 { - if m != nil { - return m.Field__Name16 - } - return 0 -} - -func (m *TestAllTypes) GetFieldName17__() int32 { - if m != nil { - return m.FieldName17__ - } - return 0 -} - -func (m *TestAllTypes) GetFieldName18__() int32 { - if m != nil { - return m.FieldName18__ - } - return 0 -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{ - (*TestAllTypes_OneofUint32)(nil), - (*TestAllTypes_OneofNestedMessage)(nil), - (*TestAllTypes_OneofString)(nil), - (*TestAllTypes_OneofBytes)(nil), - (*TestAllTypes_OneofBool)(nil), - (*TestAllTypes_OneofUint64)(nil), - (*TestAllTypes_OneofFloat)(nil), - (*TestAllTypes_OneofDouble)(nil), - (*TestAllTypes_OneofEnum)(nil), - } -} - -func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TestAllTypes) - // oneof_field - switch x := m.OneofField.(type) { - case *TestAllTypes_OneofUint32: - _ = b.EncodeVarint(111<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.OneofUint32)) - case *TestAllTypes_OneofNestedMessage: - _ = b.EncodeVarint(112<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.OneofNestedMessage); err != nil { - return err - } - case *TestAllTypes_OneofString: - _ = b.EncodeVarint(113<<3 | proto.WireBytes) - _ = b.EncodeStringBytes(x.OneofString) - case *TestAllTypes_OneofBytes: - _ = b.EncodeVarint(114<<3 | proto.WireBytes) - _ = b.EncodeRawBytes(x.OneofBytes) - case *TestAllTypes_OneofBool: - t := uint64(0) - if x.OneofBool { - t = 1 - } - _ = b.EncodeVarint(115<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *TestAllTypes_OneofUint64: - _ = b.EncodeVarint(116<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.OneofUint64)) - case *TestAllTypes_OneofFloat: - _ = b.EncodeVarint(117<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.OneofFloat))) - case *TestAllTypes_OneofDouble: - _ = b.EncodeVarint(118<<3 | proto.WireFixed64) - _ = b.EncodeFixed64(math.Float64bits(x.OneofDouble)) - case *TestAllTypes_OneofEnum: - _ = b.EncodeVarint(119<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.OneofEnum)) - case nil: - default: - return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x) - } - return nil -} - -func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TestAllTypes) - switch tag { - case 111: // oneof_field.oneof_uint32 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofUint32{uint32(x)} - return true, err - case 112: // oneof_field.oneof_nested_message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TestAllTypes_NestedMessage) - err := b.DecodeMessage(msg) - m.OneofField = &TestAllTypes_OneofNestedMessage{msg} - return true, err - case 113: // oneof_field.oneof_string - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.OneofField = &TestAllTypes_OneofString{x} - return true, err - case 114: // oneof_field.oneof_bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - m.OneofField = &TestAllTypes_OneofBytes{x} - return true, err - case 115: // oneof_field.oneof_bool - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofBool{x != 0} - return true, err - case 116: // oneof_field.oneof_uint64 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofUint64{x} - return true, err - case 117: // oneof_field.oneof_float - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.OneofField = &TestAllTypes_OneofFloat{math.Float32frombits(uint32(x))} - return true, err - case 118: // oneof_field.oneof_double - if wire != proto.WireFixed64 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed64() - m.OneofField = &TestAllTypes_OneofDouble{math.Float64frombits(x)} - return true, err - case 119: // oneof_field.oneof_enum - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.OneofField = &TestAllTypes_OneofEnum{TestAllTypes_NestedEnum(x)} - return true, err - default: - return false, nil - } -} - -func _TestAllTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TestAllTypes) - // oneof_field - switch x := m.OneofField.(type) { - case *TestAllTypes_OneofUint32: - n += proto.SizeVarint(111<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.OneofUint32)) - case *TestAllTypes_OneofNestedMessage: - s := proto.Size(x.OneofNestedMessage) - n += proto.SizeVarint(112<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *TestAllTypes_OneofString: - n += proto.SizeVarint(113<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.OneofString))) - n += len(x.OneofString) - case *TestAllTypes_OneofBytes: - n += proto.SizeVarint(114<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.OneofBytes))) - n += len(x.OneofBytes) - case *TestAllTypes_OneofBool: - n += proto.SizeVarint(115<<3 | proto.WireVarint) - n += 1 - case *TestAllTypes_OneofUint64: - n += proto.SizeVarint(116<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.OneofUint64)) - case *TestAllTypes_OneofFloat: - n += proto.SizeVarint(117<<3 | proto.WireFixed32) - n += 4 - case *TestAllTypes_OneofDouble: - n += proto.SizeVarint(118<<3 | proto.WireFixed64) - n += 8 - case *TestAllTypes_OneofEnum: - n += proto.SizeVarint(119<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.OneofEnum)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type TestAllTypes_NestedMessage struct { - A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"` - Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive" json:"corecursive,omitempty"` -} - -func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} } -func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) } -func (*TestAllTypes_NestedMessage) ProtoMessage() {} -func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { - return fileDescriptorConformance, []int{2, 0} -} - -func (m *TestAllTypes_NestedMessage) GetA() int32 { - if m != nil { - return m.A - } - return 0 -} - -func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes { - if m != nil { - return m.Corecursive - } - return nil -} - -type ForeignMessage struct { - C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"` -} - -func (m *ForeignMessage) Reset() { *m = ForeignMessage{} } -func (m *ForeignMessage) String() string { return proto.CompactTextString(m) } -func (*ForeignMessage) ProtoMessage() {} -func (*ForeignMessage) Descriptor() ([]byte, []int) { return fileDescriptorConformance, []int{3} } - -func (m *ForeignMessage) GetC() int32 { - if m != nil { - return m.C - } - return 0 -} - -func init() { - proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest") - proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse") - proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes") - proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage") - proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage") - proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value) - proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value) - proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value) -} - -func init() { proto.RegisterFile("conformance_proto/conformance.proto", fileDescriptorConformance) } - -var fileDescriptorConformance = []byte{ - // 2737 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x72, 0xdb, 0xc8, - 0xd5, 0x16, 0x08, 0x59, 0x4b, 0x93, 0x92, 0xa8, 0xd6, 0xd6, 0x96, 0x5d, 0x63,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 0x96, 0x6e, 0x03, 0x20, 0x4d, 0xf6, 0x46, 0x81, 0x59, - 0xdd, 0xdb, 0x2b, 0x0e, 0xe1, 0x5f, 0xca, 0x5b, 0x6e, 0xd1, 0xa0, 0xbf, 0x3c, 0x2f, 0xe6, 0xb0, - 0xbb, 0xdd, 0xca, 0xc3, 0xe2, 0x7f, 0xf9, 0x7f, 0x46, 0x79, 0x42, 0x8c, 0xa2, 0xf0, 0xa9, 0xb2, - 0xf4, 0x06, 0x98, 0xd4, 0x06, 0x92, 0x05, 0x60, 0xd4, 0xf9, 0x81, 0x52, 0xbf, 0x76, 0x13, 0x80, - 0xf8, 0xdf, 0x30, 0xc1, 0x29, 0x90, 0x3f, 0xd8, 0xdd, 0x7f, 0x52, 0xb9, 0xbf, 0x53, 0xdd, 0xa9, - 0x3c, 0x28, 0x0e, 0xc1, 0x02, 0x18, 0x7b, 0xe2, 0xee, 0x3d, 0xdd, 0x2b, 0x1f, 0x54, 0x8b, 0x06, - 0x1c, 0x03, 0xc3, 0x8f, 0xf6, 0xf7, 0x76, 0x8b, 0xb9, 0x6b, 0xf7, 0x40, 0x5e, 0x9e, 0x07, 0x4e, - 0x81, 0x7c, 0x75, 0xcf, 0xad, 0xec, 0x3c, 0xdc, 0xad, 0xd1, 0x48, 0x25, 0x03, 0x8d, 0x58, 0x31, - 0x3c, 0x2f, 0xe6, 0xca, 0x17, 0xc1, 0x85, 0x7a, 0xd0, 0x4a, 0xfc, 0x61, 0x26, 0x25, 0xe7, 0xc5, - 0x08, 0xb1, 0x6e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x33, 0xc2, 0x0c, 0xb6, 0xeb, 0x26, 0x00, - 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.proto b/vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.proto deleted file mode 100644 index 95a8fd135..000000000 --- a/vendor/github.com/gogo/protobuf/_conformance/conformance_proto/conformance.proto +++ /dev/null @@ -1,285 +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. - -syntax = "proto3"; -package conformance; -option java_package = "com.google.protobuf.conformance"; - -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -// This defines the conformance testing protocol. This protocol exists between -// the conformance test suite itself and the code being tested. For each test, -// the suite will send a ConformanceRequest message and expect a -// ConformanceResponse message. -// -// You can either run the tests in two different ways: -// -// 1. in-process (using the interface in conformance_test.h). -// -// 2. as a sub-process communicating over a pipe. Information about how to -// do this is in conformance_test_runner.cc. -// -// Pros/cons of the two approaches: -// -// - running as a sub-process is much simpler for languages other than C/C++. -// -// - running as a sub-process may be more tricky in unusual environments like -// iOS apps, where fork/stdin/stdout are not available. - -enum WireFormat { - UNSPECIFIED = 0; - PROTOBUF = 1; - JSON = 2; -} - -// Represents a single test case's input. The testee should: -// -// 1. parse this proto (which should always succeed) -// 2. parse the protobuf or JSON payload in "payload" (which may fail) -// 3. if the parse succeeded, serialize the message in the requested format. -message ConformanceRequest { - // The payload (whether protobuf of JSON) is always for a TestAllTypes proto - // (see below). - oneof payload { - bytes protobuf_payload = 1; - string json_payload = 2; - } - - // Which format should the testee serialize its message to? - WireFormat requested_output_format = 3; -} - -// Represents a single test case's output. -message ConformanceResponse { - oneof result { - // This string should be set to indicate parsing failed. The string can - // provide more information about the parse error if it is available. - // - // Setting this string does not necessarily mean the testee failed the - // test. Some of the test cases are intentionally invalid input. - string parse_error = 1; - - // If the input was successfully parsed but errors occurred when - // serializing it to the requested output format, set the error message in - // this field. - string serialize_error = 6; - - // This should be set if some other error occurred. This will always - // indicate that the test failed. The string can provide more information - // about the failure. - string runtime_error = 2; - - // If the input was successfully parsed and the requested output was - // protobuf, serialize it to protobuf and set it in this field. - bytes protobuf_payload = 3; - - // If the input was successfully parsed and the requested output was JSON, - // serialize to JSON and set it in this field. - string json_payload = 4; - - // For when the testee skipped the test, likely because a certain feature - // wasn't supported, like JSON input/output. - string skipped = 5; - } -} - -// This proto includes every type of field in both singular and repeated -// forms. -message TestAllTypes { - message NestedMessage { - int32 a = 1; - TestAllTypes corecursive = 2; - } - - enum NestedEnum { - FOO = 0; - BAR = 1; - BAZ = 2; - NEG = -1; // Intentionally negative. - } - - // Singular - int32 optional_int32 = 1; - int64 optional_int64 = 2; - uint32 optional_uint32 = 3; - uint64 optional_uint64 = 4; - sint32 optional_sint32 = 5; - sint64 optional_sint64 = 6; - fixed32 optional_fixed32 = 7; - fixed64 optional_fixed64 = 8; - sfixed32 optional_sfixed32 = 9; - sfixed64 optional_sfixed64 = 10; - float optional_float = 11; - double optional_double = 12; - bool optional_bool = 13; - string optional_string = 14; - bytes optional_bytes = 15; - - NestedMessage optional_nested_message = 18; - ForeignMessage optional_foreign_message = 19; - - NestedEnum optional_nested_enum = 21; - ForeignEnum optional_foreign_enum = 22; - - string optional_string_piece = 24 [ctype=STRING_PIECE]; - string optional_cord = 25 [ctype=CORD]; - - TestAllTypes recursive_message = 27; - - // Repeated - repeated int32 repeated_int32 = 31; - repeated int64 repeated_int64 = 32; - repeated uint32 repeated_uint32 = 33; - repeated uint64 repeated_uint64 = 34; - repeated sint32 repeated_sint32 = 35; - repeated sint64 repeated_sint64 = 36; - repeated fixed32 repeated_fixed32 = 37; - repeated fixed64 repeated_fixed64 = 38; - repeated sfixed32 repeated_sfixed32 = 39; - repeated sfixed64 repeated_sfixed64 = 40; - repeated float repeated_float = 41; - repeated double repeated_double = 42; - repeated bool repeated_bool = 43; - repeated string repeated_string = 44; - repeated bytes repeated_bytes = 45; - - repeated NestedMessage repeated_nested_message = 48; - repeated ForeignMessage repeated_foreign_message = 49; - - repeated NestedEnum repeated_nested_enum = 51; - repeated ForeignEnum repeated_foreign_enum = 52; - - repeated string repeated_string_piece = 54 [ctype=STRING_PIECE]; - repeated string repeated_cord = 55 [ctype=CORD]; - - // Map - map < int32, int32> map_int32_int32 = 56; - map < int64, int64> map_int64_int64 = 57; - map < uint32, uint32> map_uint32_uint32 = 58; - map < uint64, uint64> map_uint64_uint64 = 59; - map < sint32, sint32> map_sint32_sint32 = 60; - map < sint64, sint64> map_sint64_sint64 = 61; - map < fixed32, fixed32> map_fixed32_fixed32 = 62; - map < fixed64, fixed64> map_fixed64_fixed64 = 63; - map map_sfixed32_sfixed32 = 64; - map map_sfixed64_sfixed64 = 65; - map < int32, float> map_int32_float = 66; - map < int32, double> map_int32_double = 67; - map < bool, bool> map_bool_bool = 68; - map < string, string> map_string_string = 69; - map < string, bytes> map_string_bytes = 70; - map < string, NestedMessage> map_string_nested_message = 71; - map < string, ForeignMessage> map_string_foreign_message = 72; - map < string, NestedEnum> map_string_nested_enum = 73; - map < string, ForeignEnum> map_string_foreign_enum = 74; - - oneof oneof_field { - uint32 oneof_uint32 = 111; - NestedMessage oneof_nested_message = 112; - string oneof_string = 113; - bytes oneof_bytes = 114; - bool oneof_bool = 115; - uint64 oneof_uint64 = 116; - float oneof_float = 117; - double oneof_double = 118; - NestedEnum oneof_enum = 119; - } - - // Well-known types - google.protobuf.BoolValue optional_bool_wrapper = 201; - google.protobuf.Int32Value optional_int32_wrapper = 202; - google.protobuf.Int64Value optional_int64_wrapper = 203; - google.protobuf.UInt32Value optional_uint32_wrapper = 204; - google.protobuf.UInt64Value optional_uint64_wrapper = 205; - google.protobuf.FloatValue optional_float_wrapper = 206; - google.protobuf.DoubleValue optional_double_wrapper = 207; - google.protobuf.StringValue optional_string_wrapper = 208; - google.protobuf.BytesValue optional_bytes_wrapper = 209; - - repeated google.protobuf.BoolValue repeated_bool_wrapper = 211; - repeated google.protobuf.Int32Value repeated_int32_wrapper = 212; - repeated google.protobuf.Int64Value repeated_int64_wrapper = 213; - repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214; - repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215; - repeated google.protobuf.FloatValue repeated_float_wrapper = 216; - repeated google.protobuf.DoubleValue repeated_double_wrapper = 217; - repeated google.protobuf.StringValue repeated_string_wrapper = 218; - repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219; - - google.protobuf.Duration optional_duration = 301; - google.protobuf.Timestamp optional_timestamp = 302; - google.protobuf.FieldMask optional_field_mask = 303; - google.protobuf.Struct optional_struct = 304; - google.protobuf.Any optional_any = 305; - google.protobuf.Value optional_value = 306; - - repeated google.protobuf.Duration repeated_duration = 311; - repeated google.protobuf.Timestamp repeated_timestamp = 312; - repeated google.protobuf.FieldMask repeated_fieldmask = 313; - repeated google.protobuf.Struct repeated_struct = 324; - repeated google.protobuf.Any repeated_any = 315; - repeated google.protobuf.Value repeated_value = 316; - - // Test field-name-to-JSON-name convention. - // (protobuf says names can be any valid C/C++ identifier.) - int32 fieldname1 = 401; - int32 field_name2 = 402; - int32 _field_name3 = 403; - int32 field__name4_ = 404; - int32 field0name5 = 405; - int32 field_0_name6 = 406; - int32 fieldName7 = 407; - int32 FieldName8 = 408; - int32 field_Name9 = 409; - int32 Field_Name10 = 410; - int32 FIELD_NAME11 = 411; - int32 FIELD_name12 = 412; - int32 __field_name13 = 413; - int32 __Field_name14 = 414; - int32 field__name15 = 415; - int32 field__Name16 = 416; - int32 field_name17__ = 417; - int32 Field_name18__ = 418; -} - -message ForeignMessage { - int32 c = 1; -} - -enum ForeignEnum { - FOREIGN_FOO = 0; - FOREIGN_BAR = 1; - FOREIGN_BAZ = 2; -} diff --git a/vendor/github.com/gogo/protobuf/bench.md b/vendor/github.com/gogo/protobuf/bench.md deleted file mode 100644 index 16da66ad2..000000000 --- a/vendor/github.com/gogo/protobuf/bench.md +++ /dev/null @@ -1,190 +0,0 @@ -# Benchmarks - -## How to reproduce - -For a comparison run: - - make bench - -followed by [benchcmp](http://code.google.com/p/go/source/browse/misc/benchcmp benchcmp) on the resulting files: - - $GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/marshaler.txt - $GOROOT/misc/benchcmp $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshal.txt $GOPATH/src/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt - -Benchmarks ran on Revision: 11c56be39364 - -June 2013 - -Processor 2,66 GHz Intel Core i7 - -Memory 8 GB 1067 MHz DDR3 - -## Marshaler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
benchmarkold ns/opnew ns/opdelta
BenchmarkNidOptNativeProtoMarshal2656889-66.53%
BenchmarkNinOptNativeProtoMarshal26511015-61.71%
BenchmarkNidRepNativeProtoMarshal4266112519-70.65%
BenchmarkNinRepNativeProtoMarshal4230612354-70.80%
BenchmarkNidRepPackedNativeProtoMarshal3414811902-65.15%
BenchmarkNinRepPackedNativeProtoMarshal3337511969-64.14%
BenchmarkNidOptStructProtoMarshal71483727-47.86%
BenchmarkNinOptStructProtoMarshal69563481-49.96%
BenchmarkNidRepStructProtoMarshal4655119492-58.13%
BenchmarkNinRepStructProtoMarshal4671519043-59.24%
BenchmarkNidEmbeddedStructProtoMarshal52312050-60.81%
BenchmarkNinEmbeddedStructProtoMarshal46652000-57.13%
BenchmarkNidNestedStructProtoMarshal181106103604-42.79%
BenchmarkNinNestedStructProtoMarshal182053102069-43.93%
BenchmarkNidOptCustomProtoMarshal1209310-74.36%
BenchmarkNinOptCustomProtoMarshal1435277-80.70%
BenchmarkNidRepCustomProtoMarshal4126763-81.51%
BenchmarkNinRepCustomProtoMarshal3972769-80.64%
BenchmarkNinOptNativeUnionProtoMarshal973303-68.86%
BenchmarkNinOptStructUnionProtoMarshal1536521-66.08%
BenchmarkNinEmbeddedStructUnionProtoMarshal2327884-62.01%
BenchmarkNinNestedStructUnionProtoMarshal2070743-64.11%
BenchmarkTreeProtoMarshal1554838-46.07%
BenchmarkOrBranchProtoMarshal31562012-36.25%
BenchmarkAndBranchProtoMarshal31831996-37.29%
BenchmarkLeafProtoMarshal965606-37.20%
BenchmarkDeepTreeProtoMarshal23161283-44.60%
BenchmarkADeepBranchProtoMarshal27191492-45.13%
BenchmarkAndDeepBranchProtoMarshal46632922-37.34%
BenchmarkDeepLeafProtoMarshal18491016-45.05%
BenchmarkNilProtoMarshal43976-82.53%
BenchmarkNidOptEnumProtoMarshal514152-70.43%
BenchmarkNinOptEnumProtoMarshal550158-71.27%
BenchmarkNidRepEnumProtoMarshal647207-68.01%
BenchmarkNinRepEnumProtoMarshal662213-67.82%
BenchmarkTimerProtoMarshal934271-70.99%
BenchmarkMyExtendableProtoMarshal608185-69.57%
BenchmarkOtherExtenableProtoMarshal1112332-70.14%
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
benchmarkold MB/snew MB/sspeedup
BenchmarkNidOptNativeProtoMarshal126.86378.862.99x
BenchmarkNinOptNativeProtoMarshal114.27298.422.61x
BenchmarkNidRepNativeProtoMarshal164.25561.203.42x
BenchmarkNinRepNativeProtoMarshal166.10568.233.42x
BenchmarkNidRepPackedNativeProtoMarshal99.10283.972.87x
BenchmarkNinRepPackedNativeProtoMarshal101.30282.312.79x
BenchmarkNidOptStructProtoMarshal176.83339.071.92x
BenchmarkNinOptStructProtoMarshal163.59326.572.00x
BenchmarkNidRepStructProtoMarshal178.84427.492.39x
BenchmarkNinRepStructProtoMarshal178.70437.692.45x
BenchmarkNidEmbeddedStructProtoMarshal124.24317.562.56x
BenchmarkNinEmbeddedStructProtoMarshal132.03307.992.33x
BenchmarkNidNestedStructProtoMarshal192.91337.861.75x
BenchmarkNinNestedStructProtoMarshal192.44344.451.79x
BenchmarkNidOptCustomProtoMarshal29.77116.033.90x
BenchmarkNinOptCustomProtoMarshal22.29115.385.18x
BenchmarkNidRepCustomProtoMarshal35.14189.805.40x
BenchmarkNinRepCustomProtoMarshal36.50188.405.16x
BenchmarkNinOptNativeUnionProtoMarshal32.87105.393.21x
BenchmarkNinOptStructUnionProtoMarshal66.40195.762.95x
BenchmarkNinEmbeddedStructUnionProtoMarshal93.24245.262.63x
BenchmarkNinNestedStructUnionProtoMarshal57.49160.062.78x
BenchmarkTreeProtoMarshal137.64255.121.85x
BenchmarkOrBranchProtoMarshal137.80216.101.57x
BenchmarkAndBranchProtoMarshal136.64217.891.59x
BenchmarkLeafProtoMarshal214.48341.531.59x
BenchmarkDeepTreeProtoMarshal95.85173.031.81x
BenchmarkADeepBranchProtoMarshal82.73150.781.82x
BenchmarkAndDeepBranchProtoMarshal96.72153.981.59x
BenchmarkDeepLeafProtoMarshal117.34213.411.82x
BenchmarkNidOptEnumProtoMarshal3.8913.163.38x
BenchmarkNinOptEnumProtoMarshal1.826.303.46x
BenchmarkNidRepEnumProtoMarshal12.3638.503.11x
BenchmarkNinRepEnumProtoMarshal12.0837.533.11x
BenchmarkTimerProtoMarshal73.81253.873.44x
BenchmarkMyExtendableProtoMarshal13.1543.083.28x
BenchmarkOtherExtenableProtoMarshal24.2881.093.34x
- -## Unmarshaler - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
benchmarkold ns/opnew ns/opdelta
BenchmarkNidOptNativeProtoUnmarshal25211006-60.10%
BenchmarkNinOptNativeProtoUnmarshal25291750-30.80%
BenchmarkNidRepNativeProtoUnmarshal4906735299-28.06%
BenchmarkNinRepNativeProtoUnmarshal4799035456-26.12%
BenchmarkNidRepPackedNativeProtoUnmarshal2645623950-9.47%
BenchmarkNinRepPackedNativeProtoUnmarshal2649924037-9.29%
BenchmarkNidOptStructProtoUnmarshal68033873-43.07%
BenchmarkNinOptStructProtoUnmarshal67864154-38.79%
BenchmarkNidRepStructProtoUnmarshal5627631970-43.19%
BenchmarkNinRepStructProtoUnmarshal4875031832-34.70%
BenchmarkNidEmbeddedStructProtoUnmarshal45561973-56.69%
BenchmarkNinEmbeddedStructProtoUnmarshal44851975-55.96%
BenchmarkNidNestedStructProtoUnmarshal223395135844-39.19%
BenchmarkNinNestedStructProtoUnmarshal226446134022-40.82%
BenchmarkNidOptCustomProtoUnmarshal1859300-83.86%
BenchmarkNinOptCustomProtoUnmarshal1486402-72.95%
BenchmarkNidRepCustomProtoUnmarshal82291669-79.72%
BenchmarkNinRepCustomProtoUnmarshal82531649-80.02%
BenchmarkNinOptNativeUnionProtoUnmarshal840307-63.45%
BenchmarkNinOptStructUnionProtoUnmarshal1395639-54.19%
BenchmarkNinEmbeddedStructUnionProtoUnmarshal22971167-49.19%
BenchmarkNinNestedStructUnionProtoUnmarshal1820889-51.15%
BenchmarkTreeProtoUnmarshal1521720-52.66%
BenchmarkOrBranchProtoUnmarshal26691385-48.11%
BenchmarkAndBranchProtoUnmarshal26671420-46.76%
BenchmarkLeafProtoUnmarshal1171584-50.13%
BenchmarkDeepTreeProtoUnmarshal20651081-47.65%
BenchmarkADeepBranchProtoUnmarshal26951178-56.29%
BenchmarkAndDeepBranchProtoUnmarshal40551918-52.70%
BenchmarkDeepLeafProtoUnmarshal1758865-50.80%
BenchmarkNilProtoUnmarshal56463-88.79%
BenchmarkNidOptEnumProtoUnmarshal76273-90.34%
BenchmarkNinOptEnumProtoUnmarshal764163-78.66%
BenchmarkNidRepEnumProtoUnmarshal1078447-58.53%
BenchmarkNinRepEnumProtoUnmarshal1071479-55.28%
BenchmarkTimerProtoUnmarshal1128362-67.91%
BenchmarkMyExtendableProtoUnmarshal808217-73.14%
BenchmarkOtherExtenableProtoUnmarshal1233517-58.07%
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
benchmarkold MB/snew MB/sspeedup
BenchmarkNidOptNativeProtoUnmarshal133.67334.982.51x
BenchmarkNinOptNativeProtoUnmarshal119.77173.081.45x
BenchmarkNidRepNativeProtoUnmarshal143.23199.121.39x
BenchmarkNinRepNativeProtoUnmarshal146.07198.161.36x
BenchmarkNidRepPackedNativeProtoUnmarshal127.80141.041.10x
BenchmarkNinRepPackedNativeProtoUnmarshal127.55140.781.10x
BenchmarkNidOptStructProtoUnmarshal185.79326.311.76x
BenchmarkNinOptStructProtoUnmarshal167.68273.661.63x
BenchmarkNidRepStructProtoUnmarshal147.88260.391.76x
BenchmarkNinRepStructProtoUnmarshal171.20261.971.53x
BenchmarkNidEmbeddedStructProtoUnmarshal142.86329.422.31x
BenchmarkNinEmbeddedStructProtoUnmarshal137.33311.832.27x
BenchmarkNidNestedStructProtoUnmarshal154.97259.471.67x
BenchmarkNinNestedStructProtoUnmarshal154.32258.421.67x
BenchmarkNidOptCustomProtoUnmarshal19.36119.666.18x
BenchmarkNinOptCustomProtoUnmarshal21.5279.503.69x
BenchmarkNidRepCustomProtoUnmarshal17.6286.864.93x
BenchmarkNinRepCustomProtoUnmarshal17.5787.925.00x
BenchmarkNinOptNativeUnionProtoUnmarshal38.07104.122.73x
BenchmarkNinOptStructUnionProtoUnmarshal73.08159.542.18x
BenchmarkNinEmbeddedStructUnionProtoUnmarshal94.00185.921.98x
BenchmarkNinNestedStructUnionProtoUnmarshal65.35133.752.05x
BenchmarkTreeProtoUnmarshal141.28297.132.10x
BenchmarkOrBranchProtoUnmarshal162.56313.961.93x
BenchmarkAndBranchProtoUnmarshal163.06306.151.88x
BenchmarkLeafProtoUnmarshal176.72354.192.00x
BenchmarkDeepTreeProtoUnmarshal107.50205.301.91x
BenchmarkADeepBranchProtoUnmarshal83.48190.882.29x
BenchmarkAndDeepBranchProtoUnmarshal110.97234.602.11x
BenchmarkDeepLeafProtoUnmarshal123.40250.732.03x
BenchmarkNidOptEnumProtoUnmarshal2.6227.1610.37x
BenchmarkNinOptEnumProtoUnmarshal1.316.114.66x
BenchmarkNidRepEnumProtoUnmarshal7.4217.882.41x
BenchmarkNinRepEnumProtoUnmarshal7.4716.692.23x
BenchmarkTimerProtoUnmarshal61.12190.343.11x
BenchmarkMyExtendableProtoUnmarshal9.9036.713.71x
BenchmarkOtherExtenableProtoUnmarshal21.9052.132.38x
\ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/codec/codec.go b/vendor/github.com/gogo/protobuf/codec/codec.go deleted file mode 100644 index 91d10fe7f..000000000 --- a/vendor/github.com/gogo/protobuf/codec/codec.go +++ /dev/null @@ -1,91 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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) -} - -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 - } -} - -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, ok := getSize(v) - if !ok { - return proto.Marshal(v.(proto.Message)) - } - 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/github.com/gogo/protobuf/codec/codec_test.go b/vendor/github.com/gogo/protobuf/codec/codec_test.go deleted file mode 100644 index de2c9bc4b..000000000 --- a/vendor/github.com/gogo/protobuf/codec/codec_test.go +++ /dev/null @@ -1,54 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/custom_types.md b/vendor/github.com/gogo/protobuf/custom_types.md deleted file mode 100644 index 3eed249b5..000000000 --- a/vendor/github.com/gogo/protobuf/custom_types.md +++ /dev/null @@ -1,68 +0,0 @@ -# Custom types - -Custom types is a gogo protobuf extensions that allows for using a custom -struct type to decorate the underlying structure of the protocol message. - -# How to use - -## Defining the protobuf message - -```proto -message CustomType { - optional ProtoType Field = 1 [(gogoproto.customtype) = "T"]; -} - -message ProtoType { - optional string Field = 1; -} -``` - -or alternatively you can declare the field type in the protocol message to be -`bytes`: - -```proto -message BytesCustomType { - optional bytes Field = 1 [(gogoproto.customtype) = "T"]; -} -``` - -The downside of using `bytes` is that it makes it harder to generate protobuf -code in other languages. In either case, it is the user responsibility to -ensure that the custom type marshals and unmarshals to the expected wire -format. That is, in the first example, gogo protobuf will not attempt to ensure -that the wire format of `ProtoType` and `T` are wire compatible. - -## Custom type method signatures - -The custom type must define the following methods with the given -signatures. Assuming the custom type is called `T`: - -```go -func (t T) Marshal() ([]byte, error) {} -func (t *T) MarshalTo(data []byte) (n int, err error) {} -func (t *T) Unmarshal(data []byte) error {} - -func (t T) MarshalJSON() ([]byte, error) {} -func (t *T) UnmarshalJSON(data []byte) error {} - -// only required if the compare option is set -func (t T) Compare(other T) int {} -// only required if the equal option is set -func (t T) Equal(other T) bool {} -// only required if populate option is set -func NewPopulatedT(r randyThetest) *T {} -``` - -Check [t.go](test/t.go) for a full example - -# Warnings and issues - -`Warning about customtype: It is your responsibility to test all cases of your marshaling, unmarshaling and size methods implemented for your custom type.` - -Issues with customtype include: - * A Bytes method is not allowed. - * Defining a customtype as a fake proto message is broken. - * proto.Clone is broken. - * Using a proto message as a customtype is not allowed. - * cusomtype of type map can not UnmarshalText - * customtype of type struct cannot jsonpb unmarshal diff --git a/vendor/github.com/gogo/protobuf/extensions.md b/vendor/github.com/gogo/protobuf/extensions.md deleted file mode 100644 index 35dfee16f..000000000 --- a/vendor/github.com/gogo/protobuf/extensions.md +++ /dev/null @@ -1,162 +0,0 @@ -# gogoprotobuf Extensions - -Here is an [example.proto](https://github.com/gogo/protobuf/blob/master/test/example/example.proto) which uses most of the gogoprotobuf code generation plugins. - -Please also look at the example [Makefile](https://github.com/gogo/protobuf/blob/master/test/example/Makefile) which shows how to specify the `descriptor.proto` and `gogo.proto` in your proto_path - -The documentation at [http://godoc.org/github.com/gogo/protobuf/gogoproto](http://godoc.org/github.com/gogo/protobuf/gogoproto) describes the extensions made to goprotobuf in more detail. - -Also see [http://godoc.org/github.com/gogo/protobuf/plugin/](http://godoc.org/github.com/gogo/protobuf/plugin/) for documentation of each of the extensions which have their own plugins. - -# Fast Marshalling and Unmarshalling - -Generating a `Marshal`, `MarshalTo`, `Size` (or `ProtoSize`) and `Unmarshal` method for a struct results in faster marshalling and unmarshalling than when using reflect. - -See [BenchComparison](https://github.com/gogo/protobuf/blob/master/bench.md) for a comparison between reflect and generated code used for marshalling and unmarshalling. - - - - - - - - - - - -
NameOptionTypeDescriptionDefault
marshalerMessageboolif true, a Marshal and MarshalTo method is generated for the specific messagefalse
sizerMessageboolif true, a Size method is generated for the specific messagefalse
unmarshaler Message bool if true, an Unmarshal method is generated for the specific message false
protosizerMessageboolif true, a ProtoSize method is generated for the specific messagefalse
unsafe_marshaler (deprecated) Message bool if true, a Marshal and MarshalTo method is generated. false
unsafe_unmarshaler (deprecated) Message bool if true, an Unmarshal method is generated. false
stable_marshaler Message bool if true, a Marshal and MarshalTo method is generated for the specific message, but unlike marshaler the output is guaranteed to be deterministic, at the sacrifice of some speed false
typedecl (beta) Message bool if false, type declaration of the message is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. true
- -# More Canonical Go Structures - -Lots of times 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 new struct. - -`gogoprotobuf` tries to fix these problems with the nullable, embed, customtype, customname, casttype, castkey and castvalue field extensions. - - - - - - - - - - - - - - - -
NameOptionTypeDescriptionDefault
nullable Field bool if false, a field is generated without a pointer (see warning below). true
embed Field bool if true, the field is generated as an embedded field. false
customtype Field string 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. For more information please refer to the CustomTypes document goprotobuf type
customname (beta) Field string Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. goprotobuf field name
casttype (beta) Field string Changes the generated field type. It assumes that this type is castable to the original goprotobuf field type. It currently does not support maps, structs or enums. goprotobuf field type
castkey (beta) Field string 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. goprotobuf field type
castvalue (beta) Field string 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. goprotobuf field type
enum_customname (beta) Enum string Sets the type name of an enum. If goproto_enum_prefix is enabled, this value will be used as a prefix when generating enum values.goprotobuf enum type name. Helps with golint issues.
enumdecl (beta) Enum bool if false, type declaration of the enum is excluded from the generated output. Requires the marshaler and unmarshaler to be generated. true
enumvalue_customname (beta) Enum Value string Changes the generated enum name. Helps with golint issues.goprotobuf enum value name
stdtime Timestamp Field bool Changes the Well Known Timestamp Type to time.TimeTimestamp
stdduration Duration Field bool Changes the Well Known Duration Type to time.DurationDuration
- -`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.` - -# Goprotobuf Compatibility - -Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers (see the section on tests below). - -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. - - - - - - - - - - - -
NameOptionTypeDescriptionDefault
gogoproto_import File bool if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. true
goproto_enum_prefix Enum bool if false, generates the enum constant names without the messagetype prefix true
goproto_getters Message bool if false, the message is generated without get methods, this is useful when you would rather want to use face true
goproto_stringer Message bool if false, the message is generated without the default string method, this is useful for rather using stringer true
goproto_enum_stringer (experimental) Enum bool if false, the enum is generated without the default string method, this is useful for rather using enum_stringer true
goproto_extensions_map (beta) Message bool if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension true
goproto_unrecognized (beta) Message bool if false, XXX_unrecognized field is not generated. This is useful to reduce GC pressure at the cost of losing information about unrecognized fields. true
goproto_registration (beta) File bool 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). false
- -# Less Typing - -The Protocol Buffer language is very parseable and extra code can be easily generated for structures. - -Helper methods, functions and interfaces can be generated by triggering certain extensions like gostring. - - - - - - - - - - - - - -
NameOptionTypeDescriptionDefault
gostring Message bool if true, a `GoString` method is generated. This returns a string representing valid go code to reproduce the current state of the struct. false
onlyone Message bool if true, 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 union. false
equal Message bool if true, an Equal method is generated false
compare Message bool if true, a Compare method is generated. This is very useful for quickly implementing sort on a list of protobuf structs false
verbose_equal Message bool if true, a verbose equal method is generated for the message. This returns an error which describes the exact element which is not equal to the exact element in the other struct. false
stringer Message bool if true, a String method is generated for the message. false
face Message bool if true, 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 allows it to satisfy its own face. false
description (beta) Message bool if true, a Description method is generated for the message. false
populate Message bool if true, a `NewPopulated` function is generated. This is necessary for generated tests. false
enum_stringer (experimental) Enum bool if true, a String method is generated for an Enum false
- -Issues with Compare include: - * Oneof is not supported yet - * Not all Well Known Types are supported yet - * Maps are not supported - -#Peace of Mind - -Test and Benchmark generation is done with the following extensions: - - - - -
testgen Message bool if true, tests are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins false
benchgen Message bool if true, benchmarks are generated for proto, json and prototext marshalling as well as for some of the other enabled plugins false
- -# More Serialization Formats - -Other serialization formats like xml and json typically use reflect to marshal and unmarshal structured data. Manipulating these structs into something other than the default Go requires editing tags. The following extensions provide ways of editing these tags for the generated protobuf structs. - - - - -
jsontag (beta) Field string if set, the json tag value between the double quotes is replaced with this string fieldname
moretags (beta) Field string if set, this string is appended to the tag string empty
- -Here is a longer explanation of jsontag and moretags - -# File Options - -Each of the boolean message and enum extensions also have a file extension: - - * `marshaler_all` - * `sizer_all` - * `protosizer_all` - * `unmarshaler_all` - * `unsafe_marshaler_all` - * `unsafe_unmarshaler_all` - * `stable_marshaler_all` - * `goproto_enum_prefix_all` - * `goproto_getters_all` - * `goproto_stringer_all` - * `goproto_enum_stringer_all` - * `goproto_extensions_map_all` - * `goproto_unrecognized_all` - * `gostring_all` - * `onlyone_all` - * `equal_all` - * `compare_all` - * `verbose_equal_all` - * `stringer_all` - * `enum_stringer_all` - * `face_all` - * `description_all` - * `populate_all` - * `testgen_all` - * `benchgen_all` - * `enumdecl_all` - * `typedecl_all` - -Each of these are the same as their Message Option counterparts, except they apply to all messages in the file. Their Message option counterparts can also be used to overwrite their effect. - -# Tests - - * The normal barrage of tests are run with: `make tests` - * A few weird tests: `make testall` - * Tests for compatibility with [golang/protobuf](https://github.com/golang/protobuf) are handled by a different project [harmonytests](https://github.com/gogo/harmonytests), since it requires goprotobuf. - * Cross version tests are made with [Travis CI](https://travis-ci.org/gogo/protobuf). - * GRPC Tests are also handled by a different project [grpctests](https://github.com/gogo/grpctests), since it depends on a lot of grpc libraries. - * Thanks to [go-fuzz](https://github.com/dvyukov/go-fuzz/) we have proper [fuzztests](https://github.com/gogo/fuzztests). - diff --git a/vendor/github.com/gogo/protobuf/gogoreplace/main.go b/vendor/github.com/gogo/protobuf/gogoreplace/main.go deleted file mode 100644 index 3eab56513..000000000 --- a/vendor/github.com/gogo/protobuf/gogoreplace/main.go +++ /dev/null @@ -1,25 +0,0 @@ -package main - -import ( - "bytes" - "fmt" - "io/ioutil" - "os" -) - -func main() { - args := os.Args - if len(args) != 4 { - fmt.Println("gogoreplace wants three arguments") - fmt.Println(" gogoreplace oldsubstring newsubstring filename") - os.Exit(1) - } - data, err := ioutil.ReadFile(args[3]) - if err != nil { - panic(err) - } - data = bytes.Replace(data, []byte(args[1]), []byte(args[2]), -1) - if err := ioutil.WriteFile(args[3], data, 0666); err != nil { - panic(err) - } -} diff --git a/vendor/github.com/gogo/protobuf/install-protobuf.sh b/vendor/github.com/gogo/protobuf/install-protobuf.sh deleted file mode 100644 index f42fc9e63..000000000 --- a/vendor/github.com/gogo/protobuf/install-protobuf.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -die() { - echo "$@" >&2 - exit 1 -} - -cd /home/travis - -case "$PROTOBUF_VERSION" in -2*) - basename=protobuf-$PROTOBUF_VERSION - 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 - ;; -3*) - basename=protoc-$PROTOBUF_VERSION-linux-x86_64 - wget https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/$basename.zip - unzip $basename.zip - ;; -*) - die "unknown protobuf version: $PROTOBUF_VERSION" - ;; -esac diff --git a/vendor/github.com/gogo/protobuf/io/io_test.go b/vendor/github.com/gogo/protobuf/io/io_test.go deleted file mode 100644 index 0b74b3100..000000000 --- a/vendor/github.com/gogo/protobuf/io/io_test.go +++ /dev/null @@ -1,221 +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_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/github.com/gogo/protobuf/io/uint32_test.go b/vendor/github.com/gogo/protobuf/io/uint32_test.go deleted file mode 100644 index d837e4a93..000000000 --- a/vendor/github.com/gogo/protobuf/io/uint32_test.go +++ /dev/null @@ -1,38 +0,0 @@ -package io_test - -import ( - "encoding/binary" - "io/ioutil" - "math/rand" - "testing" - "time" - - "github.com/gogo/protobuf/test" - example "github.com/gogo/protobuf/test/example" - - "github.com/gogo/protobuf/io" -) - -func BenchmarkUint32DelimWriterMarshaller(b *testing.B) { - w := io.NewUint32DelimitedWriter(ioutil.Discard, binary.BigEndian) - r := rand.New(rand.NewSource(time.Now().UnixNano())) - msg := example.NewPopulatedA(r, true) - - for i := 0; i < b.N; i++ { - if err := w.WriteMsg(msg); err != nil { - b.Fatal(err) - } - } -} - -func BenchmarkUint32DelimWriterFallback(b *testing.B) { - w := io.NewUint32DelimitedWriter(ioutil.Discard, binary.BigEndian) - r := rand.New(rand.NewSource(time.Now().UnixNano())) - msg := test.NewPopulatedNinOptNative(r, true) - - for i := 0; i < b.N; i++ { - if err := w.WriteMsg(msg); err != nil { - b.Fatal(err) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go deleted file mode 100644 index 8d585f2ed..000000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb_test.go +++ /dev/null @@ -1,890 +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 ( - "bytes" - "encoding/json" - "io" - "math" - "reflect" - "strings" - "testing" - - pb "github.com/gogo/protobuf/jsonpb/jsonpb_test_proto" - "github.com/gogo/protobuf/proto" - proto3pb "github.com/gogo/protobuf/proto/proto3_proto" - "github.com/gogo/protobuf/types" -) - -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"), - OCastBytes: pb.Bytes("wow"), - } - - simpleObjectJSON = `{` + - `"oBool":true,` + - `"oInt32":-32,` + - `"oInt64":"-6400000000",` + - `"oUint32":32,` + - `"oUint64":"6400000000",` + - `"oSint32":-13,` + - `"oSint64":"-2600000000",` + - `"oFloat":3.14,` + - `"oDouble":6.02214179e+23,` + - `"oString":"hello \"there\"",` + - `"oBytes":"YmVlcCBib29w",` + - `"oCastBytes":"d293"` + - `}` - - simpleObjectPrettyJSON = `{ - "oBool": true, - "oInt32": -32, - "oInt64": "-6400000000", - "oUint32": 32, - "oUint64": "6400000000", - "oSint32": -13, - "oSint64": "-2600000000", - "oFloat": 3.14, - "oDouble": 6.02214179e+23, - "oString": "hello \"there\"", - "oBytes": "YmVlcCBib29w", - "oCastBytes": "d293" -}` - - 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 * 1e20, 6.62606957e-34}, - RString: []string{"happy", "days"}, - RBytes: [][]byte{[]byte("skittles"), []byte("m&m's")}, - } - - repeatsObjectJSON = `{` + - `"rBool":[true,false,true],` + - `"rInt32":[-3,-4,-5],` + - `"rInt64":["-123456789","-987654321"],` + - `"rUint32":[1,2,3],` + - `"rUint64":["6789012345","3456789012"],` + - `"rSint32":[-1,-2,-3],` + - `"rSint64":["-6789012345","-3456789012"],` + - `"rFloat":[3.14,6.28],` + - `"rDouble":[2.99792458e+28,6.62606957e-34],` + - `"rString":["happy","days"],` + - `"rBytes":["c2tpdHRsZXM=","bSZtJ3M="]` + - `}` - - repeatsObjectPrettyJSON = `{ - "rBool": [ - true, - false, - true - ], - "rInt32": [ - -3, - -4, - -5 - ], - "rInt64": [ - "-123456789", - "-987654321" - ], - "rUint32": [ - 1, - 2, - 3 - ], - "rUint64": [ - "6789012345", - "3456789012" - ], - "rSint32": [ - -1, - -2, - -3 - ], - "rSint64": [ - "-6789012345", - "-3456789012" - ], - "rFloat": [ - 3.14, - 6.28 - ], - "rDouble": [ - 2.99792458e+28, - 6.62606957e-34 - ], - "rString": [ - "happy", - "days" - ], - "rBytes": [ - "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",` + - `"rColor":["RED","GREEN","BLUE"],` + - `"simple":{"oInt32":-32},` + - `"rSimple":[{"oInt32":-32},{"oInt64":"25"}],` + - `"repeats":{"rString":["roses","red"]},` + - `"rRepeats":[{"rString":["roses","red"]},{"rString":["violets","blue"]}]` + - `}` - - complexObjectPrettyJSON = `{ - "color": "GREEN", - "rColor": [ - "RED", - "GREEN", - "BLUE" - ], - "simple": { - "oInt32": -32 - }, - "rSimple": [ - { - "oInt32": -32 - }, - { - "oInt64": "25" - } - ], - "repeats": { - "rString": [ - "roses", - "red" - ] - }, - "rRepeats": [ - { - "rString": [ - "roses", - "red" - ] - }, - { - "rString": [ - "violets", - "blue" - ] - } - ] -}` - - colorPrettyJSON = `{ - "color": 2 -}` - - colorListPrettyJSON = `{ - "color": 1000, - "rColor": [ - "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"` + - `}` - - anySimple = &pb.KnownTypes{ - An: &types.Any{ - TypeUrl: "something.example.com/jsonpb.Simple", - Value: []byte{ - // &pb.Simple{OBool:true} - 1 << 3, 1, - }, - }, - } - anySimpleJSON = `{"an":{"@type":"something.example.com/jsonpb.Simple","oBool":true}}` - anySimplePrettyJSON = `{ - "an": { - "@type": "something.example.com/jsonpb.Simple", - "oBool": true - } -}` - - anyWellKnown = &pb.KnownTypes{ - An: &types.Any{ - TypeUrl: "type.googleapis.com/google.protobuf.Duration", - Value: []byte{ - // &durpb.Duration{Seconds: 1, Nanos: 212000000 } - 1 << 3, 1, // seconds - 2 << 3, 0x80, 0xba, 0x8b, 0x65, // nanos - }, - }, - } - anyWellKnownJSON = `{"an":{"@type":"type.googleapis.com/google.protobuf.Duration","value":"1.212s"}}` - anyWellKnownPrettyJSON = `{ - "an": { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } -}` - - nonFinites = &pb.NonFinites{ - FNan: proto.Float32(float32(math.NaN())), - FPinf: proto.Float32(float32(math.Inf(1))), - FNinf: proto.Float32(float32(math.Inf(-1))), - DNan: proto.Float64(float64(math.NaN())), - DPinf: proto.Float64(float64(math.Inf(1))), - DNinf: proto.Float64(float64(math.Inf(-1))), - } - nonFinitesJSON = `{` + - `"fNan":"NaN",` + - `"fPinf":"Infinity",` + - `"fNinf":"-Infinity",` + - `"dNan":"NaN",` + - `"dPinf":"Infinity",` + - `"dNinf":"-Infinity"` + - `}` -) - -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}, - {"non-finite floats fields object", marshaler, nonFinites, nonFinitesJSON}, - {"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}, - {"repeated proto3 enum", Marshaler{}, - &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ - proto3pb.Message_PUNS, - proto3pb.Message_SLAPSTICK, - }}, - `{"rFunny":["PUNS","SLAPSTICK"]}`}, - {"repeated proto3 enum as int", Marshaler{EnumsAsInts: true}, - &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ - proto3pb.Message_PUNS, - proto3pb.Message_SLAPSTICK, - }}, - `{"rFunny":[1,2]}`}, - {"empty value", marshaler, &pb.Simple3{}, `{}`}, - {"empty value emitted", Marshaler{EmitDefaults: true}, &pb.Simple3{}, `{"dub":0}`}, - {"empty repeated emitted", Marshaler{EmitDefaults: true}, &pb.SimpleSlice3{}, `{"slices":[]}`}, - {"empty map emitted", Marshaler{EmitDefaults: true}, &pb.SimpleMap3{}, `{"stringy":{}}`}, - {"nested struct null", Marshaler{EmitDefaults: true}, &pb.SimpleNull3{}, `{"simple":null}`}, - {"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}}`}, - // TODO: This is broken. - //{"map", marshaler, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":"ROMAN"}`}, - {"map", Marshaler{EnumsAsInts: true}, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}, `{"enumy":{"XIV":2}}`}, - {"map", marshaler, &pb.Mappy{S32Booly: map[int32]bool{1: true, 3: false, 10: true, 12: false}}, `{"s32booly":{"1":true,"3":false,"10":true,"12":false}}`}, - {"map", marshaler, &pb.Mappy{S64Booly: map[int64]bool{1: true, 3: false, 10: true, 12: false}}, `{"s64booly":{"1":true,"3":false,"10":true,"12":false}}`}, - {"map", marshaler, &pb.Mappy{U32Booly: map[uint32]bool{1: true, 3: false, 10: true, 12: false}}, `{"u32booly":{"1":true,"3":false,"10":true,"12":false}}`}, - {"map", marshaler, &pb.Mappy{U64Booly: map[uint64]bool{1: true, 3: false, 10: true, 12: false}}, `{"u64booly":{"1":true,"3":false,"10":true,"12":false}}`}, - {"proto2 map", marshaler, &pb.Maps{MInt64Str: map[int64]string{213: "cat"}}, - `{"mInt64Str":{"213":"cat"}}`}, - {"proto2 map", marshaler, - &pb.Maps{MBoolSimple: map[bool]*pb.Simple{true: {OInt32: proto.Int32(1)}}}, - `{"mBoolSimple":{"true":{"oInt32":1}}}`}, - {"oneof, not set", marshaler, &pb.MsgWithOneof{}, `{}`}, - {"oneof, set", marshaler, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Title{Title: "Grand Poobah"}}, `{"title":"Grand Poobah"}`}, - {"force orig_name", Marshaler{OrigName: true}, &pb.Simple{OInt32: proto.Int32(4)}, - `{"o_int32":4}`}, - {"proto2 extension", marshaler, realNumber, realNumberJSON}, - {"Any with message", marshaler, anySimple, anySimpleJSON}, - {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON}, - {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON}, - {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON}, - {"Duration", marshaler, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}, `{"dur":"3.000s"}`}, - {"Struct", marshaler, &pb.KnownTypes{St: &types.Struct{ - Fields: map[string]*types.Value{ - "one": {Kind: &types.Value_StringValue{StringValue: "loneliest number"}}, - "two": {Kind: &types.Value_NullValue{NullValue: types.NULL_VALUE}}, - }, - }}, `{"st":{"one":"loneliest number","two":null}}`}, - {"empty ListValue", marshaler, &pb.KnownTypes{Lv: &types.ListValue{}}, `{"lv":[]}`}, - {"basic ListValue", marshaler, &pb.KnownTypes{Lv: &types.ListValue{Values: []*types.Value{ - {Kind: &types.Value_StringValue{StringValue: "x"}}, - {Kind: &types.Value_NullValue{}}, - {Kind: &types.Value_NumberValue{NumberValue: 3}}, - {Kind: &types.Value_BoolValue{BoolValue: true}}, - }}}, `{"lv":["x",null,3,true]}`}, - {"Timestamp", marshaler, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`}, - {"number Value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NumberValue{NumberValue: 1}}}, `{"val":1}`}, - {"null Value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NullValue{NullValue: types.NULL_VALUE}}}, `{"val":null}`}, - {"string number value", marshaler, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "9223372036854775807"}}}, `{"val":"9223372036854775807"}`}, - {"list of lists Value", marshaler, &pb.KnownTypes{Val: &types.Value{ - Kind: &types.Value_ListValue{ListValue: &types.ListValue{ - Values: []*types.Value{ - {Kind: &types.Value_StringValue{StringValue: "x"}}, - {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ - Values: []*types.Value{ - {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ - Values: []*types.Value{{Kind: &types.Value_StringValue{StringValue: "y"}}}, - }}}, - {Kind: &types.Value_StringValue{StringValue: "z"}}, - }, - }}}, - }, - }}, - }}, `{"val":["x",[["y"],"z"]]}`}, - {"DoubleValue", marshaler, &pb.KnownTypes{Dbl: &types.DoubleValue{Value: 1.2}}, `{"dbl":1.2}`}, - {"FloatValue", marshaler, &pb.KnownTypes{Flt: &types.FloatValue{Value: 1.2}}, `{"flt":1.2}`}, - {"Int64Value", marshaler, &pb.KnownTypes{I64: &types.Int64Value{Value: -3}}, `{"i64":"-3"}`}, - {"UInt64Value", marshaler, &pb.KnownTypes{U64: &types.UInt64Value{Value: 3}}, `{"u64":"3"}`}, - {"Int32Value", marshaler, &pb.KnownTypes{I32: &types.Int32Value{Value: -4}}, `{"i32":-4}`}, - {"UInt32Value", marshaler, &pb.KnownTypes{U32: &types.UInt32Value{Value: 4}}, `{"u32":4}`}, - {"BoolValue", marshaler, &pb.KnownTypes{Bool: &types.BoolValue{Value: true}}, `{"bool":true}`}, - {"StringValue", marshaler, &pb.KnownTypes{Str: &types.StringValue{Value: "plush"}}, `{"str":"plush"}`}, - {"BytesValue", marshaler, &pb.KnownTypes{Bytes: &types.BytesValue{Value: []byte("wow")}}, `{"bytes":"d293"}`}, -} - -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) - } - } -} - -func TestMarshalJSONPBMarshaler(t *testing.T) { - rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` - msg := dynamicMessage{rawJson: rawJson} - str, err := new(Marshaler).MarshalToString(&msg) - if err != nil { - t.Errorf("an unexpected error occurred when marshalling JSONPBMarshaler: %v", err) - } - if str != rawJson { - t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, rawJson) - } -} - -func TestMarshalAnyJSONPBMarshaler(t *testing.T) { - msg := dynamicMessage{rawJson: `{ "foo": "bar", "baz": [0, 1, 2, 3] }`} - a, err := types.MarshalAny(&msg) - if err != nil { - t.Errorf("an unexpected error occurred when marshalling to Any: %v", err) - } - str, err := new(Marshaler).MarshalToString(a) - if err != nil { - t.Errorf("an unexpected error occurred when marshalling Any to JSON: %v", err) - } - // after custom marshaling, it's round-tripped through JSON decoding/encoding already, - // so the keys are sorted, whitespace is compacted, and "@type" key has been added - expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}` - if str != expected { - t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected) - } -} - -var unmarshalingTests = []struct { - desc string - unmarshaler Unmarshaler - json string - pb proto.Message -}{ - {"simple flat object", Unmarshaler{}, simpleObjectJSON, simpleObject}, - {"simple pretty object", Unmarshaler{}, simpleObjectPrettyJSON, simpleObject}, - {"repeated fields flat object", Unmarshaler{}, repeatsObjectJSON, repeatsObject}, - {"repeated fields pretty object", Unmarshaler{}, repeatsObjectPrettyJSON, repeatsObject}, - {"nested message/enum flat object", Unmarshaler{}, complexObjectJSON, complexObject}, - {"nested message/enum pretty object", Unmarshaler{}, complexObjectPrettyJSON, complexObject}, - {"enum-string object", Unmarshaler{}, `{"color":"BLUE"}`, &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, - {"enum-value object", Unmarshaler{}, "{\n \"color\": 2\n}", &pb.Widget{Color: pb.Widget_BLUE.Enum()}}, - {"unknown field with allowed option", Unmarshaler{AllowUnknownFields: true}, `{"unknown": "foo"}`, new(pb.Simple)}, - {"proto3 enum string", Unmarshaler{}, `{"hilarity":"PUNS"}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, - {"proto3 enum value", Unmarshaler{}, `{"hilarity":1}`, &proto3pb.Message{Hilarity: proto3pb.Message_PUNS}}, - {"unknown enum value object", - Unmarshaler{}, - "{\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}}}, - {"repeated proto3 enum", Unmarshaler{}, `{"rFunny":["PUNS","SLAPSTICK"]}`, - &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ - proto3pb.Message_PUNS, - proto3pb.Message_SLAPSTICK, - }}}, - {"repeated proto3 enum as int", Unmarshaler{}, `{"rFunny":[1,2]}`, - &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ - proto3pb.Message_PUNS, - proto3pb.Message_SLAPSTICK, - }}}, - {"repeated proto3 enum as mix of strings and ints", Unmarshaler{}, `{"rFunny":["PUNS",2]}`, - &proto3pb.Message{RFunny: []proto3pb.Message_Humour{ - proto3pb.Message_PUNS, - proto3pb.Message_SLAPSTICK, - }}}, - {"unquoted int64 object", Unmarshaler{}, `{"oInt64":-314}`, &pb.Simple{OInt64: proto.Int64(-314)}}, - {"unquoted uint64 object", Unmarshaler{}, `{"oUint64":123}`, &pb.Simple{OUint64: proto.Uint64(123)}}, - {"NaN", Unmarshaler{}, `{"oDouble":"NaN"}`, &pb.Simple{ODouble: proto.Float64(math.NaN())}}, - {"Inf", Unmarshaler{}, `{"oFloat":"Infinity"}`, &pb.Simple{OFloat: proto.Float32(float32(math.Inf(1)))}}, - {"-Inf", Unmarshaler{}, `{"oDouble":"-Infinity"}`, &pb.Simple{ODouble: proto.Float64(math.Inf(-1))}}, - {"map", Unmarshaler{}, `{"nummy":{"1":2,"3":4}}`, &pb.Mappy{Nummy: map[int64]int32{1: 2, 3: 4}}}, - {"map", Unmarshaler{}, `{"strry":{"\"one\"":"two","three":"four"}}`, &pb.Mappy{Strry: map[string]string{`"one"`: "two", "three": "four"}}}, - {"map", Unmarshaler{}, `{"objjy":{"1":{"dub":1}}}`, &pb.Mappy{Objjy: map[int32]*pb.Simple3{1: {Dub: 1}}}}, - {"proto2 extension", Unmarshaler{}, realNumberJSON, realNumber}, - // TODO does not work with go version 1.7, but works with go version 1.8 {"Any with message", Unmarshaler{}, anySimpleJSON, anySimple}, - // TODO does not work with go version 1.7, but works with go version 1.8 {"Any with message and indent", Unmarshaler{}, anySimplePrettyJSON, anySimple}, - {"Any with WKT", Unmarshaler{}, anyWellKnownJSON, anyWellKnown}, - {"Any with WKT and indent", Unmarshaler{}, anyWellKnownPrettyJSON, anyWellKnown}, - // TODO: This is broken. - //{"map", Unmarshaler{}, `{"enumy":{"XIV":"ROMAN"}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, - {"map", Unmarshaler{}, `{"enumy":{"XIV":2}}`, &pb.Mappy{Enumy: map[string]pb.Numeral{"XIV": pb.Numeral_ROMAN}}}, - {"oneof", Unmarshaler{}, `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{Salary: 31000}}}, - {"oneof spec name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{Country: "Australia"}}}, - {"oneof orig_name", Unmarshaler{}, `{"Country":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Country{Country: "Australia"}}}, - {"oneof spec name2", Unmarshaler{}, `{"homeAddress":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{HomeAddress: "Australia"}}}, - {"oneof orig_name2", Unmarshaler{}, `{"home_address":"Australia"}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_HomeAddress{HomeAddress: "Australia"}}}, - {"orig_name input", Unmarshaler{}, `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, - {"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}}, - {"Duration", Unmarshaler{}, `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &types.Duration{Seconds: 3}}}, - {"null Duration", Unmarshaler{}, `{"dur":null}`, &pb.KnownTypes{Dur: nil}}, - {"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: 14e8, Nanos: 21e6}}}, - {"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: -2, Nanos: 999999995}}}, - {"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &types.Timestamp{Seconds: -62135596800, Nanos: 0}}}, - {"null Timestamp", Unmarshaler{}, `{"ts":null}`, &pb.KnownTypes{Ts: nil}}, - {"null Struct", Unmarshaler{}, `{"st": null}`, &pb.KnownTypes{St: nil}}, - {"empty Struct", Unmarshaler{}, `{"st": {}}`, &pb.KnownTypes{St: &types.Struct{}}}, - {"basic Struct", Unmarshaler{}, `{"st": {"a": "x", "b": null, "c": 3, "d": true}}`, &pb.KnownTypes{St: &types.Struct{Fields: map[string]*types.Value{ - "a": {Kind: &types.Value_StringValue{StringValue: "x"}}, - "b": {Kind: &types.Value_NullValue{}}, - "c": {Kind: &types.Value_NumberValue{NumberValue: 3}}, - "d": {Kind: &types.Value_BoolValue{BoolValue: true}}, - }}}}, - {"nested Struct", Unmarshaler{}, `{"st": {"a": {"b": 1, "c": [{"d": true}, "f"]}}}`, &pb.KnownTypes{St: &types.Struct{Fields: map[string]*types.Value{ - "a": {Kind: &types.Value_StructValue{StructValue: &types.Struct{Fields: map[string]*types.Value{ - "b": {Kind: &types.Value_NumberValue{NumberValue: 1}}, - "c": {Kind: &types.Value_ListValue{ListValue: &types.ListValue{Values: []*types.Value{ - {Kind: &types.Value_StructValue{StructValue: &types.Struct{Fields: map[string]*types.Value{"d": {Kind: &types.Value_BoolValue{BoolValue: true}}}}}}, - {Kind: &types.Value_StringValue{StringValue: "f"}}, - }}}}, - }}}}, - }}}}, - {"null ListValue", Unmarshaler{}, `{"lv": null}`, &pb.KnownTypes{Lv: nil}}, - {"empty ListValue", Unmarshaler{}, `{"lv": []}`, &pb.KnownTypes{Lv: &types.ListValue{}}}, - {"basic ListValue", Unmarshaler{}, `{"lv": ["x", null, 3, true]}`, &pb.KnownTypes{Lv: &types.ListValue{Values: []*types.Value{ - {Kind: &types.Value_StringValue{StringValue: "x"}}, - {Kind: &types.Value_NullValue{}}, - {Kind: &types.Value_NumberValue{NumberValue: 3}}, - {Kind: &types.Value_BoolValue{BoolValue: true}}, - }}}}, - {"number Value", Unmarshaler{}, `{"val":1}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NumberValue{NumberValue: 1}}}}, - {"null Value", Unmarshaler{}, `{"val":null}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_NullValue{NullValue: types.NULL_VALUE}}}}, - {"bool Value", Unmarshaler{}, `{"val":true}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_BoolValue{BoolValue: true}}}}, - {"string Value", Unmarshaler{}, `{"val":"x"}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "x"}}}}, - {"string number value", Unmarshaler{}, `{"val":"9223372036854775807"}`, &pb.KnownTypes{Val: &types.Value{Kind: &types.Value_StringValue{StringValue: "9223372036854775807"}}}}, - {"list of lists Value", Unmarshaler{}, `{"val":["x", [["y"], "z"]]}`, &pb.KnownTypes{Val: &types.Value{ - Kind: &types.Value_ListValue{ListValue: &types.ListValue{ - Values: []*types.Value{ - {Kind: &types.Value_StringValue{StringValue: "x"}}, - {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ - Values: []*types.Value{ - {Kind: &types.Value_ListValue{ListValue: &types.ListValue{ - Values: []*types.Value{{Kind: &types.Value_StringValue{StringValue: "y"}}}, - }}}, - {Kind: &types.Value_StringValue{StringValue: "z"}}, - }, - }}}, - }, - }}}}}, - - {"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &types.DoubleValue{Value: 1.2}}}, - {"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &types.FloatValue{Value: 1.2}}}, - {"Int64Value", Unmarshaler{}, `{"i64":"-3"}`, &pb.KnownTypes{I64: &types.Int64Value{Value: -3}}}, - {"UInt64Value", Unmarshaler{}, `{"u64":"3"}`, &pb.KnownTypes{U64: &types.UInt64Value{Value: 3}}}, - {"Int32Value", Unmarshaler{}, `{"i32":-4}`, &pb.KnownTypes{I32: &types.Int32Value{Value: -4}}}, - {"UInt32Value", Unmarshaler{}, `{"u32":4}`, &pb.KnownTypes{U32: &types.UInt32Value{Value: 4}}}, - {"BoolValue", Unmarshaler{}, `{"bool":true}`, &pb.KnownTypes{Bool: &types.BoolValue{Value: true}}}, - {"StringValue", Unmarshaler{}, `{"str":"plush"}`, &pb.KnownTypes{Str: &types.StringValue{Value: "plush"}}}, - {"BytesValue", Unmarshaler{}, `{"bytes":"d293"}`, &pb.KnownTypes{Bytes: &types.BytesValue{Value: []byte("wow")}}}, - // Ensure that `null` as a value ends up with a nil pointer instead of a [type]Value struct. - {"null DoubleValue", Unmarshaler{}, `{"dbl":null}`, &pb.KnownTypes{Dbl: nil}}, - {"null FloatValue", Unmarshaler{}, `{"flt":null}`, &pb.KnownTypes{Flt: nil}}, - {"null Int64Value", Unmarshaler{}, `{"i64":null}`, &pb.KnownTypes{I64: nil}}, - {"null UInt64Value", Unmarshaler{}, `{"u64":null}`, &pb.KnownTypes{U64: nil}}, - {"null Int32Value", Unmarshaler{}, `{"i32":null}`, &pb.KnownTypes{I32: nil}}, - {"null UInt32Value", Unmarshaler{}, `{"u32":null}`, &pb.KnownTypes{U32: nil}}, - {"null BoolValue", Unmarshaler{}, `{"bool":null}`, &pb.KnownTypes{Bool: nil}}, - {"null StringValue", Unmarshaler{}, `{"str":null}`, &pb.KnownTypes{Str: nil}}, - {"null BytesValue", Unmarshaler{}, `{"bytes":null}`, &pb.KnownTypes{Bytes: nil}}, -} - -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 := tt.unmarshaler.Unmarshal(strings.NewReader(tt.json), p) - if err != nil { - t.Errorf("%s: %v", tt.desc, 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) - } - } -} - -func TestUnmarshalNullArray(t *testing.T) { - var repeats pb.Repeats - if err := UnmarshalString(`{"rBool":null}`, &repeats); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(repeats, pb.Repeats{}) { - t.Errorf("got non-nil fields in [%#v]", repeats) - } -} - -func TestUnmarshalNullObject(t *testing.T) { - var maps pb.Maps - if err := UnmarshalString(`{"mInt64Str":null}`, &maps); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(maps, pb.Maps{}) { - t.Errorf("got non-nil fields in [%#v]", maps) - } -} - -func TestUnmarshalNext(t *testing.T) { - // We only need to check against a few, not all of them. - tests := unmarshalingTests[:5] - - // Create a buffer with many concatenated JSON objects. - var b bytes.Buffer - for _, tt := range tests { - b.WriteString(tt.json) - } - - dec := json.NewDecoder(&b) - for _, tt := range tests { - // Make a new instance of the type of our expected object. - p := reflect.New(reflect.TypeOf(tt.pb).Elem()).Interface().(proto.Message) - - err := tt.unmarshaler.UnmarshalNext(dec, p) - if err != nil { - t.Errorf("%s: %v", tt.desc, 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) - } - } - - p := &pb.Simple{} - err := new(Unmarshaler).UnmarshalNext(dec, p) - if err != io.EOF { - t.Errorf("eof: got %v, expected io.EOF", err) - } -} - -var unmarshalingShouldError = []struct { - desc string - in string - pb proto.Message -}{ - {"a value", "666", new(pb.Simple)}, - {"gibberish", "{adskja123;l23=-=", new(pb.Simple)}, - {"unknown field", `{"unknown": "foo"}`, 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) - } - } -} - -type funcResolver func(turl string) (proto.Message, error) - -func (fn funcResolver) Resolve(turl string) (proto.Message, error) { - return fn(turl) -} - -func TestAnyWithCustomResolver(t *testing.T) { - var resolvedTypeUrls []string - resolver := funcResolver(func(turl string) (proto.Message, error) { - resolvedTypeUrls = append(resolvedTypeUrls, turl) - return new(pb.Simple), nil - }) - msg := &pb.Simple{ - OBytes: []byte{1, 2, 3, 4}, - OBool: proto.Bool(true), - OString: proto.String("foobar"), - OInt64: proto.Int64(1020304), - } - msgBytes, err := proto.Marshal(msg) - if err != nil { - t.Errorf("an unexpected error occurred when marshaling message: %v", err) - } - // make an Any with a type URL that won't resolve w/out custom resolver - any := &types.Any{ - TypeUrl: "https://foobar.com/some.random.MessageKind", - Value: msgBytes, - } - - m := Marshaler{AnyResolver: resolver} - js, err := m.MarshalToString(any) - if err != nil { - t.Errorf("an unexpected error occurred when marshaling any to JSON: %v", err) - } - if len(resolvedTypeUrls) != 1 { - t.Errorf("custom resolver was not invoked during marshaling") - } else if resolvedTypeUrls[0] != "https://foobar.com/some.random.MessageKind" { - t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[0], "https://foobar.com/some.random.MessageKind") - } - wanted := `{"@type":"https://foobar.com/some.random.MessageKind","oBool":true,"oInt64":"1020304","oString":"foobar","oBytes":"AQIDBA=="}` - if js != wanted { - t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", js, wanted) - } - - u := Unmarshaler{AnyResolver: resolver} - roundTrip := &types.Any{} - err = u.Unmarshal(bytes.NewReader([]byte(js)), roundTrip) - if err != nil { - t.Errorf("an unexpected error occurred when unmarshaling any from JSON: %v", err) - } - if len(resolvedTypeUrls) != 2 { - t.Errorf("custom resolver was not invoked during marshaling") - } else if resolvedTypeUrls[1] != "https://foobar.com/some.random.MessageKind" { - t.Errorf("custom resolver was invoked with wrong URL: got %q, wanted %q", resolvedTypeUrls[1], "https://foobar.com/some.random.MessageKind") - } - if !proto.Equal(any, roundTrip) { - t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", roundTrip, any) - } -} - -func TestUnmarshalJSONPBUnmarshaler(t *testing.T) { - rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }` - var msg dynamicMessage - if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil { - t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) - } - if msg.rawJson != rawJson { - t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", msg.rawJson, rawJson) - } -} - -func TestUnmarshalNullWithJSONPBUnmarshaler(t *testing.T) { - rawJson := `{"stringField":null}` - var ptrFieldMsg ptrFieldMessage - if err := Unmarshal(strings.NewReader(rawJson), &ptrFieldMsg); err != nil { - t.Errorf("unmarshal error: %v", err) - } - - want := ptrFieldMessage{StringField: &stringField{IsSet: true, StringValue: "null"}} - if !proto.Equal(&ptrFieldMsg, &want) { - t.Errorf("unmarshal result StringField: got %v, want %v", ptrFieldMsg, want) - } -} - -func TestUnmarshalAnyJSONPBUnmarshaler(t *testing.T) { - rawJson := `{ "@type": "blah.com/` + dynamicMessageName + `", "foo": "bar", "baz": [0, 1, 2, 3] }` - var got types.Any - if err := Unmarshal(strings.NewReader(rawJson), &got); err != nil { - t.Errorf("an unexpected error occurred when parsing into JSONPBUnmarshaler: %v", err) - } - - dm := &dynamicMessage{rawJson: `{"baz":[0,1,2,3],"foo":"bar"}`} - var want types.Any - if b, err := proto.Marshal(dm); err != nil { - t.Errorf("an unexpected error occurred when marshaling message: %v", err) - } else { - want.TypeUrl = "blah.com/" + dynamicMessageName - want.Value = b - } - - if !proto.Equal(&got, &want) { - t.Errorf("message contents not set correctly after unmarshalling JSON: got %s, wanted %s", got, want) - } -} - -const ( - dynamicMessageName = "google.protobuf.jsonpb.testing.dynamicMessage" -) - -func init() { - // we register the custom type below so that we can use it in Any types - proto.RegisterType((*dynamicMessage)(nil), dynamicMessageName) -} - -type ptrFieldMessage struct { - StringField *stringField `protobuf:"bytes,1,opt,name=stringField"` -} - -func (m *ptrFieldMessage) Reset() { -} - -func (m *ptrFieldMessage) String() string { - return m.StringField.StringValue -} - -func (m *ptrFieldMessage) ProtoMessage() { -} - -type stringField struct { - IsSet bool `protobuf:"varint,1,opt,name=isSet"` - StringValue string `protobuf:"bytes,2,opt,name=stringValue"` -} - -func (s *stringField) Reset() { -} - -func (s *stringField) String() string { - return s.StringValue -} - -func (s *stringField) ProtoMessage() { -} - -func (s *stringField) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { - s.IsSet = true - s.StringValue = string(js) - return nil -} - -// dynamicMessage implements protobuf.Message but is not a normal generated message type. -// It provides implementations of JSONPBMarshaler and JSONPBUnmarshaler for JSON support. -type dynamicMessage struct { - rawJson string `protobuf:"bytes,1,opt,name=rawJson"` -} - -func (m *dynamicMessage) Reset() { - m.rawJson = "{}" -} - -func (m *dynamicMessage) String() string { - return m.rawJson -} - -func (m *dynamicMessage) ProtoMessage() { -} - -func (m *dynamicMessage) MarshalJSONPB(jm *Marshaler) ([]byte, error) { - return []byte(m.rawJson), nil -} - -func (m *dynamicMessage) UnmarshalJSONPB(jum *Unmarshaler, js []byte) error { - m.rawJson = string(js) - return nil -} diff --git a/vendor/github.com/gogo/protobuf/proto/all_test.go b/vendor/github.com/gogo/protobuf/proto/all_test.go deleted file mode 100644 index b5f8709d8..000000000 --- a/vendor/github.com/gogo/protobuf/proto/all_test.go +++ /dev/null @@ -1,2278 +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 - errType reflect.Type - }{ - { - name: "Marshaler that fails", - m: &fakeMarshaler{ - err: errors.New("some marshal err"), - b: []byte{5, 6, 7}, - }, - // Since the Marshal method returned bytes, they should be written to the - // buffer. (For efficiency, we assume that Marshal implementations are - // always correct w.r.t. RequiredNotSetError and output.) - want: []byte{5, 6, 7}, - errType: reflect.TypeOf(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 - }, - errType: reflect.TypeOf(&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}, - }, - } - for _, test := range tests { - b := NewBuffer(nil) - err := b.Marshal(test.m) - if reflect.TypeOf(err) != test.errType { - t.Errorf("%s: got err %T(%v) wanted %T", test.name, err, err, test.errType) - } - if !reflect.DeepEqual(test.want, b.Bytes()) { - t.Errorf("%s: got bytes %v wanted %v", test.name, b.Bytes(), test.want) - } - if size := Size(test.m); size != len(b.Bytes()) { - t.Errorf("%s: Size(_) = %v, but marshaled to %v bytes", test.name, size, len(b.Bytes())) - } - - m, mErr := Marshal(test.m) - if !bytes.Equal(b.Bytes(), m) { - t.Errorf("%s: Marshal returned %v, but (*Buffer).Marshal wrote %v", test.name, m, b.Bytes()) - } - if !reflect.DeepEqual(err, mErr) { - t.Errorf("%s: Marshal err = %q, but (*Buffer).Marshal returned %q", - test.name, fmt.Sprint(mErr), fmt.Sprint(err)) - } - } -} - -// 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 _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Label") { - 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 _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "{Unknown}") { - t.Errorf("unmarshal: bad error type: %v", err) - } -} - -// Verify that absent required fields in groups cause Marshal/Unmarshal to return errors. -func TestRequiredFieldEnforcementGroups(t *testing.T) { - pb := &GoTestRequiredGroupField{Group: &GoTestRequiredGroupField_Group{}} - if _, err := Marshal(pb); err == nil { - t.Error("marshal: expected error, got nil") - } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.Field") { - t.Errorf("marshal: bad error type: %v", err) - } - - buf := []byte{11, 12} - if err := Unmarshal(buf, pb); err == nil { - t.Error("unmarshal: expected error, got nil") - } else if _, ok := err.(*RequiredNotSetError); !ok || !strings.Contains(err.Error(), "Group.{Unknown}") { - t.Errorf("unmarshal: bad error type: %v", err) - } -} - -func TestTypedNilMarshal(t *testing.T) { - // A typed nil should return ErrNil and not crash. - { - var m *GoEnum - if _, err := Marshal(m); err != ErrNil { - t.Errorf("Marshal(%#v): got %v, want ErrNil", m, err) - } - } - - { - m := &Communique{Union: &Communique_Msg{Msg: nil}} - if _, err := Marshal(m); err == nil || err == ErrNil { - t.Errorf("Marshal(%#v): got %v, want errOneofHasNil", m, 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() - mbytes, err := Marshal(pb) - if _, ok := err.(*RequiredNotSetError); !ok { - fmt.Printf("marshal-1 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", mbytes) - t.Fatalf("expected = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-1 wrong err msg: %v", err) - } - if !equal(mbytes, expected, t) { - o.DebugPrint("neq 1", mbytes) - t.Fatalf("expected = %s", expected) - } - - // Now test Unmarshal by recreating the original buffer. - pbd := new(GoTest) - err = Unmarshal(mbytes, pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Fatalf("unmarshal err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", mbytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.{Unknown}") < 0 { - t.Errorf("unmarshal wrong err msg: %v", err) - } - mbytes, err = Marshal(pbd) - if _, ok := err.(*RequiredNotSetError); !ok { - t.Errorf("marshal-2 err = %v, want *RequiredNotSetError", err) - o.DebugPrint("", mbytes) - t.Fatalf("string = %s", expected) - } - if strings.Index(err.Error(), "RequiredField.Label") < 0 { - t.Errorf("marshal-2 wrong err msg: %v", err) - } - if !equal(mbytes, expected, t) { - o.DebugPrint("neq 2", mbytes) - 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) { - m1 := &MessageWithMap{ - MsgMapping: map[int64]*FloatingPoint{ - 1: nil, - }, - } - b, err := Marshal(m1) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - m2 := new(MessageWithMap) - if err := Unmarshal(b, m2); err != nil { - t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) - } - if v, ok := m2.MsgMapping[1]; !ok { - t.Error("msg_mapping[1] not present") - } else if v != nil { - t.Errorf("msg_mapping[1] not nil: %v", v) - } -} - -func TestMapFieldWithNilBytes(t *testing.T) { - m1 := &MessageWithMap{ - ByteMapping: map[bool][]byte{ - false: {}, - true: nil, - }, - } - n := Size(m1) - b, err := Marshal(m1) - if err != nil { - t.Fatalf("Marshal: %v", err) - } - if n != len(b) { - t.Errorf("Size(m1) = %d; want len(Marshal(m1)) = %d", n, len(b)) - } - m2 := new(MessageWithMap) - if err := Unmarshal(b, m2); err != nil { - t.Fatalf("Unmarshal: %v, got these bytes: %v", err, b) - } - if v, ok := m2.ByteMapping[false]; !ok { - t.Error("byte_mapping[false] not present") - } else if len(v) != 0 { - t.Errorf("byte_mapping[false] not empty: %#v", v) - } - if v, ok := m2.ByteMapping[true]; !ok { - t.Error("byte_mapping[true] not present") - } else if len(v) != 0 { - t.Errorf("byte_mapping[true] not empty: %#v", v) - } -} - -func TestDecodeMapFieldMissingKey(t *testing.T) { - b := []byte{ - 0x0A, 0x03, // message, tag 1 (name_mapping), of length 3 bytes - // no key - 0x12, 0x01, 0x6D, // string value of length 1 byte, value "m" - } - got := &MessageWithMap{} - err := Unmarshal(b, got) - if err != nil { - t.Fatalf("failed to marshal map with missing key: %v", err) - } - want := &MessageWithMap{NameMapping: map[int32]string{0: "m"}} - if !Equal(got, want) { - t.Errorf("Unmarshaled map with no key was not as expected. got: %v, want %v", got, want) - } -} - -func TestDecodeMapFieldMissingValue(t *testing.T) { - b := []byte{ - 0x0A, 0x02, // message, tag 1 (name_mapping), of length 2 bytes - 0x08, 0x01, // varint key, value 1 - // no value - } - got := &MessageWithMap{} - err := Unmarshal(b, got) - if err != nil { - t.Fatalf("failed to marshal map with missing value: %v", err) - } - want := &MessageWithMap{NameMapping: map[int32]string{1: ""}} - if !Equal(got, want) { - t.Errorf("Unmarshaled map with no value was not as expected. got: %v, want %v", got, want) - } -} - -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{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{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/github.com/gogo/protobuf/proto/any_test.go b/vendor/github.com/gogo/protobuf/proto/any_test.go deleted file mode 100644 index f098d8287..000000000 --- a/vendor/github.com/gogo/protobuf/proto/any_test.go +++ /dev/null @@ -1,300 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 ( - "strings" - "testing" - - "github.com/gogo/protobuf/proto" - - pb "github.com/gogo/protobuf/proto/proto3_proto" - testpb "github.com/gogo/protobuf/proto/testdata" - "github.com/gogo/protobuf/types" -) - -var ( - expandedMarshaler = proto.TextMarshaler{ExpandAny: true} - expandedCompactMarshaler = proto.TextMarshaler{Compact: true, ExpandAny: true} -) - -// anyEqual reports whether two messages which may be google.protobuf.Any or may -// contain google.protobuf.Any fields are equal. We can't use proto.Equal for -// comparison, because semantically equivalent messages may be marshaled to -// binary in different tag order. Instead, trust that TextMarshaler with -// ExpandAny option works and compare the text marshaling results. -func anyEqual(got, want proto.Message) bool { - // if messages are proto.Equal, no need to marshal. - if proto.Equal(got, want) { - return true - } - g := expandedMarshaler.Text(got) - w := expandedMarshaler.Text(want) - return g == w -} - -type golden struct { - m proto.Message - t, c string -} - -var goldenMessages = makeGolden() - -func makeGolden() []golden { - nested := &pb.Nested{Bunny: "Monty"} - nb, err := proto.Marshal(nested) - if err != nil { - panic(err) - } - m1 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m2 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &types.Any{TypeUrl: "http://[::1]/type.googleapis.com/" + proto.MessageName(nested), Value: nb}, - } - m3 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &types.Any{TypeUrl: `type.googleapis.com/"/` + proto.MessageName(nested), Value: nb}, - } - m4 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &types.Any{TypeUrl: "type.googleapis.com/a/path/" + proto.MessageName(nested), Value: nb}, - } - m5 := &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(nested), Value: nb} - - any1 := &testpb.MyMessage{Count: proto.Int32(47), Name: proto.String("David")} - proto.SetExtension(any1, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("foo")}) - proto.SetExtension(any1, testpb.E_Ext_Text, proto.String("bar")) - any1b, err := proto.Marshal(any1) - if err != nil { - panic(err) - } - any2 := &testpb.MyMessage{Count: proto.Int32(42), Bikeshed: testpb.MyMessage_GREEN.Enum(), RepBytes: [][]byte{[]byte("roboto")}} - proto.SetExtension(any2, testpb.E_Ext_More, &testpb.Ext{Data: proto.String("baz")}) - any2b, err := proto.Marshal(any2) - if err != nil { - panic(err) - } - m6 := &pb.Message{ - Name: "David", - ResultCount: 47, - Anything: &types.Any{TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, - ManyThings: []*types.Any{ - {TypeUrl: "type.googleapis.com/" + proto.MessageName(any2), Value: any2b}, - {TypeUrl: "type.googleapis.com/" + proto.MessageName(any1), Value: any1b}, - }, - } - - const ( - m1Golden = ` -name: "David" -result_count: 47 -anything: < - [type.googleapis.com/proto3_proto.Nested]: < - bunny: "Monty" - > -> -` - m2Golden = ` -name: "David" -result_count: 47 -anything: < - ["http://[::1]/type.googleapis.com/proto3_proto.Nested"]: < - bunny: "Monty" - > -> -` - m3Golden = ` -name: "David" -result_count: 47 -anything: < - ["type.googleapis.com/\"/proto3_proto.Nested"]: < - bunny: "Monty" - > -> -` - m4Golden = ` -name: "David" -result_count: 47 -anything: < - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Monty" - > -> -` - m5Golden = ` -[type.googleapis.com/proto3_proto.Nested]: < - bunny: "Monty" -> -` - m6Golden = ` -name: "David" -result_count: 47 -anything: < - [type.googleapis.com/testdata.MyMessage]: < - count: 47 - name: "David" - [testdata.Ext.more]: < - data: "foo" - > - [testdata.Ext.text]: "bar" - > -> -many_things: < - [type.googleapis.com/testdata.MyMessage]: < - count: 42 - bikeshed: GREEN - rep_bytes: "roboto" - [testdata.Ext.more]: < - data: "baz" - > - > -> -many_things: < - [type.googleapis.com/testdata.MyMessage]: < - count: 47 - name: "David" - [testdata.Ext.more]: < - data: "foo" - > - [testdata.Ext.text]: "bar" - > -> -` - ) - return []golden{ - {m1, strings.TrimSpace(m1Golden) + "\n", strings.TrimSpace(compact(m1Golden)) + " "}, - {m2, strings.TrimSpace(m2Golden) + "\n", strings.TrimSpace(compact(m2Golden)) + " "}, - {m3, strings.TrimSpace(m3Golden) + "\n", strings.TrimSpace(compact(m3Golden)) + " "}, - {m4, strings.TrimSpace(m4Golden) + "\n", strings.TrimSpace(compact(m4Golden)) + " "}, - {m5, strings.TrimSpace(m5Golden) + "\n", strings.TrimSpace(compact(m5Golden)) + " "}, - {m6, strings.TrimSpace(m6Golden) + "\n", strings.TrimSpace(compact(m6Golden)) + " "}, - } -} - -func TestMarshalGolden(t *testing.T) { - for _, tt := range goldenMessages { - if got, want := expandedMarshaler.Text(tt.m), tt.t; got != want { - t.Errorf("message %v: got:\n%s\nwant:\n%s", tt.m, got, want) - } - if got, want := expandedCompactMarshaler.Text(tt.m), tt.c; got != want { - t.Errorf("message %v: got:\n`%s`\nwant:\n`%s`", tt.m, got, want) - } - } -} - -func TestUnmarshalGolden(t *testing.T) { - for _, tt := range goldenMessages { - want := tt.m - got := proto.Clone(tt.m) - got.Reset() - if err := proto.UnmarshalText(tt.t, got); err != nil { - t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.t, err) - } - if !anyEqual(got, want) { - t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.t, got, want) - } - got.Reset() - if err := proto.UnmarshalText(tt.c, got); err != nil { - t.Errorf("failed to unmarshal\n%s\nerror: %v", tt.c, err) - } - if !anyEqual(got, want) { - t.Errorf("message:\n%s\ngot:\n%s\nwant:\n%s", tt.c, got, want) - } - } -} - -func TestMarshalUnknownAny(t *testing.T) { - m := &pb.Message{ - Anything: &types.Any{ - TypeUrl: "foo", - Value: []byte("bar"), - }, - } - want := `anything: < - type_url: "foo" - value: "bar" -> -` - got := expandedMarshaler.Text(m) - if got != want { - t.Errorf("got\n`%s`\nwant\n`%s`", got, want) - } -} - -func TestAmbiguousAny(t *testing.T) { - pb := &types.Any{} - err := proto.UnmarshalText(` - type_url: "ttt/proto3_proto.Nested" - value: "\n\x05Monty" - `, pb) - t.Logf("result: %v (error: %v)", expandedMarshaler.Text(pb), err) - if err != nil { - t.Errorf("failed to parse ambiguous Any message: %v", err) - } -} - -func TestUnmarshalOverwriteAny(t *testing.T) { - pb := &types.Any{} - err := proto.UnmarshalText(` - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Monty" - > - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Rabbit of Caerbannog" - > - `, pb) - want := `line 7: Any message unpacked multiple times, or "type_url" already set` - if err.Error() != want { - t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) - } -} - -func TestUnmarshalAnyMixAndMatch(t *testing.T) { - pb := &types.Any{} - err := proto.UnmarshalText(` - value: "\n\x05Monty" - [type.googleapis.com/a/path/proto3_proto.Nested]: < - bunny: "Rabbit of Caerbannog" - > - `, pb) - want := `line 5: Any message unpacked multiple times, or "value" already set` - if err.Error() != want { - t.Errorf("incorrect error.\nHave: %v\nWant: %v", err.Error(), want) - } -} diff --git a/vendor/github.com/gogo/protobuf/proto/clone_test.go b/vendor/github.com/gogo/protobuf/proto/clone_test.go deleted file mode 100644 index 1a16eb554..000000000 --- a/vendor/github.com/gogo/protobuf/proto/clone_test.go +++ /dev/null @@ -1,300 +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)}, - 0x4002: { - 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", - }, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4002: { - F: proto.Float64(3.0), - Exact: proto.Bool(true), - }, // the entire message should be overwritten - }, - }, - want: &pb.MessageWithMap{ - NameMapping: map[int32]string{ - 6: "Nigel", - 7: "Andrew", - }, - MsgMapping: map[int64]*pb.FloatingPoint{ - 0x4001: {F: proto.Float64(2.0)}, - 0x4002: { - 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"}, - }, - }, - { - src: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": {Cute: true}, // replace - "kay_b": {Bunny: "rabbit"}, // insert - }, - }, - dst: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": {Bunny: "lost"}, // replaced - "kay_c": {Bunny: "bunny"}, // keep - }, - }, - want: &proto3pb.Message{ - Terrain: map[string]*proto3pb.Nested{ - "kay_a": {Cute: true}, - "kay_b": {Bunny: "rabbit"}, - "kay_c": {Bunny: "bunny"}, - }, - }, - }, -} - -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/github.com/gogo/protobuf/proto/decode_test.go b/vendor/github.com/gogo/protobuf/proto/decode_test.go deleted file mode 100644 index 64d4decd9..000000000 --- a/vendor/github.com/gogo/protobuf/proto/decode_test.go +++ /dev/null @@ -1,262 +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. - -// +build go1.7 - -package proto_test - -import ( - "testing" - - "github.com/gogo/protobuf/proto" - tpb "github.com/gogo/protobuf/proto/proto3_proto" -) - -var ( - bytesBlackhole []byte - msgBlackhole = new(tpb.Message) -) - -// Disabled this Benchmark because it is using features (b.Run) from go1.7 and gogoprotobuf still have compatibility with go1.5 -// BenchmarkVarint32ArraySmall shows the performance on an array of small int32 fields (1 and -// 2 bytes long). -// func BenchmarkVarint32ArraySmall(b *testing.B) { -// for i := uint(1); i <= 10; i++ { -// dist := genInt32Dist([7]int{0, 3, 1}, 1<unmarshal. -} - -func TestMarshalUnmarshalRepeatedExtension(t *testing.T) { - // Add a repeated extension to the result. - tests := []struct { - name string - ext []*pb.ComplexExtension - }{ - { - "two fields", - []*pb.ComplexExtension{ - {First: proto.Int32(7)}, - {Second: proto.Int32(11)}, - }, - }, - { - "repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {Third: []int32{2000}}, - }, - }, - { - "two fields and repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {First: proto.Int32(9)}, - {Second: proto.Int32(21)}, - {Third: []int32{2000}}, - }, - }, - } - for _, test := range tests { - // Marshal message with a repeated extension. - msg1 := new(pb.OtherMessage) - err := proto.SetExtension(msg1, pb.E_RComplex, test.ext) - if err != nil { - t.Fatalf("[%s] Error setting extension: %v", test.name, err) - } - b, err := proto.Marshal(msg1) - if err != nil { - t.Fatalf("[%s] Error marshaling message: %v", test.name, err) - } - - // Unmarshal and read the merged proto. - msg2 := new(pb.OtherMessage) - err = proto.Unmarshal(b, msg2) - if err != nil { - t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) - } - e, err := proto.GetExtension(msg2, pb.E_RComplex) - if err != nil { - t.Fatalf("[%s] Error getting extension: %v", test.name, err) - } - ext := e.([]*pb.ComplexExtension) - if ext == nil { - t.Fatalf("[%s] Invalid extension", test.name) - } - if !reflect.DeepEqual(ext, test.ext) { - t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, test.ext) - } - } -} - -func TestUnmarshalRepeatingNonRepeatedExtension(t *testing.T) { - // We may see multiple instances of the same extension in the wire - // format. For example, the proto compiler may encode custom options in - // this way. Here, we verify that we merge the extensions together. - tests := []struct { - name string - ext []*pb.ComplexExtension - }{ - { - "two fields", - []*pb.ComplexExtension{ - {First: proto.Int32(7)}, - {Second: proto.Int32(11)}, - }, - }, - { - "repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {Third: []int32{2000}}, - }, - }, - { - "two fields and repeated field", - []*pb.ComplexExtension{ - {Third: []int32{1000}}, - {First: proto.Int32(9)}, - {Second: proto.Int32(21)}, - {Third: []int32{2000}}, - }, - }, - } - for _, test := range tests { - var buf bytes.Buffer - var want pb.ComplexExtension - - // Generate a serialized representation of a repeated extension - // by catenating bytes together. - for i, e := range test.ext { - // Merge to create the wanted proto. - proto.Merge(&want, e) - - // serialize the message - msg := new(pb.OtherMessage) - err := proto.SetExtension(msg, pb.E_Complex, e) - if err != nil { - t.Fatalf("[%s] Error setting extension %d: %v", test.name, i, err) - } - b, err := proto.Marshal(msg) - if err != nil { - t.Fatalf("[%s] Error marshaling message %d: %v", test.name, i, err) - } - buf.Write(b) - } - - // Unmarshal and read the merged proto. - msg2 := new(pb.OtherMessage) - err := proto.Unmarshal(buf.Bytes(), msg2) - if err != nil { - t.Fatalf("[%s] Error unmarshaling message: %v", test.name, err) - } - e, err := proto.GetExtension(msg2, pb.E_Complex) - if err != nil { - t.Fatalf("[%s] Error getting extension: %v", test.name, err) - } - ext := e.(*pb.ComplexExtension) - if ext == nil { - t.Fatalf("[%s] Invalid extension", test.name) - } - if !reflect.DeepEqual(*ext, want) { - t.Errorf("[%s] Wrong value for ComplexExtension: got: %v want: %v\n", test.name, ext, want) - } - } -} - -func TestClearAllExtensions(t *testing.T) { - // unregistered extension - desc := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 101010100, - Name: "emptyextension", - Tag: "varint,0,opt", - } - m := &pb.MyMessage{} - if proto.HasExtension(m, desc) { - t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) - } - if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { - t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) - } - if !proto.HasExtension(m, desc) { - t.Errorf("proto.HasExtension(%s): got false, want true", proto.MarshalTextString(m)) - } - proto.ClearAllExtensions(m) - if proto.HasExtension(m, desc) { - t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m)) - } -} - -func TestMarshalRace(t *testing.T) { - // unregistered extension - desc := &proto.ExtensionDesc{ - ExtendedType: (*pb.MyMessage)(nil), - ExtensionType: (*bool)(nil), - Field: 101010100, - Name: "emptyextension", - Tag: "varint,0,opt", - } - - m := &pb.MyMessage{Count: proto.Int32(4)} - if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil { - t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err) - } - - errChan := make(chan error, 3) - for n := 3; n > 0; n-- { - go func() { - _, err := proto.Marshal(m) - errChan <- err - }() - } - for i := 0; i < 3; i++ { - err := <-errChan - if err != nil { - t.Fatal(err) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/proto/map_test.go b/vendor/github.com/gogo/protobuf/proto/map_test.go deleted file mode 100644 index 18b946d00..000000000 --- a/vendor/github.com/gogo/protobuf/proto/map_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package proto_test - -import ( - "fmt" - "testing" - - "github.com/gogo/protobuf/proto" - ppb "github.com/gogo/protobuf/proto/proto3_proto" -) - -func marshalled() []byte { - m := &ppb.IntMaps{} - for i := 0; i < 1000; i++ { - m.Maps = append(m.Maps, &ppb.IntMap{ - Rtt: map[int32]int32{1: 2}, - }) - } - b, err := proto.Marshal(m) - if err != nil { - panic(fmt.Sprintf("Can't marshal %+v: %v", m, err)) - } - return b -} - -func BenchmarkConcurrentMapUnmarshal(b *testing.B) { - in := marshalled() - b.RunParallel(func(pb *testing.PB) { - for pb.Next() { - var out ppb.IntMaps - if err := proto.Unmarshal(in, &out); err != nil { - b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) - } - } - }) -} - -func BenchmarkSequentialMapUnmarshal(b *testing.B) { - in := marshalled() - b.ResetTimer() - for i := 0; i < b.N; i++ { - var out ppb.IntMaps - if err := proto.Unmarshal(in, &out); err != nil { - b.Errorf("Can't unmarshal ppb.IntMaps: %v", err) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/proto/message_set_test.go b/vendor/github.com/gogo/protobuf/proto/message_set_test.go deleted file mode 100644 index 353a3ea76..000000000 --- a/vendor/github.com/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) - - var extensions XXX_InternalExtensions - if err := UnmarshalMessageSet(b, &extensions); err != nil { - t.Fatalf("UnmarshalMessageSet: %v", err) - } - ext, ok := extensions.p.extensionMap[12345] - if !ok { - t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap) - } - // 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/github.com/gogo/protobuf/proto/proto3_test.go b/vendor/github.com/gogo/protobuf/proto/proto3_test.go deleted file mode 100644 index 75b66c179..000000000 --- a/vendor/github.com/gogo/protobuf/proto/proto3_test.go +++ /dev/null @@ -1,135 +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 TestGettersForBasicTypesExist(t *testing.T) { - var m pb.Message - if got := m.GetNested().GetBunny(); got != "" { - t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got) - } - if got := m.GetNested().GetCute(); got { - t.Errorf("m.GetNested().GetCute() = %t, want false", got) - } -} - -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/github.com/gogo/protobuf/proto/size2_test.go b/vendor/github.com/gogo/protobuf/proto/size2_test.go deleted file mode 100644 index a2729c39a..000000000 --- a/vendor/github.com/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/github.com/gogo/protobuf/proto/size_test.go b/vendor/github.com/gogo/protobuf/proto/size_test.go deleted file mode 100644 index 0a6c1772b..000000000 --- a/vendor/github.com/gogo/protobuf/proto/size_test.go +++ /dev/null @@ -1,164 +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.Oneof{}}, - {"oneof bool", &pb.Oneof{Union: &pb.Oneof_F_Bool{F_Bool: true}}}, - {"oneof zero int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 0}}}, - {"oneof big int32", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1 << 20}}}, - {"oneof int64", &pb.Oneof{Union: &pb.Oneof_F_Int64{F_Int64: 42}}}, - {"oneof fixed32", &pb.Oneof{Union: &pb.Oneof_F_Fixed32{F_Fixed32: 43}}}, - {"oneof fixed64", &pb.Oneof{Union: &pb.Oneof_F_Fixed64{F_Fixed64: 44}}}, - {"oneof uint32", &pb.Oneof{Union: &pb.Oneof_F_Uint32{F_Uint32: 45}}}, - {"oneof uint64", &pb.Oneof{Union: &pb.Oneof_F_Uint64{F_Uint64: 46}}}, - {"oneof float", &pb.Oneof{Union: &pb.Oneof_F_Float{F_Float: 47.1}}}, - {"oneof double", &pb.Oneof{Union: &pb.Oneof_F_Double{F_Double: 48.9}}}, - {"oneof string", &pb.Oneof{Union: &pb.Oneof_F_String{F_String: "Rhythmic Fman"}}}, - {"oneof bytes", &pb.Oneof{Union: &pb.Oneof_F_Bytes{F_Bytes: []byte("let go")}}}, - {"oneof sint32", &pb.Oneof{Union: &pb.Oneof_F_Sint32{F_Sint32: 50}}}, - {"oneof sint64", &pb.Oneof{Union: &pb.Oneof_F_Sint64{F_Sint64: 51}}}, - {"oneof enum", &pb.Oneof{Union: &pb.Oneof_F_Enum{F_Enum: pb.MyMessage_BLUE}}}, - {"message for oneof", &pb.GoTestField{Label: String("k"), Type: String("v")}}, - {"oneof message", &pb.Oneof{Union: &pb.Oneof_F_Message{F_Message: &pb.GoTestField{Label: String("k"), Type: String("v")}}}}, - {"oneof group", &pb.Oneof{Union: &pb.Oneof_FGroup{FGroup: &pb.Oneof_F_Group{X: Int32(52)}}}}, - {"oneof largest tag", &pb.Oneof{Union: &pb.Oneof_F_Largest_Tag{F_Largest_Tag: 1}}}, - {"multiple oneofs", &pb.Oneof{Union: &pb.Oneof_F_Int32{F_Int32: 1}, Tormato: &pb.Oneof_Value{Value: 2}}}, -} - -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/github.com/gogo/protobuf/proto/testdata/golden_test.go b/vendor/github.com/gogo/protobuf/proto/testdata/golden_test.go deleted file mode 100644 index 8e8451537..000000000 --- a/vendor/github.com/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/github.com/gogo/protobuf/proto/text_parser_test.go b/vendor/github.com/gogo/protobuf/proto/text_parser_test.go deleted file mode 100644 index 9a3a447ce..000000000 --- a/vendor/github.com/gogo/protobuf/proto/text_parser_test.go +++ /dev/null @@ -1,673 +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 with double quotes - { - in: `count:42 name: "My name is "` + "\n" + `"elsewhere"`, - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - - // Quoted string concatenation with single quotes - { - in: "count:42 name: 'My name is '\n'elsewhere'", - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - - // Quoted string concatenations with mixed quotes - { - in: "count:42 name: 'My name is '\n\"elsewhere\"", - out: &MyMessage{ - Count: Int32(42), - Name: String("My name is elsewhere"), - }, - }, - { - 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"), - }, - }, - - // Missing required field in a required submessage - { - in: `count: 42 we_must_go_deeper < leo_finally_won_an_oscar <> >`, - err: `proto: required field "testdata.InnerMessage.host" not set`, - out: &MyMessage{ - Count: Int32(42), - WeMustGoDeeper: &RequiredInnerMessage{LeoFinallyWonAnOscar: &InnerMessage{}}, - }, - }, - - // 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"), - }, - }, - - // Boolean false - { - in: `count:42 inner { host: "example.com" connected: false }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean true - { - in: `count:42 inner { host: "example.com" connected: true }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - // Boolean 0 - { - in: `count:42 inner { host: "example.com" connected: 0 }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean 1 - { - in: `count:42 inner { host: "example.com" connected: 1 }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - // Boolean f - { - in: `count:42 inner { host: "example.com" connected: f }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean t - { - in: `count:42 inner { host: "example.com" connected: t }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - // Boolean False - { - in: `count:42 inner { host: "example.com" connected: False }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(false), - }, - }, - }, - // Boolean True - { - in: `count:42 inner { host: "example.com" connected: True }`, - out: &MyMessage{ - Count: Int32(42), - Inner: &InnerMessage{ - Host: String("example.com"), - Connected: Bool(true), - }, - }, - }, - - // 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" - `msg_mapping:>` + // omitted key - `msg_mapping:` + // omitted value - `byte_mapping:` + - `byte_mapping:<>` // omitted key and value - want := &MessageWithMap{ - NameMapping: map[int32]string{ - 1: "Beatles", - 1234: "Feist", - }, - MsgMapping: map[int64]*FloatingPoint{ - -4: {F: Float64(2.0)}, - -2: {F: Float64(4.0)}, - 0: {F: Float64(5.0)}, - 1: nil, - }, - ByteMapping: map[bool][]byte{ - false: nil, - 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{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) - } - - const inOverwrite = `name:"Shrek" number:42` - m = new(Communique) - testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'" - if err := UnmarshalText(inOverwrite, m); err == nil { - t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr) - } else if err.Error() != testErr { - t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v", - err.Error(), testErr) - } - -} - -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/github.com/gogo/protobuf/proto/text_test.go b/vendor/github.com/gogo/protobuf/proto/text_test.go deleted file mode 100644 index 27df6cb9b..000000000 --- a/vendor/github.com/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. - pbStrings := new(pb.Strings) - if err := proto.UnmarshalText(s, pbStrings); err != nil { - t.Errorf("#%d: UnmarshalText: %v", i, err) - continue - } - if !proto.Equal(pbStrings, tc.in) { - t.Errorf("#%d: Round-trip failed:\nstart: %v\n end: %v", i, tc.in, pbStrings) - } - } -} - -// 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/github.com/gogo/protobuf/protobuf/Makefile b/vendor/github.com/gogo/protobuf/protobuf/Makefile deleted file mode 100644 index 6bc7e3ad4..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -URL="https://raw.githubusercontent.com/google/protobuf/master/src/google/protobuf/" - -update: - go install github.com/gogo/protobuf/gogoreplace - - (cd ./google/protobuf && rm descriptor.proto; wget ${URL}/descriptor.proto) - # gogoprotobuf requires users to import gogo.proto which imports descriptor.proto - # The descriptor.proto is only compatible with proto3 just because of the reserved keyword. - # We remove it to stay compatible with previous versions of protoc before proto3 - gogoreplace 'reserved 38;' '//reserved 38;' ./google/protobuf/descriptor.proto - gogoreplace 'reserved 8;' '//reserved 8;' ./google/protobuf/descriptor.proto - gogoreplace 'reserved 9;' '//reserved 9;' ./google/protobuf/descriptor.proto - gogoreplace 'reserved 4;' '//reserved 4;' ./google/protobuf/descriptor.proto - gogoreplace 'reserved 5;' '//reserved 5;' ./google/protobuf/descriptor.proto - gogoreplace 'option go_package = "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor";' 'option go_package = "descriptor";' ./google/protobuf/descriptor.proto - - (cd ./google/protobuf/compiler && rm plugin.proto; wget ${URL}/compiler/plugin.proto) - gogoreplace 'option go_package = "github.com/golang/protobuf/protoc-gen-go/plugin;plugin_go";' 'option go_package = "plugin_go";' ./google/protobuf/compiler/plugin.proto - - (cd ./google/protobuf && rm any.proto; wget ${URL}/any.proto) - gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/any";' 'go_package = "types";' ./google/protobuf/any.proto - (cd ./google/protobuf && rm empty.proto; wget ${URL}/empty.proto) - gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/empty";' 'go_package = "types";' ./google/protobuf/empty.proto - (cd ./google/protobuf && rm timestamp.proto; wget ${URL}/timestamp.proto) - gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/timestamp";' 'go_package = "types";' ./google/protobuf/timestamp.proto - (cd ./google/protobuf && rm duration.proto; wget ${URL}/duration.proto) - gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/duration";' 'go_package = "types";' ./google/protobuf/duration.proto - (cd ./google/protobuf && rm struct.proto; wget ${URL}/struct.proto) - gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/struct;structpb";' 'go_package = "types";' ./google/protobuf/struct.proto - (cd ./google/protobuf && rm wrappers.proto; wget ${URL}/wrappers.proto) - gogoreplace 'go_package = "github.com/golang/protobuf/ptypes/wrappers";' 'go_package = "types";' ./google/protobuf/wrappers.proto - (cd ./google/protobuf && rm field_mask.proto; wget ${URL}/field_mask.proto) - gogoreplace 'option go_package = "google.golang.org/genproto/protobuf/field_mask;field_mask";' 'option go_package = "types";' ./google/protobuf/field_mask.proto - - diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto deleted file mode 100644 index d9519f5cf..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto +++ /dev/null @@ -1,149 +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. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name whose content describes the type of the - // serialized protocol buffer message. - // - // For URLs which use the scheme `http`, `https`, or no scheme, the - // following restrictions and interpretations apply: - // - // * If no scheme is provided, `https` is assumed. - // * The last segment of the URL's path must represent the fully - // qualified name of the type (as in `path/google.protobuf.Duration`). - // The name should be in a canonical form (e.g., leading "." is - // not accepted). - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto deleted file mode 100644 index e85c852fc..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/compiler/plugin.proto +++ /dev/null @@ -1,167 +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"; - -// The version number of protocol compiler. -message Version { - optional int32 major = 1; - optional int32 minor = 2; - optional int32 patch = 3; - // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should - // be empty for mainline stable releases. - optional string suffix = 4; -} - -// 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. - // - // Type names of fields and extensions in the FileDescriptorProto are always - // fully qualified. - repeated FileDescriptorProto proto_file = 15; - - // The version number of protocol compiler. - optional Version compiler_version = 3; - -} - -// 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; -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto deleted file mode 100644 index 411cd9de2..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto +++ /dev/null @@ -1,870 +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"; -option cc_enable_arenas = true; - -// 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; - - optional ExtensionRangeOptions options = 3; - } - 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; -} - -message ExtensionRangeOptions { - // 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; -} - -// 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; - // 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. - TYPE_GROUP = 10; - 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; - }; - - 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; - optional OneofOptions options = 2; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; - - // 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. - message EnumReservedRange { - optional int32 start = 1; // Inclusive. - optional int32 end = 2; // Inclusive. - } - - // 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. - repeated EnumReservedRange reserved_range = 4; - - // Reserved enum value names, which may not be reused. A given name may only - // be reserved once. - repeated string reserved_name = 5; -} - -// 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]; - - // This option does nothing. - optional bool java_generate_equals_and_hash = 20 [deprecated=true]; - - // 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]; - optional bool php_generic_services = 42 [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; - - // 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. - optional string swift_prefix = 39; - - // Sets the php class prefix which is prepended to all php generated classes - // from this .proto. Default is empty. - optional string php_class_prefix = 40; - - // 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. - optional string php_namespace = 41; - - // 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; - - //reserved 38; -} - -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; - - //reserved 8; // javalite_serializable - //reserved 9; // javanano_as_lite - - // 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). 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. - 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 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. - 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; - - //reserved 4; // removed jtype -} - -message OneofOptions { - // 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]; - - //reserved 5; // javanano_as_lite - - // 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]; - - // 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. - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0; - NO_SIDE_EFFECTS = 1; // implies idempotent - IDEMPOTENT = 2; // idempotent, but may have side effects - } - optional IdempotencyLevel idempotency_level = - 34 [default=IDEMPOTENCY_UNKNOWN]; - - // 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; - } -} - -// 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. -message GeneratedCodeInfo { - // An Annotation connects some span of text in generated code to an element - // of its generating .proto file. - repeated Annotation annotation = 1; - message Annotation { - // Identifies the element in the original source .proto file. This field - // is formatted the same as SourceCodeInfo.Location.path. - repeated int32 path = 1 [packed=true]; - - // Identifies the filesystem path to the original source .proto. - optional string source_file = 2; - - // Identifies the starting offset in bytes in the generated code - // that relates to the identified object. - optional int32 begin = 3; - - // 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). - optional int32 end = 4; - } -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto deleted file mode 100644 index 8bbaa8b62..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/duration.proto +++ /dev/null @@ -1,117 +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. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DurationProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Duration represents a signed, fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". It is related to Timestamp in that the difference between -// two Timestamp values is a Duration and it can be added or subtracted -// from a Timestamp. Range is approximately +-10,000 years. -// -// # Examples -// -// Example 1: Compute Duration from two Timestamps in pseudo code. -// -// Timestamp start = ...; -// Timestamp end = ...; -// Duration duration = ...; -// -// duration.seconds = end.seconds - start.seconds; -// duration.nanos = end.nanos - start.nanos; -// -// if (duration.seconds < 0 && duration.nanos > 0) { -// duration.seconds += 1; -// duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; -// duration.nanos += 1000000000; -// } -// -// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -// -// Timestamp start = ...; -// Duration duration = ...; -// Timestamp end = ...; -// -// end.seconds = start.seconds + duration.seconds; -// end.nanos = start.nanos + duration.nanos; -// -// if (end.nanos < 0) { -// end.seconds -= 1; -// end.nanos += 1000000000; -// } else if (end.nanos >= 1000000000) { -// end.seconds += 1; -// end.nanos -= 1000000000; -// } -// -// Example 3: Compute Duration from datetime.timedelta in Python. -// -// td = datetime.timedelta(days=3, minutes=10) -// duration = Duration() -// duration.FromTimedelta(td) -// -// # JSON Mapping -// -// In JSON format, the Duration type is encoded as a string rather than an -// object, where the string ends in the suffix "s" (indicating seconds) and -// is preceded by the number of seconds, with nanoseconds expressed as -// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -// microsecond should be expressed in JSON format as "3.000001s". -// -// -message Duration { - - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto deleted file mode 100644 index 6057c8522..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/empty.proto +++ /dev/null @@ -1,52 +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. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "EmptyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option cc_enable_arenas = true; - -// A generic empty message that you can re-use to avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -message Empty {} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto deleted file mode 100644 index 994af79f0..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto +++ /dev/null @@ -1,246 +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. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "FieldMaskProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option go_package = "types"; - -// `FieldMask` represents a set of symbolic field paths, for example: -// -// paths: "f.a" -// paths: "f.b.d" -// -// Here `f` represents a field in some root message, `a` and `b` -// fields in the message found in `f`, and `d` a field found in the -// message in `f.b`. -// -// Field masks are used to specify a subset of fields that should be -// returned by a get operation or modified by an update operation. -// Field masks also have a custom JSON encoding (see below). -// -// # Field Masks in Projections -// -// When used in the context of a projection, a response message or -// sub-message is filtered by the API to only contain those fields as -// specified in the mask. For example, if the mask in the previous -// example is applied to a response message as follows: -// -// f { -// a : 22 -// b { -// d : 1 -// x : 2 -// } -// y : 13 -// } -// z: 8 -// -// The result will not contain specific values for fields x,y and z -// (their value will be set to the default, and omitted in proto text -// output): -// -// -// f { -// a : 22 -// b { -// d : 1 -// } -// } -// -// A repeated field is not allowed except at the last position of a -// paths string. -// -// If a FieldMask object is not present in a get operation, the -// operation applies to all fields (as if a FieldMask of all fields -// had been specified). -// -// Note that a field mask does not necessarily apply to the -// top-level response message. In case of a REST get operation, the -// field mask applies directly to the response, but in case of a REST -// list operation, the mask instead applies to each individual message -// in the returned resource list. In case of a REST custom method, -// other definitions may be used. Where the mask applies will be -// clearly documented together with its declaration in the API. In -// any case, the effect on the returned resource/resources is required -// behavior for APIs. -// -// # Field Masks in Update Operations -// -// A field mask in update operations specifies which fields of the -// targeted resource are going to be updated. The API is required -// to only change the values of the fields as specified in the mask -// and leave the others untouched. If a resource is passed in to -// describe the updated values, the API ignores the values of all -// fields not covered by the mask. -// -// If a repeated field is specified for an update operation, the existing -// repeated values in the target resource will be overwritten by the new values. -// Note that a repeated field is only allowed in the last position of a `paths` -// string. -// -// If a sub-message is specified in the last position of the field mask for an -// update operation, then the existing sub-message in the target resource is -// overwritten. Given the target message: -// -// f { -// b { -// d : 1 -// x : 2 -// } -// c : 1 -// } -// -// And an update message: -// -// f { -// b { -// d : 10 -// } -// } -// -// then if the field mask is: -// -// paths: "f.b" -// -// then the result will be: -// -// f { -// b { -// d : 10 -// } -// c : 1 -// } -// -// However, if the update mask was: -// -// paths: "f.b.d" -// -// then the result would be: -// -// f { -// b { -// d : 10 -// x : 2 -// } -// c : 1 -// } -// -// In order to reset a field's value to the default, the field must -// be in the mask and set to the default value in the provided resource. -// Hence, in order to reset all fields of a resource, provide a default -// instance of the resource and set all fields in the mask, or do -// not provide a mask as described below. -// -// If a field mask is not present on update, the operation applies to -// all fields (as if a field mask of all fields has been specified). -// Note that in the presence of schema evolution, this may mean that -// fields the client does not know and has therefore not filled into -// the request will be reset to their default. If this is unwanted -// behavior, a specific service may require a client to always specify -// a field mask, producing an error if not. -// -// As with get operations, the location of the resource which -// describes the updated values in the request message depends on the -// operation kind. In any case, the effect of the field mask is -// required to be honored by the API. -// -// ## Considerations for HTTP REST -// -// The HTTP kind of an update operation which uses a field mask must -// be set to PATCH instead of PUT in order to satisfy HTTP semantics -// (PUT must only be used for full updates). -// -// # JSON Encoding of Field Masks -// -// In JSON, a field mask is encoded as a single string where paths are -// separated by a comma. Fields name in each path are converted -// to/from lower-camel naming conventions. -// -// As an example, consider the following message declarations: -// -// message Profile { -// User user = 1; -// Photo photo = 2; -// } -// message User { -// string display_name = 1; -// string address = 2; -// } -// -// In proto a field mask for `Profile` may look as such: -// -// mask { -// paths: "user.display_name" -// paths: "photo" -// } -// -// In JSON, the same mask is represented as below: -// -// { -// mask: "user.displayName,photo" -// } -// -// # Field Masks and Oneof Fields -// -// Field masks treat fields in oneofs just as regular fields. Consider the -// following message: -// -// message SampleMessage { -// oneof test_oneof { -// string name = 4; -// SubMessage sub_message = 9; -// } -// } -// -// The field mask can be: -// -// mask { -// paths: "name" -// } -// -// Or: -// -// mask { -// paths: "sub_message" -// } -// -// Note that oneof type names ("test_oneof" in this case) cannot be used in -// paths. -message FieldMask { - // The set of field mask paths. - repeated string paths = 1; -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto deleted file mode 100644 index 4f78641fa..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/struct.proto +++ /dev/null @@ -1,96 +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. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "StructProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - - -// `Struct` represents a structured data value, consisting of fields -// which map to dynamically typed values. In some languages, `Struct` -// might be supported by a native representation. For example, in -// scripting languages like JS a struct is represented as an -// object. The details of that representation are described together -// with the proto support for the language. -// -// The JSON representation for `Struct` is JSON object. -message Struct { - // Unordered map of dynamically typed values. - map fields = 1; -} - -// `Value` represents a dynamically typed value which can be either -// null, a number, a string, a boolean, a recursive struct value, or a -// list of values. A producer of value is expected to set one of that -// variants, absence of any variant indicates an error. -// -// The JSON representation for `Value` is JSON value. -message Value { - // The kind of value. - oneof kind { - // Represents a null value. - NullValue null_value = 1; - // Represents a double value. - double number_value = 2; - // Represents a string value. - string string_value = 3; - // Represents a boolean value. - bool bool_value = 4; - // Represents a structured value. - Struct struct_value = 5; - // Represents a repeated `Value`. - ListValue list_value = 6; - } -} - -// `NullValue` is a singleton enumeration to represent the null value for the -// `Value` type union. -// -// The JSON representation for `NullValue` is JSON `null`. -enum NullValue { - // Null value. - NULL_VALUE = 0; -} - -// `ListValue` is a wrapper around a repeated field of values. -// -// The JSON representation for `ListValue` is JSON array. -message ListValue { - // Repeated field of dynamically typed values. - repeated Value values = 1; -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto deleted file mode 100644 index 4ba0b97b2..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto +++ /dev/null @@ -1,133 +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. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "TimestampProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// A Timestamp represents a point in time independent of any time zone -// or calendar, represented as seconds and fractions of seconds at -// nanosecond resolution in UTC Epoch time. It is encoded using the -// Proleptic Gregorian Calendar which extends the Gregorian calendar -// backwards to year one. It is encoded assuming all minutes are 60 -// seconds long, i.e. leap seconds are "smeared" so that no leap second -// table is needed for interpretation. Range is from -// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. -// By restricting to that range, we ensure that we can convert to -// and from RFC 3339 date strings. -// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; -// gettimeofday(&tv, NULL); -// -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); -// -// -// Example 5: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() -// timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the -// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, {day}, -// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -// is required, though only UTC (as indicated by "Z") is presently supported. -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] -// method. In Python, a standard `datetime.datetime` object can be converted -// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) -// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one -// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) -// to obtain a formatter capable of generating timestamps in this format. -// -// -message Timestamp { - - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto deleted file mode 100644 index c5632e5ca..000000000 --- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto +++ /dev/null @@ -1,118 +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. - -// Wrappers for primitive (non-message) types. These types are useful -// for embedding primitives in the `google.protobuf.Any` type and for places -// where we need to distinguish between the absence of a primitive -// typed field and its default value. - -syntax = "proto3"; - -package google.protobuf; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option cc_enable_arenas = true; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "WrappersProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// Wrapper message for `double`. -// -// The JSON representation for `DoubleValue` is JSON number. -message DoubleValue { - // The double value. - double value = 1; -} - -// Wrapper message for `float`. -// -// The JSON representation for `FloatValue` is JSON number. -message FloatValue { - // The float value. - float value = 1; -} - -// Wrapper message for `int64`. -// -// The JSON representation for `Int64Value` is JSON string. -message Int64Value { - // The int64 value. - int64 value = 1; -} - -// Wrapper message for `uint64`. -// -// The JSON representation for `UInt64Value` is JSON string. -message UInt64Value { - // The uint64 value. - uint64 value = 1; -} - -// Wrapper message for `int32`. -// -// The JSON representation for `Int32Value` is JSON number. -message Int32Value { - // The int32 value. - int32 value = 1; -} - -// Wrapper message for `uint32`. -// -// The JSON representation for `UInt32Value` is JSON number. -message UInt32Value { - // The uint32 value. - uint32 value = 1; -} - -// Wrapper message for `bool`. -// -// The JSON representation for `BoolValue` is JSON `true` and `false`. -message BoolValue { - // The bool value. - bool value = 1; -} - -// Wrapper message for `string`. -// -// The JSON representation for `StringValue` is JSON string. -message StringValue { - // The string value. - string value = 1; -} - -// Wrapper message for `bytes`. -// -// The JSON representation for `BytesValue` is JSON string. -message BytesValue { - // The bytes value. - bytes value = 1; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go b/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go deleted file mode 100644 index aa0067ece..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-combo/combo.go +++ /dev/null @@ -1,182 +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 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 -} - -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(this.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) - } -} - -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 filterArgs(ss []string) ([]string, []string) { - var args []string - var flags []string - for i := range ss { - if strings.Contains(ss[i], "=") { - flags = append(flags, ss[i]) - continue - } - args = append(args, ss[i]) - } - return flags, args -} - -func main() { - flag.String("version", "2.3.0", "minimum protoc version") - flag.Bool("default", true, "generate the case where everything is false") - flags, args := filterArgs(os.Args[1:]) - var min string - flags, min = filter(flags, "-version") - if len(min) == 0 { - min = "2.3.1" - } - if !version.AtLeast(min) { - fmt.Printf("protoc version not high enough to parse this proto file\n") - return - } - if len(args) != 1 { - fmt.Printf("protoc-gen-combo expects a filename\n") - os.Exit(1) - } - filename := args[0] - var def string - flags, def = filter(flags, "-default") - if _, err := exec.LookPath("protoc"); err != nil { - panic("cannot find protoc in PATH") - } - 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: flags, - } - if def != "false" { - 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;", - }) -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go deleted file mode 100644 index 3562a81ec..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gofast/main.go +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go deleted file mode 100644 index d4248b483..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package descriptor_test - -import ( - "fmt" - "testing" - - tpb "github.com/gogo/protobuf/proto/testdata" - "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func TestMessage(t *testing.T) { - var msg *descriptor.DescriptorProto - fd, md := descriptor.ForMessage(msg) - if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want { - t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want) - } - if name, want := md.GetName(), "DescriptorProto"; name != want { - t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want) - } -} - -func Example_Options() { - var msg *tpb.MyMessageSet - _, md := descriptor.ForMessage(msg) - if md.GetOptions().GetMessageSetWireFormat() { - fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName()) - } - - // Output: - // MyMessageSet uses option message_set_wire_format. -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/doc.go deleted file mode 100644 index 15c7cf43c..000000000 --- a/vendor/github.com/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/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go deleted file mode 100644 index b3b60a3c6..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/name_test.go +++ /dev/null @@ -1,114 +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" - - "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -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) - } - } -} - -func TestGoPackageOption(t *testing.T) { - tests := []struct { - in string - impPath, pkg string - ok bool - }{ - {"", "", "", false}, - {"foo", "", "foo", true}, - {"github.com/golang/bar", "github.com/golang/bar", "bar", true}, - {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true}, - } - for _, tc := range tests { - d := &FileDescriptor{ - FileDescriptorProto: &descriptor.FileDescriptorProto{ - Options: &descriptor.FileOptions{ - GoPackage: &tc.in, - }, - }, - } - impPath, pkg, ok := d.goPackageOption() - if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok { - t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in, - impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok) - } - } -} - -func TestUnescape(t *testing.T) { - tests := []struct { - in string - out string - }{ - // successful cases, including all kinds of escapes - {"", ""}, - {"foo bar baz frob nitz", "foo bar baz frob nitz"}, - {`\000\001\002\003\004\005\006\007`, string([]byte{0, 1, 2, 3, 4, 5, 6, 7})}, - {`\a\b\f\n\r\t\v\\\?\'\"`, string([]byte{'\a', '\b', '\f', '\n', '\r', '\t', '\v', '\\', '?', '\'', '"'})}, - {`\x10\x20\x30\x40\x50\x60\x70\x80`, string([]byte{16, 32, 48, 64, 80, 96, 112, 128})}, - // variable length octal escapes - {`\0\018\222\377\3\04\005\6\07`, string([]byte{0, 1, '8', 0222, 255, 3, 4, 5, 6, 7})}, - // malformed escape sequences left as is - {"foo \\g bar", "foo \\g bar"}, - {"foo \\xg0 bar", "foo \\xg0 bar"}, - {"\\", "\\"}, - {"\\x", "\\x"}, - {"\\xf", "\\xf"}, - {"\\777", "\\777"}, // overflows byte - } - for _, tc := range tests { - s := unescape(tc.in) - if s != tc.out { - t.Errorf("doUnescape(%q) = %q; should have been %q", tc.in, s, tc.out) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/main.go deleted file mode 100644 index dd8e79503..000000000 --- a/vendor/github.com/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/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile deleted file mode 100644 index ce21a1861..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/Makefile +++ /dev/null @@ -1,64 +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: - @echo run make test - -test: regenerate testbuild - -#test: regenerate testbuild extension_test -# ./extension_test -# @echo PASS - -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - protoc-min-version --version="3.0.0" --gogo_out=Mmulti/multi1.proto=github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi:. ./my_test/test.proto - -nuke: clean - -testbuild: buildprotos - go test - -buildprotos: - # Invoke protoc once to generate three independent .pb.go files in the same package. - protoc --gogo_out=. multi/multi1.proto multi/multi2.proto multi/multi3.proto - -#extension_test: extension_test.$O -# $(LD) -L. -o $@ $< - -#multi.a: multi3.pb.$O multi2.pb.$O multi1.pb.$O -# rm -f multi.a -# $(QUOTED_GOBIN)/gopack grc $@ $< - -#test.pb.go: imp.pb.go -#multi1.pb.go: multi2.pb.go multi3.pb.go -#main.$O: imp.pb.$O test.pb.$O multi.a -#extension_test.$O: extension_base.pb.$O extension_extra.pb.$O extension_user.pb.$O diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto deleted file mode 100644 index 94acfc1bc..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_base.proto +++ /dev/null @@ -1,46 +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. - -syntax = "proto2"; - -package extension_base; - -message BaseMessage { - optional int32 height = 1; - extensions 4 to 9; - extensions 16 to max; -} - -// Another message that may be extended, using message_set_wire_format. -message OldStyleMessage { - option message_set_wire_format = true; - extensions 100 to max; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto deleted file mode 100644 index fca7f600c..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_extra.proto +++ /dev/null @@ -1,38 +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. - -syntax = "proto2"; - -package extension_extra; - -message ExtraMessage { - optional int32 width = 1; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go deleted file mode 100644 index 86e9c118a..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_test.go +++ /dev/null @@ -1,210 +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 that we can use protocol buffers that use extensions. - -package testdata - -/* - -import ( - "bytes" - "regexp" - "testing" - - "github.com/golang/protobuf/proto" - base "extension_base.pb" - user "extension_user.pb" -) - -func TestSingleFieldExtension(t *testing.T) { - bm := &base.BaseMessage{ - Height: proto.Int32(178), - } - - // Use extension within scope of another type. - vol := proto.Uint32(11) - err := proto.SetExtension(bm, user.E_LoudMessage_Volume, vol) - if err != nil { - t.Fatal("Failed setting extension:", err) - } - buf, err := proto.Marshal(bm) - if err != nil { - t.Fatal("Failed encoding message with extension:", err) - } - bm_new := new(base.BaseMessage) - if err := proto.Unmarshal(buf, bm_new); err != nil { - t.Fatal("Failed decoding message with extension:", err) - } - if !proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { - t.Fatal("Decoded message didn't contain extension.") - } - vol_out, err := proto.GetExtension(bm_new, user.E_LoudMessage_Volume) - if err != nil { - t.Fatal("Failed getting extension:", err) - } - if v := vol_out.(*uint32); *v != *vol { - t.Errorf("vol_out = %v, expected %v", *v, *vol) - } - proto.ClearExtension(bm_new, user.E_LoudMessage_Volume) - if proto.HasExtension(bm_new, user.E_LoudMessage_Volume) { - t.Fatal("Failed clearing extension.") - } -} - -func TestMessageExtension(t *testing.T) { - bm := &base.BaseMessage{ - Height: proto.Int32(179), - } - - // Use extension that is itself a message. - um := &user.UserMessage{ - Name: proto.String("Dave"), - Rank: proto.String("Major"), - } - err := proto.SetExtension(bm, user.E_LoginMessage_UserMessage, um) - if err != nil { - t.Fatal("Failed setting extension:", err) - } - buf, err := proto.Marshal(bm) - if err != nil { - t.Fatal("Failed encoding message with extension:", err) - } - bm_new := new(base.BaseMessage) - if err := proto.Unmarshal(buf, bm_new); err != nil { - t.Fatal("Failed decoding message with extension:", err) - } - if !proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { - t.Fatal("Decoded message didn't contain extension.") - } - um_out, err := proto.GetExtension(bm_new, user.E_LoginMessage_UserMessage) - if err != nil { - t.Fatal("Failed getting extension:", err) - } - if n := um_out.(*user.UserMessage).Name; *n != *um.Name { - t.Errorf("um_out.Name = %q, expected %q", *n, *um.Name) - } - if r := um_out.(*user.UserMessage).Rank; *r != *um.Rank { - t.Errorf("um_out.Rank = %q, expected %q", *r, *um.Rank) - } - proto.ClearExtension(bm_new, user.E_LoginMessage_UserMessage) - if proto.HasExtension(bm_new, user.E_LoginMessage_UserMessage) { - t.Fatal("Failed clearing extension.") - } -} - -func TestTopLevelExtension(t *testing.T) { - bm := &base.BaseMessage{ - Height: proto.Int32(179), - } - - width := proto.Int32(17) - err := proto.SetExtension(bm, user.E_Width, width) - if err != nil { - t.Fatal("Failed setting extension:", err) - } - buf, err := proto.Marshal(bm) - if err != nil { - t.Fatal("Failed encoding message with extension:", err) - } - bm_new := new(base.BaseMessage) - if err := proto.Unmarshal(buf, bm_new); err != nil { - t.Fatal("Failed decoding message with extension:", err) - } - if !proto.HasExtension(bm_new, user.E_Width) { - t.Fatal("Decoded message didn't contain extension.") - } - width_out, err := proto.GetExtension(bm_new, user.E_Width) - if err != nil { - t.Fatal("Failed getting extension:", err) - } - if w := width_out.(*int32); *w != *width { - t.Errorf("width_out = %v, expected %v", *w, *width) - } - proto.ClearExtension(bm_new, user.E_Width) - if proto.HasExtension(bm_new, user.E_Width) { - t.Fatal("Failed clearing extension.") - } -} - -func TestMessageSetWireFormat(t *testing.T) { - osm := new(base.OldStyleMessage) - osp := &user.OldStyleParcel{ - Name: proto.String("Dave"), - Height: proto.Int32(178), - } - - err := proto.SetExtension(osm, user.E_OldStyleParcel_MessageSetExtension, osp) - if err != nil { - t.Fatal("Failed setting extension:", err) - } - - buf, err := proto.Marshal(osm) - if err != nil { - t.Fatal("Failed encoding message:", err) - } - - // Data generated from Python implementation. - expected := []byte{ - 11, 16, 209, 15, 26, 9, 10, 4, 68, 97, 118, 101, 16, 178, 1, 12, - } - - if !bytes.Equal(expected, buf) { - t.Errorf("Encoding mismatch.\nwant %+v\n got %+v", expected, buf) - } - - // Check that it is restored correctly. - osm = new(base.OldStyleMessage) - if err := proto.Unmarshal(buf, osm); err != nil { - t.Fatal("Failed decoding message:", err) - } - osp_out, err := proto.GetExtension(osm, user.E_OldStyleParcel_MessageSetExtension) - if err != nil { - t.Fatal("Failed getting extension:", err) - } - osp = osp_out.(*user.OldStyleParcel) - if *osp.Name != "Dave" || *osp.Height != 178 { - t.Errorf("Retrieved extension from decoded message is not correct: %+v", osp) - } -} - -func main() { - // simpler than rigging up gotest - testing.Main(regexp.MatchString, []testing.InternalTest{ - {"TestSingleFieldExtension", TestSingleFieldExtension}, - {"TestMessageExtension", TestMessageExtension}, - {"TestTopLevelExtension", TestTopLevelExtension}, - }, - []testing.InternalBenchmark{}, - []testing.InternalExample{}) -} - -*/ diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto deleted file mode 100644 index ff65873dd..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/extension_user.proto +++ /dev/null @@ -1,100 +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. - -syntax = "proto2"; - -import "extension_base.proto"; -import "extension_extra.proto"; - -package extension_user; - -message UserMessage { - optional string name = 1; - optional string rank = 2; -} - -// Extend with a message -extend extension_base.BaseMessage { - optional UserMessage user_message = 5; -} - -// Extend with a foreign message -extend extension_base.BaseMessage { - optional extension_extra.ExtraMessage extra_message = 9; -} - -// Extend with some primitive types -extend extension_base.BaseMessage { - optional int32 width = 6; - optional int64 area = 7; -} - -// Extend inside the scope of another type -message LoudMessage { - extend extension_base.BaseMessage { - optional uint32 volume = 8; - } - extensions 100 to max; -} - -// Extend inside the scope of another type, using a message. -message LoginMessage { - extend extension_base.BaseMessage { - optional UserMessage user_message = 16; - } -} - -// Extend with a repeated field -extend extension_base.BaseMessage { - repeated Detail detail = 17; -} - -message Detail { - optional string color = 1; -} - -// An extension of an extension -message Announcement { - optional string words = 1; - extend LoudMessage { - optional Announcement loud_ext = 100; - } -} - -// Something that can be put in a message set. -message OldStyleParcel { - extend extension_base.OldStyleMessage { - optional OldStyleParcel message_set_extension = 2001; - } - - required string name = 1; - optional int32 height = 2; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto deleted file mode 100644 index b8bc41acd..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/grpc.proto +++ /dev/null @@ -1,59 +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 grpc.testing; - -message SimpleRequest { -} - -message SimpleResponse { -} - -message StreamMsg { -} - -message StreamMsg2 { -} - -service Test { - rpc UnaryCall(SimpleRequest) returns (SimpleResponse); - - // This RPC streams from the server only. - rpc Downstream(SimpleRequest) returns (stream StreamMsg); - - // This RPC streams from the client. - rpc Upstream(stream StreamMsg) returns (SimpleResponse); - - // This one streams in both directions. - rpc Bidi(stream StreamMsg) returns (stream StreamMsg2); -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden deleted file mode 100644 index 784a4f865..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.pb.go.golden +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by protoc-gen-go. -// source: imp.proto -// DO NOT EDIT! - -package imp - -import proto "github.com/golang/protobuf/proto" -import "math" -import "os" -import imp1 "imp2.pb" - -// Reference proto & math imports to suppress error if they are not otherwise used. -var _ = proto.GetString -var _ = math.Inf - -// Types from public import imp2.proto -type PubliclyImportedMessage imp1.PubliclyImportedMessage - -func (this *PubliclyImportedMessage) Reset() { (*imp1.PubliclyImportedMessage)(this).Reset() } -func (this *PubliclyImportedMessage) String() string { - return (*imp1.PubliclyImportedMessage)(this).String() -} - -// PubliclyImportedMessage from public import imp.proto - -type ImportedMessage_Owner int32 - -const ( - ImportedMessage_DAVE ImportedMessage_Owner = 1 - ImportedMessage_MIKE ImportedMessage_Owner = 2 -) - -var ImportedMessage_Owner_name = map[int32]string{ - 1: "DAVE", - 2: "MIKE", -} -var ImportedMessage_Owner_value = map[string]int32{ - "DAVE": 1, - "MIKE": 2, -} - -// NewImportedMessage_Owner is deprecated. Use x.Enum() instead. -func NewImportedMessage_Owner(x ImportedMessage_Owner) *ImportedMessage_Owner { - e := ImportedMessage_Owner(x) - return &e -} -func (x ImportedMessage_Owner) Enum() *ImportedMessage_Owner { - p := new(ImportedMessage_Owner) - *p = x - return p -} -func (x ImportedMessage_Owner) String() string { - return proto.EnumName(ImportedMessage_Owner_name, int32(x)) -} - -type ImportedMessage struct { - Field *int64 `protobuf:"varint,1,req,name=field" json:"field,omitempty"` - XXX_extensions map[int32][]byte `json:",omitempty"` - XXX_unrecognized []byte `json:",omitempty"` -} - -func (this *ImportedMessage) Reset() { *this = ImportedMessage{} } -func (this *ImportedMessage) String() string { return proto.CompactTextString(this) } - -var extRange_ImportedMessage = []proto.ExtensionRange{ - proto.ExtensionRange{90, 100}, -} - -func (*ImportedMessage) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ImportedMessage -} -func (this *ImportedMessage) ExtensionMap() map[int32][]byte { - if this.XXX_extensions == nil { - this.XXX_extensions = make(map[int32][]byte) - } - return this.XXX_extensions -} - -type ImportedExtendable struct { - XXX_extensions map[int32][]byte `json:",omitempty"` - XXX_unrecognized []byte `json:",omitempty"` -} - -func (this *ImportedExtendable) Reset() { *this = ImportedExtendable{} } -func (this *ImportedExtendable) String() string { return proto.CompactTextString(this) } - -func (this *ImportedExtendable) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(this.ExtensionMap()) -} -func (this *ImportedExtendable) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, this.ExtensionMap()) -} -// ensure ImportedExtendable satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*ImportedExtendable)(nil) -var _ proto.Unmarshaler = (*ImportedExtendable)(nil) - -var extRange_ImportedExtendable = []proto.ExtensionRange{ - proto.ExtensionRange{100, 536870911}, -} - -func (*ImportedExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_ImportedExtendable -} -func (this *ImportedExtendable) ExtensionMap() map[int32][]byte { - if this.XXX_extensions == nil { - this.XXX_extensions = make(map[int32][]byte) - } - return this.XXX_extensions -} - -func init() { - proto.RegisterEnum("imp.ImportedMessage_Owner", ImportedMessage_Owner_name, ImportedMessage_Owner_value) -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto deleted file mode 100644 index 156e078d1..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp.proto +++ /dev/null @@ -1,70 +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. - -syntax = "proto2"; - -package imp; - -import "imp2.proto"; -import "imp3.proto"; - -message ImportedMessage { - required int64 field = 1; - - // The forwarded getters for these fields are fiddly to get right. - optional ImportedMessage2 local_msg = 2; - optional ForeignImportedMessage foreign_msg = 3; // in imp3.proto - optional Owner enum_field = 4; - oneof union { - int32 state = 9; - } - - repeated string name = 5; - repeated Owner boss = 6; - repeated ImportedMessage2 memo = 7; - - map msg_map = 8; - - enum Owner { - DAVE = 1; - MIKE = 2; - } - - extensions 90 to 100; -} - -message ImportedMessage2 { -} - -message ImportedExtendable { - option message_set_wire_format = true; - extensions 100 to max; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto deleted file mode 100644 index 3bb0632b2..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp2.proto +++ /dev/null @@ -1,43 +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. - -syntax = "proto2"; - -package imp; - -message PubliclyImportedMessage { - optional int64 field = 1; -} - -enum PubliclyImportedEnum { - GLASSES = 1; - HAIR = 2; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto deleted file mode 100644 index 58fc7598b..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/imp3.proto +++ /dev/null @@ -1,38 +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. - -syntax = "proto2"; - -package imp; - -message ForeignImportedMessage { - optional string tuber = 1; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go deleted file mode 100644 index 271d9639d..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/main_test.go +++ /dev/null @@ -1,46 +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 simple binary to link together the protocol buffers in this test. - -package testdata - -import ( - "testing" - - mytestpb "./my_test" - multipb "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" -) - -func TestLink(t *testing.T) { - _ = &multipb.Multi1{} - _ = &mytestpb.Request{} -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore deleted file mode 100644 index c61a5e8b0..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pb.go diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto deleted file mode 100644 index 0da6e0af4..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi1.proto +++ /dev/null @@ -1,44 +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. - -syntax = "proto2"; - -import "multi/multi2.proto"; -import "multi/multi3.proto"; - -package multitest; - -message Multi1 { - required Multi2 multi2 = 1; - optional Multi2.Color color = 2; - optional Multi3.HatType hat_type = 3; -} - diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto deleted file mode 100644 index e6bfc71b3..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi2.proto +++ /dev/null @@ -1,46 +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. - -syntax = "proto2"; - -package multitest; - -message Multi2 { - required int32 required_value = 1; - - enum Color { - BLUE = 1; - GREEN = 2; - RED = 3; - }; - optional Color color = 2; -} - diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto deleted file mode 100644 index 146c255bd..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi/multi3.proto +++ /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. - -syntax = "proto2"; - -package multitest; - -message Multi3 { - enum HatType { - FEDORA = 1; - FEZ = 2; - }; - optional HatType hat_type = 1; -} - diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go deleted file mode 100644 index a266a709f..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.pb.go +++ /dev/null @@ -1,953 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: my_test/test.proto - -/* -Package my_test is a generated protocol buffer package. - -This package holds interesting messages. - -It is generated from these files: - my_test/test.proto - -It has these top-level messages: - Request - Reply - OtherBase - ReplyExtensions - OtherReplyExtensions - OldReply - Communique -*/ -package my_test - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/protoc-gen-gogo/testdata/multi" - -// 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 HatType int32 - -const ( - // deliberately skipping 0 - HatType_FEDORA HatType = 1 - HatType_FEZ HatType = 2 -) - -var HatType_name = map[int32]string{ - 1: "FEDORA", - 2: "FEZ", -} -var HatType_value = map[string]int32{ - "FEDORA": 1, - "FEZ": 2, -} - -func (x HatType) Enum() *HatType { - p := new(HatType) - *p = x - return p -} -func (x HatType) String() string { - return proto.EnumName(HatType_name, int32(x)) -} -func (x *HatType) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType") - if err != nil { - return err - } - *x = HatType(value) - return nil -} -func (HatType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } - -// This enum represents days of the week. -type Days int32 - -const ( - Days_MONDAY Days = 1 - Days_TUESDAY Days = 2 - Days_LUNDI Days = 1 -) - -var Days_name = map[int32]string{ - 1: "MONDAY", - 2: "TUESDAY", - // Duplicate value: 1: "LUNDI", -} -var Days_value = map[string]int32{ - "MONDAY": 1, - "TUESDAY": 2, - "LUNDI": 1, -} - -func (x Days) Enum() *Days { - p := new(Days) - *p = x - return p -} -func (x Days) String() string { - return proto.EnumName(Days_name, int32(x)) -} -func (x *Days) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days") - if err != nil { - return err - } - *x = Days(value) - return nil -} -func (Days) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } - -type Request_Color int32 - -const ( - Request_RED Request_Color = 0 - Request_GREEN Request_Color = 1 - Request_BLUE Request_Color = 2 -) - -var Request_Color_name = map[int32]string{ - 0: "RED", - 1: "GREEN", - 2: "BLUE", -} -var Request_Color_value = map[string]int32{ - "RED": 0, - "GREEN": 1, - "BLUE": 2, -} - -func (x Request_Color) Enum() *Request_Color { - p := new(Request_Color) - *p = x - return p -} -func (x Request_Color) String() string { - return proto.EnumName(Request_Color_name, int32(x)) -} -func (x *Request_Color) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color") - if err != nil { - return err - } - *x = Request_Color(value) - return nil -} -func (Request_Color) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{0, 0} } - -type Reply_Entry_Game int32 - -const ( - Reply_Entry_FOOTBALL Reply_Entry_Game = 1 - Reply_Entry_TENNIS Reply_Entry_Game = 2 -) - -var Reply_Entry_Game_name = map[int32]string{ - 1: "FOOTBALL", - 2: "TENNIS", -} -var Reply_Entry_Game_value = map[string]int32{ - "FOOTBALL": 1, - "TENNIS": 2, -} - -func (x Reply_Entry_Game) Enum() *Reply_Entry_Game { - p := new(Reply_Entry_Game) - *p = x - return p -} -func (x Reply_Entry_Game) String() string { - return proto.EnumName(Reply_Entry_Game_name, int32(x)) -} -func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game") - if err != nil { - return err - } - *x = Reply_Entry_Game(value) - return nil -} -func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) { return fileDescriptorTest, []int{1, 0, 0} } - -// This is a message that might be sent somewhere. -type Request struct { - Key []int64 `protobuf:"varint,1,rep,name=key" json:"key,omitempty"` - // optional imp.ImportedMessage imported_message = 2; - Hue *Request_Color `protobuf:"varint,3,opt,name=hue,enum=my.test.Request_Color" json:"hue,omitempty"` - Hat *HatType `protobuf:"varint,4,opt,name=hat,enum=my.test.HatType,def=1" json:"hat,omitempty"` - // optional imp.ImportedMessage.Owner owner = 6; - Deadline *float32 `protobuf:"fixed32,7,opt,name=deadline,def=inf" json:"deadline,omitempty"` - Somegroup *Request_SomeGroup `protobuf:"group,8,opt,name=SomeGroup,json=somegroup" json:"somegroup,omitempty"` - // This is a map field. It will generate map[int32]string. - NameMapping map[int32]string `protobuf:"bytes,14,rep,name=name_mapping,json=nameMapping" json:"name_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // This is a map field whose value type is a message. - MsgMapping map[int64]*Reply `protobuf:"bytes,15,rep,name=msg_mapping,json=msgMapping" json:"msg_mapping,omitempty" protobuf_key:"zigzag64,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"` - // This field should not conflict with any getters. - GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Request) Reset() { *m = Request{} } -func (m *Request) String() string { return proto.CompactTextString(m) } -func (*Request) ProtoMessage() {} -func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} } - -const Default_Request_Hat HatType = HatType_FEDORA - -var Default_Request_Deadline float32 = float32(math.Inf(1)) - -func (m *Request) GetKey() []int64 { - if m != nil { - return m.Key - } - return nil -} - -func (m *Request) GetHue() Request_Color { - if m != nil && m.Hue != nil { - return *m.Hue - } - return Request_RED -} - -func (m *Request) GetHat() HatType { - if m != nil && m.Hat != nil { - return *m.Hat - } - return Default_Request_Hat -} - -func (m *Request) GetDeadline() float32 { - if m != nil && m.Deadline != nil { - return *m.Deadline - } - return Default_Request_Deadline -} - -func (m *Request) GetSomegroup() *Request_SomeGroup { - if m != nil { - return m.Somegroup - } - return nil -} - -func (m *Request) GetNameMapping() map[int32]string { - if m != nil { - return m.NameMapping - } - return nil -} - -func (m *Request) GetMsgMapping() map[int64]*Reply { - if m != nil { - return m.MsgMapping - } - return nil -} - -func (m *Request) GetReset_() int32 { - if m != nil && m.Reset_ != nil { - return *m.Reset_ - } - return 0 -} - -func (m *Request) GetGetKey_() string { - if m != nil && m.GetKey_ != nil { - return *m.GetKey_ - } - return "" -} - -type Request_SomeGroup struct { - GroupField *int32 `protobuf:"varint,9,opt,name=group_field,json=groupField" json:"group_field,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Request_SomeGroup) Reset() { *m = Request_SomeGroup{} } -func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*Request_SomeGroup) ProtoMessage() {} -func (*Request_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0, 0} } - -func (m *Request_SomeGroup) GetGroupField() int32 { - if m != nil && m.GroupField != nil { - return *m.GroupField - } - return 0 -} - -type Reply struct { - Found []*Reply_Entry `protobuf:"bytes,1,rep,name=found" json:"found,omitempty"` - CompactKeys []int32 `protobuf:"varint,2,rep,packed,name=compact_keys,json=compactKeys" json:"compact_keys,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Reply) Reset() { *m = Reply{} } -func (m *Reply) String() string { return proto.CompactTextString(m) } -func (*Reply) ProtoMessage() {} -func (*Reply) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} } - -var extRange_Reply = []proto.ExtensionRange{ - {Start: 100, End: 536870911}, -} - -func (*Reply) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_Reply -} - -func (m *Reply) GetFound() []*Reply_Entry { - if m != nil { - return m.Found - } - return nil -} - -func (m *Reply) GetCompactKeys() []int32 { - if m != nil { - return m.CompactKeys - } - return nil -} - -type Reply_Entry struct { - KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"` - Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"` - XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Reply_Entry) Reset() { *m = Reply_Entry{} } -func (m *Reply_Entry) String() string { return proto.CompactTextString(m) } -func (*Reply_Entry) ProtoMessage() {} -func (*Reply_Entry) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1, 0} } - -const Default_Reply_Entry_Value int64 = 7 - -func (m *Reply_Entry) GetKeyThatNeeds_1234Camel_CasIng() int64 { - if m != nil && m.KeyThatNeeds_1234Camel_CasIng != nil { - return *m.KeyThatNeeds_1234Camel_CasIng - } - return 0 -} - -func (m *Reply_Entry) GetValue() int64 { - if m != nil && m.Value != nil { - return *m.Value - } - return Default_Reply_Entry_Value -} - -func (m *Reply_Entry) GetXMyFieldName_2() int64 { - if m != nil && m.XMyFieldName_2 != nil { - return *m.XMyFieldName_2 - } - return 0 -} - -type OtherBase struct { - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherBase) Reset() { *m = OtherBase{} } -func (m *OtherBase) String() string { return proto.CompactTextString(m) } -func (*OtherBase) ProtoMessage() {} -func (*OtherBase) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} } - -var extRange_OtherBase = []proto.ExtensionRange{ - {Start: 100, End: 536870911}, -} - -func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherBase -} - -func (m *OtherBase) GetName() string { - if m != nil && m.Name != nil { - return *m.Name - } - return "" -} - -type ReplyExtensions struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *ReplyExtensions) Reset() { *m = ReplyExtensions{} } -func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) } -func (*ReplyExtensions) ProtoMessage() {} -func (*ReplyExtensions) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{3} } - -var E_ReplyExtensions_Time = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*float64)(nil), - Field: 101, - Name: "my.test.ReplyExtensions.time", - Tag: "fixed64,101,opt,name=time", - Filename: "my_test/test.proto", -} - -var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*ReplyExtensions)(nil), - Field: 105, - Name: "my.test.ReplyExtensions.carrot", - Tag: "bytes,105,opt,name=carrot", - Filename: "my_test/test.proto", -} - -var E_ReplyExtensions_Donut = &proto.ExtensionDesc{ - ExtendedType: (*OtherBase)(nil), - ExtensionType: (*ReplyExtensions)(nil), - Field: 101, - Name: "my.test.ReplyExtensions.donut", - Tag: "bytes,101,opt,name=donut", - Filename: "my_test/test.proto", -} - -type OtherReplyExtensions struct { - Key *int32 `protobuf:"varint,1,opt,name=key" json:"key,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherReplyExtensions) Reset() { *m = OtherReplyExtensions{} } -func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) } -func (*OtherReplyExtensions) ProtoMessage() {} -func (*OtherReplyExtensions) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{4} } - -func (m *OtherReplyExtensions) GetKey() int32 { - if m != nil && m.Key != nil { - return *m.Key - } - return 0 -} - -type OldReply struct { - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldReply) Reset() { *m = OldReply{} } -func (m *OldReply) String() string { return proto.CompactTextString(m) } -func (*OldReply) ProtoMessage() {} -func (*OldReply) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{5} } - -func (m *OldReply) Marshal() ([]byte, error) { - return proto.MarshalMessageSet(&m.XXX_InternalExtensions) -} -func (m *OldReply) Unmarshal(buf []byte) error { - return proto.UnmarshalMessageSet(buf, &m.XXX_InternalExtensions) -} -func (m *OldReply) MarshalJSON() ([]byte, error) { - return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions) -} -func (m *OldReply) UnmarshalJSON(buf []byte) error { - return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions) -} - -// ensure OldReply satisfies proto.Marshaler and proto.Unmarshaler -var _ proto.Marshaler = (*OldReply)(nil) -var _ proto.Unmarshaler = (*OldReply)(nil) - -var extRange_OldReply = []proto.ExtensionRange{ - {Start: 100, End: 2147483646}, -} - -func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OldReply -} - -type Communique struct { - MakeMeCry *bool `protobuf:"varint,1,opt,name=make_me_cry,json=makeMeCry" 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_Height - // *Communique_Today - // *Communique_Maybe - // *Communique_Delta_ - // *Communique_Msg - // *Communique_Somegroup - 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() {} -func (*Communique) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6} } - -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,json=tempC,oneof"` -} -type Communique_Height struct { - Height float32 `protobuf:"fixed32,9,opt,name=height,oneof"` -} -type Communique_Today struct { - Today Days `protobuf:"varint,10,opt,name=today,enum=my.test.Days,oneof"` -} -type Communique_Maybe struct { - Maybe bool `protobuf:"varint,11,opt,name=maybe,oneof"` -} -type Communique_Delta_ struct { - Delta int32 `protobuf:"zigzag32,12,opt,name=delta,oneof"` -} -type Communique_Msg struct { - Msg *Reply `protobuf:"bytes,13,opt,name=msg,oneof"` -} -type Communique_Somegroup struct { - Somegroup *Communique_SomeGroup `protobuf:"group,14,opt,name=SomeGroup,json=somegroup,oneof"` -} - -func (*Communique_Number) isCommunique_Union() {} -func (*Communique_Name) isCommunique_Union() {} -func (*Communique_Data) isCommunique_Union() {} -func (*Communique_TempC) isCommunique_Union() {} -func (*Communique_Height) isCommunique_Union() {} -func (*Communique_Today) isCommunique_Union() {} -func (*Communique_Maybe) isCommunique_Union() {} -func (*Communique_Delta_) isCommunique_Union() {} -func (*Communique_Msg) isCommunique_Union() {} -func (*Communique_Somegroup) 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) GetHeight() float32 { - if x, ok := m.GetUnion().(*Communique_Height); ok { - return x.Height - } - return 0 -} - -func (m *Communique) GetToday() Days { - if x, ok := m.GetUnion().(*Communique_Today); ok { - return x.Today - } - return Days_MONDAY -} - -func (m *Communique) GetMaybe() bool { - if x, ok := m.GetUnion().(*Communique_Maybe); ok { - return x.Maybe - } - return false -} - -func (m *Communique) GetDelta() int32 { - if x, ok := m.GetUnion().(*Communique_Delta_); ok { - return x.Delta - } - return 0 -} - -func (m *Communique) GetMsg() *Reply { - if x, ok := m.GetUnion().(*Communique_Msg); ok { - return x.Msg - } - return nil -} - -func (m *Communique) GetSomegroup() *Communique_SomeGroup { - if x, ok := m.GetUnion().(*Communique_Somegroup); ok { - return x.Somegroup - } - 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), func(msg proto.Message) (n int), []interface{}) { - return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{ - (*Communique_Number)(nil), - (*Communique_Name)(nil), - (*Communique_Data)(nil), - (*Communique_TempC)(nil), - (*Communique_Height)(nil), - (*Communique_Today)(nil), - (*Communique_Maybe)(nil), - (*Communique_Delta_)(nil), - (*Communique_Msg)(nil), - (*Communique_Somegroup)(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_Height: - _ = b.EncodeVarint(9<<3 | proto.WireFixed32) - _ = b.EncodeFixed32(uint64(math.Float32bits(x.Height))) - case *Communique_Today: - _ = b.EncodeVarint(10<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.Today)) - case *Communique_Maybe: - t := uint64(0) - if x.Maybe { - t = 1 - } - _ = b.EncodeVarint(11<<3 | proto.WireVarint) - _ = b.EncodeVarint(t) - case *Communique_Delta_: - _ = b.EncodeVarint(12<<3 | proto.WireVarint) - _ = b.EncodeZigzag32(uint64(x.Delta)) - case *Communique_Msg: - _ = b.EncodeVarint(13<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case *Communique_Somegroup: - _ = b.EncodeVarint(14<<3 | proto.WireStartGroup) - if err := b.Marshal(x.Somegroup); err != nil { - return err - } - _ = b.EncodeVarint(14<<3 | proto.WireEndGroup) - 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.height - if wire != proto.WireFixed32 { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeFixed32() - m.Union = &Communique_Height{math.Float32frombits(uint32(x))} - return true, err - case 10: // union.today - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Today{Days(x)} - return true, err - case 11: // union.maybe - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &Communique_Maybe{x != 0} - return true, err - case 12: // union.delta - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeZigzag32() - m.Union = &Communique_Delta_{int32(x)} - return true, err - case 13: // union.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Reply) - err := b.DecodeMessage(msg) - m.Union = &Communique_Msg{msg} - return true, err - case 14: // union.somegroup - if wire != proto.WireStartGroup { - return true, proto.ErrInternalBadWireType - } - msg := new(Communique_SomeGroup) - err := b.DecodeGroup(msg) - m.Union = &Communique_Somegroup{msg} - return true, err - default: - return false, nil - } -} - -func _Communique_OneofSizer(msg proto.Message) (n int) { - m := msg.(*Communique) - // union - switch x := m.Union.(type) { - case *Communique_Number: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Number)) - case *Communique_Name: - n += proto.SizeVarint(6<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Name))) - n += len(x.Name) - case *Communique_Data: - n += proto.SizeVarint(7<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Data))) - n += len(x.Data) - case *Communique_TempC: - n += proto.SizeVarint(8<<3 | proto.WireFixed64) - n += 8 - case *Communique_Height: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *Communique_Today: - n += proto.SizeVarint(10<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Today)) - case *Communique_Maybe: - n += proto.SizeVarint(11<<3 | proto.WireVarint) - n += 1 - case *Communique_Delta_: - n += proto.SizeVarint(12<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31)))) - case *Communique_Msg: - s := proto.Size(x.Msg) - n += proto.SizeVarint(13<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *Communique_Somegroup: - n += proto.SizeVarint(14<<3 | proto.WireStartGroup) - n += proto.Size(x.Somegroup) - n += proto.SizeVarint(14<<3 | proto.WireEndGroup) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type Communique_SomeGroup struct { - Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique_SomeGroup) Reset() { *m = Communique_SomeGroup{} } -func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) } -func (*Communique_SomeGroup) ProtoMessage() {} -func (*Communique_SomeGroup) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6, 0} } - -func (m *Communique_SomeGroup) GetMember() string { - if m != nil && m.Member != nil { - return *m.Member - } - return "" -} - -type Communique_Delta struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Communique_Delta) Reset() { *m = Communique_Delta{} } -func (m *Communique_Delta) String() string { return proto.CompactTextString(m) } -func (*Communique_Delta) ProtoMessage() {} -func (*Communique_Delta) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{6, 1} } - -var E_Tag = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*string)(nil), - Field: 103, - Name: "my.test.tag", - Tag: "bytes,103,opt,name=tag", - Filename: "my_test/test.proto", -} - -var E_Donut = &proto.ExtensionDesc{ - ExtendedType: (*Reply)(nil), - ExtensionType: (*OtherReplyExtensions)(nil), - Field: 106, - Name: "my.test.donut", - Tag: "bytes,106,opt,name=donut", - Filename: "my_test/test.proto", -} - -func init() { - proto.RegisterType((*Request)(nil), "my.test.Request") - proto.RegisterType((*Request_SomeGroup)(nil), "my.test.Request.SomeGroup") - proto.RegisterType((*Reply)(nil), "my.test.Reply") - proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry") - proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase") - proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions") - proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions") - proto.RegisterType((*OldReply)(nil), "my.test.OldReply") - proto.RegisterType((*Communique)(nil), "my.test.Communique") - proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup") - proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta") - proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value) - proto.RegisterEnum("my.test.Days", Days_name, Days_value) - proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value) - proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value) - proto.RegisterExtension(E_ReplyExtensions_Time) - proto.RegisterExtension(E_ReplyExtensions_Carrot) - proto.RegisterExtension(E_ReplyExtensions_Donut) - proto.RegisterExtension(E_Tag) - proto.RegisterExtension(E_Donut) -} - -func init() { proto.RegisterFile("my_test/test.proto", fileDescriptorTest) } - -var fileDescriptorTest = []byte{ - // 988 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54,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0x89, 0x70, 0x03, - 0xaa, 0x37, 0xb7, 0xc3, 0x6b, 0x19, 0x68, 0xd2, 0x35, 0xae, 0x6e, 0x27, 0x83, 0x4b, 0x13, 0xb5, - 0x34, 0x13, 0x75, 0x6d, 0xd0, 0x05, 0x0d, 0x76, 0xf6, 0x35, 0x50, 0xd7, 0x90, 0x47, 0xdd, 0xfe, - 0xff, 0x2b, 0xf9, 0x9c, 0xf3, 0x9b, 0xea, 0xce, 0xcb, 0xa7, 0x8b, 0xfa, 0xf1, 0x9d, 0xfc, 0x2f, - 0x00, 0x00, 0xff, 0xff, 0x43, 0x23, 0x7b, 0xca, 0x33, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto deleted file mode 100644 index 8e7094632..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/my_test/test.proto +++ /dev/null @@ -1,156 +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. - -syntax = "proto2"; - -// This package holds interesting messages. -package my.test; // dotted package name - -//import "imp.proto"; -import "multi/multi1.proto"; // unused import - -enum HatType { - // deliberately skipping 0 - FEDORA = 1; - FEZ = 2; -} - -// This enum represents days of the week. -enum Days { - option allow_alias = true; - - MONDAY = 1; - TUESDAY = 2; - LUNDI = 1; // same value as MONDAY -} - -// This is a message that might be sent somewhere. -message Request { - enum Color { - RED = 0; - GREEN = 1; - BLUE = 2; - } - repeated int64 key = 1; -// optional imp.ImportedMessage imported_message = 2; - optional Color hue = 3; // no default - optional HatType hat = 4 [default=FEDORA]; -// optional imp.ImportedMessage.Owner owner = 6; - optional float deadline = 7 [default=inf]; - optional group SomeGroup = 8 { - optional int32 group_field = 9; - } - - // These foreign types are in imp2.proto, - // which is publicly imported by imp.proto. -// optional imp.PubliclyImportedMessage pub = 10; -// optional imp.PubliclyImportedEnum pub_enum = 13 [default=HAIR]; - - - // This is a map field. It will generate map[int32]string. - map name_mapping = 14; - // This is a map field whose value type is a message. - map msg_mapping = 15; - - optional int32 reset = 12; - // This field should not conflict with any getters. - optional string get_key = 16; -} - -message Reply { - message Entry { - required int64 key_that_needs_1234camel_CasIng = 1; - optional int64 value = 2 [default=7]; - optional int64 _my_field_name_2 = 3; - enum Game { - FOOTBALL = 1; - TENNIS = 2; - } - } - repeated Entry found = 1; - repeated int32 compact_keys = 2 [packed=true]; - extensions 100 to max; -} - -message OtherBase { - optional string name = 1; - extensions 100 to max; -} - -message ReplyExtensions { - extend Reply { - optional double time = 101; - optional ReplyExtensions carrot = 105; - } - extend OtherBase { - optional ReplyExtensions donut = 101; - } -} - -message OtherReplyExtensions { - optional int32 key = 1; -} - -// top-level extension -extend Reply { - optional string tag = 103; - optional OtherReplyExtensions donut = 106; -// optional imp.ImportedMessage elephant = 107; // extend with message from another file. -} - -message OldReply { - // Extensions will be encoded in MessageSet wire format. - option message_set_wire_format = true; - extensions 100 to max; -} - -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; - float height = 9; - Days today = 10; - bool maybe = 11; - sint32 delta = 12; // name will conflict with Delta below - Reply msg = 13; - group SomeGroup = 14 { - optional string member = 15; - } - } - - message Delta {} -} - diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto deleted file mode 100644 index 869b9af5a..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/testdata/proto3.proto +++ /dev/null @@ -1,53 +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; - -message Request { - enum Flavour { - SWEET = 0; - SOUR = 1; - UMAMI = 2; - GOPHERLICIOUS = 3; - } - string name = 1; - repeated int64 key = 2; - Flavour taste = 3; - Book book = 4; - repeated int64 unpacked = 5 [packed=false]; -} - -message Book { - string title = 1; - bytes raw_data = 2; -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go deleted file mode 100644 index 96c18d9fc..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogofast/main.go +++ /dev/null @@ -1,47 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.NotGoogleProtobufDescriptorProto) - - 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/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go deleted file mode 100644 index ba3e7e155..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogofaster/main.go +++ /dev/null @@ -1,50 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.NotGoogleProtobufDescriptorProto) - - 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/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go deleted file mode 100644 index 235bd64af..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogoslick/main.go +++ /dev/null @@ -1,59 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.NotGoogleProtobufDescriptorProto) - - 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/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go deleted file mode 100644 index d227a264f..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogotypes/main.go +++ /dev/null @@ -1,75 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 main - -import ( - "strings" - - "github.com/gogo/protobuf/vanity" - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - req := command.Read() - files := req.GetProtoFile() - files = vanity.FilterFiles(files, vanity.NotGoogleProtobufDescriptorProto) - - vanity.ForEachFile(files, vanity.TurnOnMarshalerAll) - vanity.ForEachFile(files, vanity.TurnOnSizerAll) - vanity.ForEachFile(files, vanity.TurnOnUnmarshalerAll) - - 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) - - for _, file := range files { - if strings.HasSuffix(file.GetName(), "struct.proto") { - // TODO struct can also get a compare method when - // https://github.com/gogo/protobuf/issues/221 is fixed - continue - } - vanity.TurnOnCompareAll(file) - } - - for _, file := range files { - if strings.HasSuffix(file.GetName(), "timestamp.proto") || - strings.HasSuffix(file.GetName(), "duration.proto") { - continue - } - vanity.TurnOnStringerAll(file) - vanity.TurnOnPopulateAll(file) - } - - resp := command.Generate(req) - command.Write(resp) -} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go b/vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go deleted file mode 100644 index 9c7dd6b85..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gostring/main.go +++ /dev/null @@ -1,42 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 main - -import ( - "github.com/gogo/protobuf/plugin/gostring" - "github.com/gogo/protobuf/vanity/command" -) - -func main() { - req := command.Read() - p := gostring.NewGoString() - p.Overwrite() - resp := command.GeneratePlugin(req, p, "_gostring.gen.go") - command.Write(resp) -} diff --git a/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go b/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go deleted file mode 100644 index b8434d504..000000000 --- a/vendor/github.com/gogo/protobuf/protoc-min-version/minversion.go +++ /dev/null @@ -1,65 +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 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/github.com/gogo/protobuf/test/asymetric-issue125/Makefile b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile deleted file mode 100644 index c42b8cf66..000000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. asym.proto) diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go deleted file mode 100644 index 77342c3cc..000000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.pb.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: asym.proto - -/* -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 - -// 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 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() {} -func (*M) Descriptor() ([]byte, []int) { return fileDescriptorAsym, []int{0} } - -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 (*MyType) Descriptor() ([]byte, []int) { return fileDescriptorAsym, []int{1} } - -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 { - return this == nil - } - - that1, ok := that.(*M) - if !ok { - that2, ok := that.(M) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*MyType) - if !ok { - that2, ok := that.(MyType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 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") -) - -func init() { proto.RegisterFile("asym.proto", fileDescriptorAsym) } - -var fileDescriptorAsym = []byte{ - // 163 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x2c, 0xae, 0xcc, - 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, - 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, - 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x72, 0x31, 0xfa, 0x0a, 0x29, 0x70, - 0x31, 0x27, 0x16, 0x15, 0x49, 0x30, 0x2a, 0x30, 0x6b, 0xf0, 0x38, 0xf1, 0x9d, 0xb8, 0x27, 0xcf, - 0x70, 0xeb, 0x9e, 0x3c, 0x9b, 0x6f, 0x65, 0x48, 0x65, 0x41, 0x6a, 0x10, 0x48, 0x4a, 0x49, 0x8a, - 0x0b, 0xca, 0xb5, 0x12, 0xd8, 0xb1, 0x40, 0x9e, 0xe1, 0xc7, 0x02, 0x79, 0x86, 0x8e, 0x85, 0xf2, - 0x0c, 0x0b, 0x16, 0xca, 0x33, 0x38, 0xc9, 0x3c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, - 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9c, 0x0b, 0x12, 0x6c, 0xa2, - 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto deleted file mode 100644 index eb3ab9566..000000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym.proto +++ /dev/null @@ -1,52 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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; -} diff --git a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go deleted file mode 100644 index c99b7cad3..000000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asym_test.go +++ /dev/null @@ -1,40 +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 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/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go deleted file mode 100644 index 8d968b941..000000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/asympb_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: asym.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &M{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - dAtA := proto.CompactTextString(p) - msg := &M{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &M{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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/github.com/gogo/protobuf/test/asymetric-issue125/pop.go b/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go deleted file mode 100644 index 26cad8388..000000000 --- a/vendor/github.com/gogo/protobuf/test/asymetric-issue125/pop.go +++ /dev/null @@ -1,64 +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 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/github.com/gogo/protobuf/test/bug_test.go b/vendor/github.com/gogo/protobuf/test/bug_test.go deleted file mode 100644 index 53f720e96..000000000 --- a/vendor/github.com/gogo/protobuf/test/bug_test.go +++ /dev/null @@ -1,252 +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 test - -import ( - "fmt" - "math" - "math/rand" - "testing" - "time" - - "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") -} - -func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - nins := make([]*NinOptNative, rep) - for i := range nins { - nins[i] = NewPopulatedNinOptNative(r, true) - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldE, nins); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} - -func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - ints := make([]int64, rep) - for i := range ints { - ints[i] = r.Int63() - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldD, ints); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go deleted file mode 100644 index d049676c4..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.pb.go +++ /dev/null @@ -1,2534 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/casttype.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import binary "encoding/binary" - -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 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"` - MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` - MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` - MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` - MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,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,13,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,14,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,15,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"` - String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4234 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x1d, 0x83, 0x14, 0x65, - 0x5b, 0xb4, 0x9d, 0x50, 0x1e, 0xfd, 0x0b, 0x4a, 0xec, 0x12, 0x24, 0xc4, 0x40, 0x25, 0x48, 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71, 0x81, 0xa6, 0x20, 0x45, 0x97, 0x49, 0x0d, 0x8b, 0xd2, 0x16, - 0x3c, 0x93, 0xc0, 0xaa, 0xe1, 0x1d, 0xad, 0x69, 0xfa, 0xea, 0x0d, 0xcd, 0x6c, 0x62, 0x1a, 0xf0, - 0x69, 0x25, 0xcb, 0x85, 0x9f, 0x26, 0x32, 0x34, 0x0d, 0x19, 0xb6, 0xaa, 0x0c, 0xab, 0x86, 0x5f, - 0xa0, 0xd9, 0x33, 0xa9, 0xb0, 0x85, 0x56, 0x21, 0x12, 0xd2, 0xfd, 0x35, 0xcf, 0xb6, 0x44, 0x68, - 0xd2, 0x2e, 0x88, 0x80, 0x76, 0x7f, 0xae, 0x3b, 0x71, 0x3f, 0xd2, 0x7f, 0x78, 0xdd, 0x31, 0x35, - 0xfb, 0x9d, 0x18, 0x24, 0x68, 0xbe, 0x18, 0x83, 0xcc, 0xe6, 0xd5, 0xf5, 0xb2, 0xba, 0xb4, 0xb6, - 0x55, 0x5a, 0x29, 0xcb, 0x12, 0xca, 0x01, 0x50, 0xc1, 0xa5, 0x95, 0xb5, 0x85, 0x4d, 0x39, 0x16, - 0x3c, 0x57, 0x56, 0x37, 0xcf, 0x9e, 0x96, 0xe3, 0x01, 0x60, 0x8b, 0x09, 0x12, 0x61, 0x85, 0x53, - 0x27, 0xe5, 0x24, 0x92, 0x21, 0xcb, 0x08, 0x2a, 0xcf, 0x95, 0x97, 0xce, 0x9e, 0x96, 0x87, 0x3b, - 0x25, 0xa7, 0x4e, 0xca, 0x23, 0x68, 0x14, 0xd2, 0x54, 0x52, 0x5a, 0x5b, 0x5b, 0x91, 0x53, 0x01, - 0xe7, 0xc6, 0xa6, 0x52, 0x59, 0x5d, 0x96, 0xd3, 0x01, 0xe7, 0xb2, 0xb2, 0xb6, 0xb5, 0x2e, 0x43, - 0xc0, 0x50, 0x2d, 0x6f, 0x6c, 0x2c, 0x2c, 0x97, 0xe5, 0x4c, 0xa0, 0x51, 0xba, 0xba,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, 0x84, 0x96, 0x61, 0xf8, 0x9a, 0x47, - 0xb9, 0x87, 0x29, 0xf7, 0xa3, 0xf7, 0xe7, 0xbe, 0xbc, 0x41, 0xc9, 0xd3, 0x97, 0x37, 0xd4, 0xd5, - 0x35, 0xa5, 0xba, 0xb0, 0xa2, 0x70, 0x38, 0x3a, 0x02, 0x09, 0x53, 0xbb, 0xd5, 0xea, 0x2c, 0x45, - 0x54, 0x34, 0xa8, 0xe3, 0x8f, 0x40, 0xe2, 0x26, 0xd6, 0xae, 0x77, 0x16, 0x00, 0x2a, 0xfa, 0x00, - 0x43, 0xff, 0x04, 0x24, 0xa9, 0xbf, 0x10, 0x00, 0xf7, 0x98, 0x3c, 0x84, 0x52, 0x90, 0x58, 0x5c, - 0x53, 0x48, 0xf8, 0xcb, 0x90, 0x65, 0x52, 0x75, 0xbd, 0x52, 0x5e, 0x2c, 0xcb, 0xb1, 0xd9, 0x33, - 0x30, 0xcc, 0x9c, 0x40, 0x96, 0x46, 0xe0, 0x06, 0x79, 0x88, 0x3f, 0x72, 0x0e, 0x49, 0xb4, 0x6e, - 0x55, 0x4b, 0x65, 0x45, 0x8e, 0x85, 0xa7, 0xd7, 0x83, 0x6c, 0x78, 0x5f, 0xfc, 0xe1, 0xc4, 0xd4, - 0x3f, 0x4a, 0x90, 0x09, 0xed, 0x73, 0xc9, 0x06, 0x45, 0x33, 0x4d, 0xfb, 0xa6, 0xaa, 0x99, 0x86, - 0xe6, 0xf1, 0xa0, 0x00, 0x2a, 0x5a, 0x20, 0x92, 0x41, 0x27, 0xed, 0x43, 0x31, 0xfe, 0x15, 0x09, - 0xe4, 0xee, 0x2d, 0x66, 0x97, 0x81, 0xd2, 0xcf, 0xd4, 0xc0, 0x97, 0x25, 0xc8, 0x75, 0xee, 0x2b, - 0xbb, 0xcc, 0x3b, 0xfa, 0x33, 0x35, 0xef, 0x8d, 0x18, 0x8c, 0x76, 0xec, 0x26, 0x07, 0xb5, 0xee, - 0xb3, 0x30, 0x6e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x38, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) - } - } else if this.MyFloat32Ptr != nil { - return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") - } else if that1.MyFloat32Ptr != nil { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) - } - if this.MyFloat32 != that1.MyFloat32 { - return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) - } - } else if this.MyFloat64Ptr != nil { - return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") - } else if that1.MyFloat64Ptr != nil { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) - } - if this.MyFloat64 != that1.MyFloat64 { - return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) - } - 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 this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) - } - } else if this.String_ != nil { - return fmt.Errorf("this.String_ == nil && that.String_ != nil") - } else if that1.String_ != nil { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) - } - if !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return false - } - } else if this.MyFloat32Ptr != nil { - return false - } else if that1.MyFloat32Ptr != nil { - return false - } - if this.MyFloat32 != that1.MyFloat32 { - return false - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return false - } - } else if this.MyFloat64Ptr != nil { - return false - } else if that1.MyFloat64Ptr != nil { - return false - } - if this.MyFloat64 != that1.MyFloat64 { - 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 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 (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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type - GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type - 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 - GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32Ptr -} - -func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32 -} - -func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64Ptr -} - -func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64 -} - -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 (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { - return this.String_ -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyFloat32Ptr = that.GetMyFloat32Ptr() - this.MyFloat32 = that.GetMyFloat32() - this.MyFloat64Ptr = that.GetMyFloat64Ptr() - this.MyFloat64 = that.GetMyFloat64() - 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() - this.String_ = that.GetString_() - return this -} - -type WilsonFace interface { - Proto() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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, 20) - 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.MyFloat32Ptr != nil { - s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") - } - s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") - if this.MyFloat64Ptr != nil { - s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") - } - s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\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) - } - 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)) - } - 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)) - } - 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)) - } - 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.String_ != nil { - s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") - } - if this.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 (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.MyFloat32Ptr != nil { - dAtA[i] = 0x2d - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) - i += 4 - } - dAtA[i] = 0x35 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.MyFloat32)))) - i += 4 - if m.MyFloat64Ptr != nil { - dAtA[i] = 0x39 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) - i += 8 - } - dAtA[i] = 0x41 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MyFloat64)))) - i += 8 - if m.MyBytes != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintCasttype(dAtA, i, uint64(len(m.MyBytes))) - i += copy(dAtA[i:], m.MyBytes) - } - if m.NormalBytes != nil { - dAtA[i] = 0x52 - 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] = 0x58 - i++ - i = encodeVarintCasttype(dAtA, i, uint64(num)) - } - } - if len(m.MyMap) > 0 { - for k := range m.MyMap { - dAtA[i] = 0x62 - 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] = 0x6a - 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] = 0x72 - i++ - v := m.MyNullableMap[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovCasttype(uint64(msgSize)) - } - mapSize := 1 + sovCasttype(uint64(k)) + msgSize - i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintCasttype(dAtA, i, uint64(k)) - if v != nil { - 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] = 0x7a - i++ - v := m.MyEmbeddedMap[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovCasttype(uint64(msgSize)) - } - mapSize := 1 + sovCasttype(uint64(k)) + 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.String_ != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCasttype(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 (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 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 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.MyFloat32Ptr = &v3 - } - this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - this.MyFloat32 *= -1 - } - if r.Intn(10) != 0 { - v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.MyFloat64Ptr = &v4 - } - this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - this.MyFloat64 *= -1 - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) - for i := 0; i < v5; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(100) - this.NormalBytes = make([]byte, v6) - for i := 0; i < v6; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) - for i := 0; i < v7; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v8; i++ { - v9 := randStringCasttype(r) - this.MyMap[v9] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := 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 < v10; i++ { - v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v12; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v13; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.String_ = &v14 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v15 := int64(r.Int63()) - if r.Intn(2) == 0 { - v15 *= -1 - } - this.Int64 = &v15 - } - 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 { - v16 := r.Intn(100) - tmps := make([]rune, v16) - for i := 0; i < v16; 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)) - v17 := r.Int63() - if r.Intn(2) == 0 { - v17 *= -1 - } - dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) - 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.MyFloat32Ptr != nil { - n += 5 - } - n += 5 - if m.MyFloat64Ptr != nil { - n += 9 - } - n += 9 - 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() - l += 1 + sovCasttype(uint64(l)) - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 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.String_ != nil { - l = len(*m.String_) - n += 2 + l + sovCasttype(uint64(l)) - } - 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) - } - 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)) - } - 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)) - } - 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)) - } - 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) + `,`, - `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, - `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, - `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, - `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `String_:` + valueToStringCasttype(this.String_) + `,`, - `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 != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) - m.MyFloat32Ptr = &v2 - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) - m.MyFloat64Ptr = &v2 - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) - case 9: - 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(m.MyBytes[:0], dAtA[iNdEx:postIndex]...) - if m.MyBytes == nil { - m.MyBytes = []byte{} - } - iNdEx = postIndex - case 10: - 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(m.NormalBytes[:0], dAtA[iNdEx:postIndex]...) - if m.NormalBytes == nil { - m.NormalBytes = []byte{} - } - iNdEx = postIndex - case 11: - if wireType == 0 { - 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) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - case 12: - 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 - } - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - var mapkey string - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyMap[mapkey] = mapvalue - iNdEx = postIndex - case 13: - 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 - } - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - var mapkey github_com_gogo_protobuf_test_casttype.MyStringType - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - iNdEx = postIndex - case 14: - 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 - } - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - var mapkey int32 - var mapvalue *Wilson - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - iNdEx = postIndex - case 15: - 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 - } - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - var mapkey int32 - mapvalue := &Wilson{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - iNdEx = postIndex - case 16: - 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 ErrIntOverflowCasttype - } - 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 ErrInvalidLengthCasttype - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postIndex]) - m.String_ = &s - 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") -) - -func init() { proto.RegisterFile("combos/both/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x4c, - 0x18, 0xc7, 0xfd, 0x34, 0x4d, 0x9b, 0x5c, 0x9a, 0xf7, 0x8d, 0x4e, 0x0c, 0x56, 0x24, 0xce, 0x56, - 0xab, 0x22, 0x0f, 0x90, 0x54, 0x69, 0x54, 0xaa, 0x82, 0x18, 0x5c, 0x15, 0xa9, 0x08, 0x17, 0x64, - 0xa8, 0x2a, 0x10, 0x8b, 0xd3, 0x9a, 0x34, 0xc2, 0x89, 0xa3, 0xf8, 0x02, 0xf2, 0x56, 0x95, 0x01, - 0x89, 0xbf, 0x84, 0x91, 0x05, 0x89, 0x91, 0xb1, 0x63, 0x47, 0xa6, 0xb4, 0x36, 0x4b, 0xd9, 0x3a, - 0x56, 0x99, 0xd0, 0xdd, 0x39, 0xb1, 0xfb, 0x03, 0x94, 0xa6, 0xdb, 0x3d, 0x77, 0xcf, 0xf3, 0x79, - 0xbe, 0xf7, 0xdc, 0x73, 0x77, 0xa8, 0xb8, 0xed, 0x36, 0x6b, 0xae, 0x57, 0xae, 0xb9, 0x74, 0xb7, - 0xbc, 0x6d, 0x79, 0x94, 0xfa, 0x6d, 0xbb, 0xd4, 0xee, 0xb8, 0xd4, 0xc5, 0x99, 0x81, 0x5d, 0xbc, - 0x57, 0x6f, 0xd0, 0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0x62, - 0xad, 0x59, 0xb3, 0x77, 0x76, 0xec, 0x1d, 0xa6, 0xe2, 0xff, 0x7f, 0xa8, 0x48, 0xf8, 0x09, 0x15, - 0x2b, 0xac, 0xeb, 0xc7, 0x57, 0x92, 0xe0, 0xe1, 0x67, 0x68, 0x4a, 0x54, 0x58, 0x2e, 0xa8, 0xa0, - 0x65, 0xaf, 0xd9, 0x86, 0xf1, 0xe1, 0x98, 0x11, 0xa6, 0xb8, 0x8c, 0x50, 0xdc, 0x63, 0xb8, 0x80, - 0x52, 0xef, 0x6c, 0x9f, 0xbf, 0xe2, 0x59, 0x93, 0x0d, 0xf1, 0x2d, 0x94, 0x7e, 0x6f, 0x39, 0x5d, - 0x9b, 0xbf, 0xda, 0x93, 0xa6, 0x30, 0x56, 0x26, 0x96, 0xa1, 0xf8, 0x08, 0x15, 0x2e, 0xf6, 0xca, - 0xb5, 0xe2, 0x4d, 0x84, 0x2f, 0x9f, 0x58, 0x92, 0x90, 0x16, 0x84, 0x3b, 0x49, 0x42, 0xae, 0x52, - 0x88, 0x6b, 0xbe, 0xd5, 0x70, 0x3c, 0xb7, 0x75, 0x89, 0x79, 0xb1, 0xfe, 0x37, 0x63, 0xce, 0x12, - 0x34, 0x25, 0x26, 0xd9, 0x5e, 0xd6, 0xf9, 0xf7, 0xc1, 0x7f, 0x39, 0x53, 0x18, 0xfa, 0xd3, 0x83, - 0x80, 0x48, 0x87, 0x01, 0x91, 0x7e, 0x06, 0x44, 0x3a, 0x0e, 0x08, 0x9c, 0x04, 0x04, 0x4e, 0x03, - 0x02, 0x67, 0x01, 0x81, 0xbd, 0x90, 0xc0, 0x97, 0x90, 0xc0, 0xd7, 0x90, 0xc0, 0xf7, 0x90, 0xc0, - 0x8f, 0x90, 0xc0, 0x41, 0x48, 0xe0, 0x30, 0x24, 0x70, 0x1c, 0x12, 0x38, 0x09, 0x89, 0x74, 0x1a, - 0x12, 0x38, 0x0b, 0x89, 0xb4, 0xf7, 0x8b, 0x48, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x0c, - 0x8a, 0xc1, 0xaf, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto deleted file mode 100644 index f4cb9547c..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttype.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.casttype) = "int32", (gogoproto.nullable) = false]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; - optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; - optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; - optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; - optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; - optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 10; - repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; - optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go deleted file mode 100644 index 91b5b5076..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/both/casttypepb_test.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/casttype.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go deleted file mode 100644 index 2b68906a5..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.pb.go +++ /dev/null @@ -1,1590 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/casttype.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import binary "encoding/binary" - -// 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 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"` - MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` - MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` - MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` - MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,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,13,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,14,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,15,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"` - String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4233 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x70, 0x1b, 0xd7, - 0x79, 0xe6, 0xe2, 0x42, 0x02, 0x3f, 0x40, 0x70, 0x79, 0x48, 0x4b, 0x10, 0x1d, 0x83, 0x14, 0x65, - 0x5b, 0xb4, 0x9d, 0x50, 0x1e, 0xdd, 0x05, 0x25, 0x76, 0x09, 0x12, 0x62, 0xa0, 0x12, 0x24, 0xb3, - 0x24, 0x23, 0xcb, 0x69, 0x67, 0x67, 0xb9, 0x38, 0x04, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, - 0xa1, 0xe9, 0x83, 0x1a, 0xb7, 0xcd, 0xa4, 0x9d, 0xde, 0x3b, 0x93, 0xc4, 0x75, 0xdc, 0xcb, 0x4c, - 0xeb, 0x34, 0xbd, 0x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, 0xdb, 0xee, 0x31, 0x6b, 0x7a, 0x2c, - 0xfd, 0x42, 0x0c, 0x1e, 0xea, 0x4b, 0xde, 0xd7, 0xd0, 0x47, 0x00, 0x0c, 0xcb, 0x69, 0xfa, 0x6c, - 0x47, 0xc4, 0x12, 0x6c, 0x9a, 0x4a, 0x68, 0xf2, 0x22, 0xc9, 0xb3, 0xe9, 0x07, 0xed, 0x71, 0xda, - 0x0e, 0x4c, 0x44, 0x15, 0xce, 0xb7, 0x0d, 0x4d, 0x50, 0x43, 0x0b, 0xfb, 0x8c, 0xb4, 0x27, 0x30, - 0x9f, 0x06, 0x59, 0x37, 0x0d, 0x6c, 0xf9, 0xaa, 0xe7, 0xbb, 0x58, 0x6b, 0x18, 0x56, 0x9d, 0x56, - 0x90, 0x54, 0x31, 0xb9, 0xa3, 0x99, 0x1e, 0x56, 0xc6, 0x58, 0xf3, 0x86, 0x68, 0x25, 0x08, 0x1a, - 0x40, 0x6e, 0x08, 0x31, 0xdc, 0x81, 0x60, 0xcd, 0x01, 0x62, 0xf6, 0x9b, 0x29, 0xc8, 0x84, 0xf6, - 0xd5, 0xe8, 0x28, 0x64, 0xaf, 0x69, 0x37, 0x34, 0x55, 0x9c, 0x95, 0x98, 0x27, 0x32, 0x44, 0xb6, - 0xce, 0xcf, 0x4b, 0x4f, 0xc3, 0x24, 0x55, 0xb1, 0x9b, 0x3e, 0x76, 0x55, 0xdd, 0xd4, 0x3c, 0x8f, - 0x3a, 0x2d, 0x45, 0x55, 0x11, 0x69, 0x5b, 0x23, 0x4d, 0x8b, 0xa2, 0x05, 0x9d, 0x81, 0x09, 0x8a, - 0x68, 0x34, 0x4d, 0xdf, 0x70, 0x4c, 0xac, 0x92, 0xd3, 0x9b, 0x47, 0x2b, 0x49, 0x60, 0xd9, 0x38, - 0xd1, 0xa8, 0x72, 0x05, 0x62, 0x91, 0x87, 0x96, 0xe0, 0x11, 0x0a, 0xab, 0x63, 0x0b, 0xbb, 0x9a, - 0x8f, 0x55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 0xad, 0xd5, 0x9f, 0x5f, 0x5d, - 0xbb, 0xb2, 0xaa, 0xc8, 0x46, 0x97, 0xda, 0x07, 0xb8, 0xd4, 0xd7, 0x41, 0xee, 0x36, 0x0a, 0x1d, - 0x86, 0x7e, 0x66, 0xc9, 0x43, 0x68, 0x02, 0xc6, 0x56, 0xd7, 0xd4, 0x8d, 0xca, 0x52, 0x59, 0x2d, - 0x5f, 0xba, 0x54, 0x5e, 0xdc, 0xdc, 0x60, 0x37, 0x10, 0x81, 0xf6, 0x66, 0xe7, 0xa2, 0x7e, 0x29, - 0x0e, 0x13, 0x7d, 0x2c, 0x41, 0x0b, 0xfc, 0xec, 0xc0, 0x8e, 0x33, 0x1f, 0x1b, 0xc4, 0xfa, 0x79, - 0x52, 0xf2, 0xd7, 0x35, 0xd7, 0xe7, 0x47, 0x8d, 0x27, 0x80, 0x78, 0xc9, 0xf2, 0x8d, 0x1d, 0x03, - 0xbb, 0xfc, 0xc2, 0x86, 0x1d, 0x28, 0xc6, 0xda, 0x72, 0x76, 0x67, 0xf3, 0x51, 0x40, 0x8e, 0xed, - 0x19, 0xbe, 0x71, 0x03, 0xab, 0x86, 0x25, 0x6e, 0x77, 0xc8, 0x01, 0x23, 0xa1, 0xc8, 0xa2, 0xa5, - 0x62, 0xf9, 0x81, 0xb6, 0x85, 0xeb, 0x5a, 0x97, 0x36, 0x49, 0xe0, 0x71, 0x45, 0x16, 0x2d, 0x81, - 0xf6, 0x51, 0xc8, 0xd6, 0xec, 0x26, 0xd9, 0x75, 0x31, 0x3d, 0x52, 0x2f, 0x24, 0x25, 0xc3, 0x64, - 0x81, 0x0a, 0xdf, 0x4f, 0xb7, 0xaf, 0x95, 0xb2, 0x4a, 0x86, 0xc9, 0x98, 0xca, 0x71, 0x18, 0xd3, - 0xea, 0x75, 0x97, 0x90, 0x0b, 0x22, 0x76, 0x42, 0xc8, 0x05, 0x62, 0xaa, 0x38, 0x75, 0x19, 0x52, - 0xc2, 0x0f, 0xa4, 0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c, - 0x02, 0xa8, 0x77, 0xc6, 0xc2, 0x0c, 0x49, 0xc6, 0xf0, 0x78, 0x98, 0x21, 0x73, 0x52, 0x6e, 0xfb, - 0xfc, 0x8a, 0x61, 0x7a, 0xb6, 0xd5, 0xc3, 0xd9, 0xed, 0xff, 0x9f, 0x8e, 0x73, 0xb6, 0x00, 0xc3, - 0x4c, 0x48, 0xc6, 0x52, 0xa1, 0xe5, 0x83, 0x56, 0x39, 0x85, 0x3d, 0x94, 0x56, 0x5e, 0xbb, 0x5b, - 0x18, 0xfa, 0xc1, 0xdd, 0xc2, 0xd0, 0xbf, 0xde, 0x2d, 0x0c, 0xbd, 0x71, 0xb7, 0x20, 0xbd, 0x75, - 0xb7, 0x20, 0xbd, 0x73, 0xb7, 0x20, 0xbd, 0x77, 0xb7, 0x20, 0xdd, 0xde, 0x2b, 0x48, 0x5f, 0xdd, - 0x2b, 0x48, 0x5f, 0xdf, 0x2b, 0x48, 0xdf, 0xdd, 0x2b, 0x48, 0xdf, 0xdb, 0x2b, 0x48, 0xaf, 0xed, - 0x15, 0xa4, 0x1f, 0xec, 0x15, 0x86, 0xde, 0xd8, 0x2b, 0x48, 0x6f, 0xed, 0x15, 0x86, 0xde, 0xd9, - 0x2b, 0x48, 0xef, 0xed, 0x15, 0x86, 0x6e, 0xff, 0xa8, 0x30, 0xf4, 0xff, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xd7, 0xcd, 0x49, 0xfd, 0x43, 0x38, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) - } - } else if this.MyFloat32Ptr != nil { - return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") - } else if that1.MyFloat32Ptr != nil { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) - } - if this.MyFloat32 != that1.MyFloat32 { - return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) - } - } else if this.MyFloat64Ptr != nil { - return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") - } else if that1.MyFloat64Ptr != nil { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) - } - if this.MyFloat64 != that1.MyFloat64 { - return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) - } - 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 this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) - } - } else if this.String_ != nil { - return fmt.Errorf("this.String_ == nil && that.String_ != nil") - } else if that1.String_ != nil { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) - } - if !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return false - } - } else if this.MyFloat32Ptr != nil { - return false - } else if that1.MyFloat32Ptr != nil { - return false - } - if this.MyFloat32 != that1.MyFloat32 { - return false - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return false - } - } else if this.MyFloat64Ptr != nil { - return false - } else if that1.MyFloat64Ptr != nil { - return false - } - if this.MyFloat64 != that1.MyFloat64 { - 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 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 (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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type - GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type - 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 - GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32Ptr -} - -func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32 -} - -func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64Ptr -} - -func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64 -} - -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 (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { - return this.String_ -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyFloat32Ptr = that.GetMyFloat32Ptr() - this.MyFloat32 = that.GetMyFloat32() - this.MyFloat64Ptr = that.GetMyFloat64Ptr() - this.MyFloat64 = that.GetMyFloat64() - 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() - this.String_ = that.GetString_() - return this -} - -type WilsonFace interface { - Proto() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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, 20) - 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.MyFloat32Ptr != nil { - s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") - } - s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") - if this.MyFloat64Ptr != nil { - s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") - } - s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\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) - } - 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)) - } - 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)) - } - 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)) - } - 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.String_ != nil { - s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") - } - if this.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 (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.MyFloat32Ptr != nil { - dAtA[i] = 0x2d - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.MyFloat32Ptr)))) - i += 4 - } - dAtA[i] = 0x35 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.MyFloat32)))) - i += 4 - if m.MyFloat64Ptr != nil { - dAtA[i] = 0x39 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MyFloat64Ptr)))) - i += 8 - } - dAtA[i] = 0x41 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.MyFloat64)))) - i += 8 - if m.MyBytes != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintCasttype(dAtA, i, uint64(len(m.MyBytes))) - i += copy(dAtA[i:], m.MyBytes) - } - if m.NormalBytes != nil { - dAtA[i] = 0x52 - 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] = 0x58 - i++ - i = encodeVarintCasttype(dAtA, i, uint64(num)) - } - } - if len(m.MyMap) > 0 { - for k := range m.MyMap { - dAtA[i] = 0x62 - 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] = 0x6a - 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] = 0x72 - i++ - v := m.MyNullableMap[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovCasttype(uint64(msgSize)) - } - mapSize := 1 + sovCasttype(uint64(k)) + msgSize - i = encodeVarintCasttype(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintCasttype(dAtA, i, uint64(k)) - if v != nil { - 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] = 0x7a - i++ - v := m.MyEmbeddedMap[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovCasttype(uint64(msgSize)) - } - mapSize := 1 + sovCasttype(uint64(k)) + 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.String_ != nil { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - i = encodeVarintCasttype(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 (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 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 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.MyFloat32Ptr = &v3 - } - this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - this.MyFloat32 *= -1 - } - if r.Intn(10) != 0 { - v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.MyFloat64Ptr = &v4 - } - this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - this.MyFloat64 *= -1 - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) - for i := 0; i < v5; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(100) - this.NormalBytes = make([]byte, v6) - for i := 0; i < v6; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) - for i := 0; i < v7; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v8; i++ { - v9 := randStringCasttype(r) - this.MyMap[v9] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := 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 < v10; i++ { - v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v12; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v13; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.String_ = &v14 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v15 := int64(r.Int63()) - if r.Intn(2) == 0 { - v15 *= -1 - } - this.Int64 = &v15 - } - 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 { - v16 := r.Intn(100) - tmps := make([]rune, v16) - for i := 0; i < v16; 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)) - v17 := r.Int63() - if r.Intn(2) == 0 { - v17 *= -1 - } - dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) - 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.MyFloat32Ptr != nil { - n += 5 - } - n += 5 - if m.MyFloat64Ptr != nil { - n += 9 - } - n += 9 - 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() - l += 1 + sovCasttype(uint64(l)) - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 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.String_ != nil { - l = len(*m.String_) - n += 2 + l + sovCasttype(uint64(l)) - } - 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) - } - 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)) - } - 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)) - } - 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)) - } - 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) + `,`, - `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, - `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, - `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, - `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `String_:` + valueToStringCasttype(this.String_) + `,`, - `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 init() { proto.RegisterFile("combos/marshaler/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 698 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x4c, - 0x18, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0xe6, 0x7d, 0xa3, 0x13, 0x83, 0x55, 0x89, 0xb3, 0xd5, - 0xaa, 0xc8, 0x03, 0x24, 0x55, 0x1a, 0x95, 0xaa, 0x20, 0x06, 0x57, 0x45, 0x2a, 0xc2, 0x05, 0x19, - 0xaa, 0x0a, 0xc4, 0x72, 0x69, 0x4d, 0x1a, 0xe1, 0xc4, 0x91, 0x7d, 0x01, 0x79, 0xab, 0xca, 0x80, - 0xc4, 0x5f, 0xc2, 0xc8, 0x82, 0xc4, 0xc8, 0xd8, 0xb1, 0x23, 0x53, 0x5a, 0x9b, 0xa5, 0x6c, 0x1d, - 0xab, 0x4c, 0xe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, 0x1d, 0x12, 0xd5, 0x20, 0xab, 0x02, 0x6d, 0x42, - 0x5f, 0xe9, 0xf7, 0x94, 0xda, 0xc8, 0xe0, 0x28, 0x9c, 0x93, 0x2f, 0xd0, 0xd0, 0x6b, 0x98, 0x1f, - 0xda, 0xf2, 0x14, 0x47, 0x3f, 0x8c, 0x74, 0xa7, 0xc3, 0xc7, 0xb8, 0x84, 0x72, 0x51, 0xee, 0x69, - 0x15, 0x68, 0x20, 0x8d, 0xf2, 0xa8, 0x26, 0x17, 0x68, 0x09, 0xe5, 0xcb, 0x35, 0x39, 0xc7, 0xd1, - 0x29, 0x95, 0x47, 0xf8, 0x18, 0x87, 0x9e, 0xc0, 0x69, 0xc3, 0xd7, 0x7d, 0x6a, 0x79, 0x72, 0x5e, - 0x05, 0xda, 0x8c, 0xbe, 0xd8, 0xef, 0x29, 0x77, 0x47, 0xa4, 0xf2, 0x38, 0x73, 0x00, 0x40, 0x2a, - 0x2c, 0x6c, 0x3a, 0x6e, 0x8b, 0xd8, 0x82, 0x07, 0x19, 0xcf, 0x4c, 0x4e, 0xa1, 0x2d, 0xb6, 0x13, - 0x71, 0xda, 0x9e, 0x5c, 0x50, 0x33, 0x37, 0xe9, 0xc9, 0x98, 0x84, 0x9a, 0x30, 0x6b, 0xf8, 0x06, - 0xe9, 0xc8, 0x33, 0x6a, 0x46, 0x2b, 0x54, 0x6f, 0x97, 0x87, 0x11, 0x83, 0xbb, 0x55, 0xe6, 0xeb, - 0xeb, 0x6d, 0xea, 0xfa, 0x7a, 0xad, 0xdf, 0x53, 0x16, 0x47, 0xce, 0x68, 0x90, 0x0e, 0x4f, 0x27, - 0x32, 0xa0, 0x6f, 0x80, 0x5d, 0xac, 0xb5, 0xae, 0x47, 0x9d, 0x16, 0xcb, 0x58, 0xe4, 0x19, 0xe7, - 0xaf, 0xcd, 0x38, 0xf4, 0x12, 0x79, 0xdb, 0x07, 0xc7, 0x63, 0xec, 0xf4, 0x05, 0x75, 0x9b, 0xed, -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x2c, 0xfd, 0x0c, 0xb0, 0x74, 0x12, 0x60, 0x70, 0x1a, 0x60, - 0x70, 0x16, 0x60, 0x70, 0x1e, 0x60, 0xb0, 0x1f, 0x62, 0xf0, 0x25, 0xc4, 0xe0, 0x6b, 0x88, 0xc1, - 0xf7, 0x10, 0x83, 0x1f, 0x21, 0x06, 0x87, 0x21, 0x06, 0x47, 0x21, 0x96, 0x4e, 0x42, 0x0c, 0x4e, - 0x43, 0x2c, 0x9d, 0x85, 0x18, 0x9c, 0x87, 0x58, 0xda, 0xff, 0x85, 0xa5, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xec, 0xe2, 0x9e, 0x1c, 0xb4, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto deleted file mode 100644 index 5da2b7340..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttype.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.casttype) = "int32", (gogoproto.nullable) = false]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; - optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; - optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; - optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; - optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; - optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 10; - repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; - optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go deleted file mode 100644 index ef0b9bc30..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/marshaler/casttypepb_test.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/casttype.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go deleted file mode 100644 index 2bc73b960..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.pb.go +++ /dev/null @@ -1,1385 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/casttype.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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"` - MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` - MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` - MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` - MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,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,13,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,14,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,15,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"` - String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4236 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5b, 0x70, 0x1b, 0xd7, - 0x79, 0xe6, 0xe2, 0x42, 0x02, 0x3f, 0x40, 0x70, 0x79, 0x48, 0xcb, 0x10, 0x1d, 0x81,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x14, 0x87, 0x1e, 0x81, 0x34, 0xf9, 0xcb, 0x62, 0x63, 0x98, - 0xda, 0x9c, 0x22, 0x02, 0x12, 0x17, 0x68, 0x0a, 0x52, 0x74, 0x99, 0xd4, 0xb0, 0x28, 0x6d, 0xc1, - 0x33, 0x09, 0xac, 0x1a, 0xde, 0xd1, 0x9a, 0xa6, 0xaf, 0xde, 0xd0, 0xcc, 0x26, 0xa6, 0x01, 0x9f, - 0x56, 0xb2, 0x5c, 0xf8, 0x69, 0x22, 0x43, 0xd3, 0x90, 0x61, 0xab, 0xca, 0xb0, 0x6a, 0xf8, 0x05, - 0x9a, 0x3d, 0x93, 0x0a, 0x5b, 0x68, 0x15, 0x22, 0x21, 0xdd, 0x5f, 0xf3, 0x6c, 0x4b, 0x84, 0x26, - 0xed, 0x82, 0x08, 0x68, 0xf7, 0xe7, 0xba, 0x13, 0xf7, 0x91, 0xfe, 0xc3, 0xeb, 0x8e, 0xa9, 0xd9, - 0xef, 0xc4, 0x20, 0x41, 0xf3, 0xc5, 0x18, 0x64, 0x36, 0xaf, 0xae, 0x97, 0xd5, 0xa5, 0xb5, 0xad, - 0xd2, 0x4a, 0x59, 0x96, 0x50, 0x0e, 0x80, 0x0a, 0x2e, 0xad, 0xac, 0x2d, 0x6c, 0xca, 0xb1, 0xe0, - 0xb9, 0xb2, 0xba, 0x79, 0xf6, 0xb4, 0x1c, 0x0f, 0x00, 0x5b, 0x4c, 0x90, 0x08, 0x2b, 0x9c, 0x3a, - 0x29, 0x27, 0x91, 0x0c, 0x59, 0x46, 0x50, 0x79, 0xae, 0xbc, 0x74, 0xf6, 0xb4, 0x3c, 0xdc, 0x29, - 0x39, 0x75, 0x52, 0x1e, 0x41, 0xa3, 0x90, 0xa6, 0x92, 0xd2, 0xda, 0xda, 0x8a, 0x9c, 0x0a, 0x38, - 0x37, 0x36, 0x95, 0xca, 0xea, 0xb2, 0x9c, 0x0e, 0x38, 0x97, 0x95, 0xb5, 0xad, 0x75, 0x19, 0x02, - 0x86, 0x6a, 0x79, 0x63, 0x63, 0x61, 0xb9, 0x2c, 0x67, 0x02, 0x8d, 0xd2, 0xd5, 0xcd, 0xf2, 0x86, - 0x9c, 0xed, 0x30, 0xeb, 0xd4, 0x49, 0x79, 0x34, 0xe8, 0xa2, 0xbc, 0xba, 0x55, 0x95, 0x73, 0x68, - 0x1c, 0x46, 0x59, 0x17, 0xc2, 0x88, 0xb1, 0x2e, 0xd1, 0xd9, 0xd3, 0xb2, 0xdc, 0x36, 0x84, 0xb1, - 0x8c, 0x77, 0x08, 0xce, 0x9e, 0x96, 0xd1, 0xec, 0x22, 0x24, 0x69, 0x74, 0x21, 0x04, 0xb9, 0x95, - 0x85, 0x52, 0x79, 0x45, 0x5d, 0x5b, 0xdf, 0xac, 0xac, 0xad, 0x2e, 0xac, 0xc8, 0x52, 0x5b, 0xa6, - 0x94, 0x3f, 0xb5, 0x55, 0x51, 0xca, 0x4b, 0x72, 0x2c, 0x2c, 0x5b, 0x2f, 0x2f, 0x6c, 0x96, 0x97, - 0xe4, 0xf8, 0xac, 0x0e, 0x93, 0xfd, 0xf2, 0x64, 0xdf, 0x95, 0x11, 0x9a, 0xe2, 0xd8, 0x3e, 0x53, - 0x4c, 0xb9, 0x7a, 0xa6, 0xf8, 0x47, 0x31, 0x98, 0xe8, 0x53, 0x2b, 0xfa, 0x76, 0xf2, 0x2c, 0x24, - 0x59, 0x88, 0xb2, 0xea, 0xf9, 0x44, 0xdf, 0xa2, 0x43, 0x03, 0xb6, 0xa7, 0x82, 0x52, 0x5c, 0x78, - 0x07, 0x11, 0xdf, 0x67, 0x07, 0x41, 0x28, 0x7a, 0x72, 0xfa, 0x2f, 0xf6, 0xe4, 0x74, 0x56, 0xf6, - 0xce, 0x0e, 0x52, 0xf6, 0xa8, 0xec, 0x60, 0xb9, 0x3d, 0xd9, 0x27, 0xb7, 0x5f, 0x84, 0xf1, 0x1e, - 0xa2, 0x81, 0x73, 0xec, 0x8b, 0x12, 0xe4, 0xf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2d, 0x81, - 0xf6, 0x51, 0xc8, 0xd6, 0xec, 0x26, 0xd9, 0x75, 0x31, 0x3d, 0x52, 0x2f, 0x24, 0x25, 0xc3, 0x64, - 0x81, 0x0a, 0xdf, 0x4f, 0xb7, 0xaf, 0x95, 0xb2, 0x4a, 0x86, 0xc9, 0x98, 0xca, 0x71, 0x18, 0xd3, - 0xea, 0x75, 0x97, 0x90, 0x0b, 0x22, 0x76, 0x42, 0xc8, 0x05, 0x62, 0xaa, 0x38, 0x75, 0x19, 0x52, - 0xc2, 0x0f, 0xa4, 0x24, 0x13, 0x4f, 0xa8, 0x0e, 0x3b, 0xf6, 0xc6, 0xe6, 0xd2, 0x4a, 0xca, 0x12, - 0x8d, 0x47, 0x21, 0x6b, 0x78, 0x6a, 0xfb, 0x96, 0x3c, 0x36, 0x13, 0x9b, 0x4b, 0x29, 0x19, 0xc3, - 0x0b, 0x6e, 0x18, 0x67, 0x5f, 0x8d, 0x41, 0xae, 0xf3, 0x96, 0x1f, 0x2d, 0x41, 0xca, 0xb4, 0x75, - 0x8d, 0x86, 0x16, 0x7b, 0xc5, 0x34, 0x17, 0xf1, 0x62, 0x60, 0x7e, 0x85, 0xeb, 0x2b, 0x01, 0x72, - 0xea, 0x5f, 0x24, 0x48, 0x09, 0x31, 0x3a, 0x04, 0x09, 0x47, 0xf3, 0x77, 0x29, 0x5d, 0xb2, 0x14, - 0x93, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0x68, 0x16, 0x0d, 0x01, 0x2e, 0x27, 0xcf, 0x64, 0x5e, - 0x4d, 0xac, 0xd5, 0xe8, 0xf1, 0xc3, 0x6e, 0x34, 0xb0, 0xe5, 0x7b, 0x62, 0x5e, 0xb9, 0x7c, 0x91, - 0x8b, 0xd1, 0x53, 0x30, 0xee, 0xbb, 0x9a, 0x61, 0x76, 0xe8, 0x26, 0xa8, 0xae, 0x2c, 0x1a, 0x02, - 0xe5, 0x22, 0x1c, 0x16, 0xbc, 0x35, 0xec,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, 0x00, 0xff, 0xff, 0x8e, 0x69, 0xff, 0x46, 0x41, 0x38, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) - } - } else if this.MyFloat32Ptr != nil { - return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") - } else if that1.MyFloat32Ptr != nil { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) - } - if this.MyFloat32 != that1.MyFloat32 { - return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) - } - } else if this.MyFloat64Ptr != nil { - return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") - } else if that1.MyFloat64Ptr != nil { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) - } - if this.MyFloat64 != that1.MyFloat64 { - return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) - } - 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 this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) - } - } else if this.String_ != nil { - return fmt.Errorf("this.String_ == nil && that.String_ != nil") - } else if that1.String_ != nil { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) - } - if !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return false - } - } else if this.MyFloat32Ptr != nil { - return false - } else if that1.MyFloat32Ptr != nil { - return false - } - if this.MyFloat32 != that1.MyFloat32 { - return false - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return false - } - } else if this.MyFloat64Ptr != nil { - return false - } else if that1.MyFloat64Ptr != nil { - return false - } - if this.MyFloat64 != that1.MyFloat64 { - 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 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 (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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type - GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type - 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 - GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32Ptr -} - -func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32 -} - -func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64Ptr -} - -func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64 -} - -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 (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { - return this.String_ -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyFloat32Ptr = that.GetMyFloat32Ptr() - this.MyFloat32 = that.GetMyFloat32() - this.MyFloat64Ptr = that.GetMyFloat64Ptr() - this.MyFloat64 = that.GetMyFloat64() - 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() - this.String_ = that.GetString_() - return this -} - -type WilsonFace interface { - Proto() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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, 20) - 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.MyFloat32Ptr != nil { - s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") - } - s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") - if this.MyFloat64Ptr != nil { - s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") - } - s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\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) - } - 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)) - } - 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)) - } - 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)) - } - 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.String_ != nil { - s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") - } - if this.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 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 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.MyFloat32Ptr = &v3 - } - this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - this.MyFloat32 *= -1 - } - if r.Intn(10) != 0 { - v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.MyFloat64Ptr = &v4 - } - this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - this.MyFloat64 *= -1 - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) - for i := 0; i < v5; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(100) - this.NormalBytes = make([]byte, v6) - for i := 0; i < v6; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) - for i := 0; i < v7; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v8; i++ { - v9 := randStringCasttype(r) - this.MyMap[v9] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := 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 < v10; i++ { - v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v12; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v13; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.String_ = &v14 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v15 := int64(r.Int63()) - if r.Intn(2) == 0 { - v15 *= -1 - } - this.Int64 = &v15 - } - 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 { - v16 := r.Intn(100) - tmps := make([]rune, v16) - for i := 0; i < v16; 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)) - v17 := r.Int63() - if r.Intn(2) == 0 { - v17 *= -1 - } - dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) - 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.MyFloat32Ptr != nil { - n += 5 - } - n += 5 - if m.MyFloat64Ptr != nil { - n += 9 - } - n += 9 - 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() - l += 1 + sovCasttype(uint64(l)) - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 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.String_ != nil { - l = len(*m.String_) - n += 2 + l + sovCasttype(uint64(l)) - } - 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) - } - 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)) - } - 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)) - } - 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)) - } - 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) + `,`, - `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, - `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, - `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, - `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `String_:` + valueToStringCasttype(this.String_) + `,`, - `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 init() { proto.RegisterFile("combos/neither/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 695 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0x06, 0xa2, 0x13, 0x83, 0x55, 0xa9, 0x67, 0xab, 0x55, - 0x91, 0x07, 0x48, 0xaa, 0x34, 0x2a, 0x55, 0x41, 0x0c, 0xae, 0x8a, 0x54, 0x84, 0x0b, 0x32, 0x54, - 0x15, 0x88, 0xc5, 0x69, 0x4d, 0x6a, 0xe1, 0xd8, 0x51, 0x7c, 0x01, 0x79, 0xab, 0xca, 0x80, 0xc4, - 0x5f, 0xc2, 0xc8, 0x82, 0xc4, 0xc8, 0xd8, 0xb1, 0x23, 0x53, 0x5a, 0x9b, 0xa5, 0x6c, 0x1d, 0xab, - 0x4c, 0xe8, 0xee, 0x1c, 0xdb, 0xfd, 0x01, 0x4a, 0xdd, 0xed, 0xde, 0xdd, 0x7b, 0x9f, 0xf7, 0xbd, - 0x77, 0xef, 0xee, 0xe0, 0xcc, 0xb6, 0xdb, 0x6e, 0xba, 0x5e, 0xcd, 0x31, 0x2d, 0xb2, 0x6b, 0x76, - 0x6b, 0xdb, 0x86, 0x47, 0x88, 0xdf, 0x31, 0xab, 0x9d, 0xae, 0x4b, 0x5c, 0x54, 0x18, 0xda, 0xd3, - 0xf7, 0x5b, 0x16, 0xd9, 0xed, 0x35, 0xab, 0xdb, 0x6e, 0xbb, 0xd6, 0x72, 0x5b, 0x6e, 0x8d, 0x39, - 0x34, 0x7b, 0xef, 0x98, 0xc5, 0x0c, 0x36, 0xe2, 0x81, 0xb3, 0x7f, 0xca, 0xb0, 0xb0, 0x6a, 0x78, - 0xc4, 0xf8, 0x68, 0xf8, 0x68, 0x1e, 0x16, 0xd6, 0x1d, 0xb2, 0x58, 0x7f, 0x41, 0xba, 0x22, 0x90, - 0x81, 0x92, 0x53, 0x8b, 0x83, 0xbe, 0x94, 0xb7, 0xe8, 0x9c, 0x1e, 0x2f, 0xa1, 0x39, 0x98, 0x67, - 0x63, 0x71, 0x8c, 0xf9, 0x94, 0x0f, 0xfa, 0x92, 0x90, 0xf8, 0xf1, 0x35, 0xf4, 0x1a, 0x96, 0x34, - 0x7f, 0xd3, 0x72, 0xc8, 0x52, 0x83, 0xe2, 0x72, 0x32, 0x50, 0xc6, 0xd5, 0x07, 0x83, 0xbe, 0xb4, - 0xf8, 0x4f, 0x81, 0xc4, 0xf4, 0x48, 0xb2, 0xb1, 0x61, 0xf4, 0x2b, 0xbf, 0x63, 0xea, 0x69, 0x16, - 0xda, 0x82, 0x85, 0xa1, 0x29, 0x8e, 0x33, 0xee, 0xc3, 0x48, 0x42, 0x26, 0x76, 0x0c, 0x43, 0x6f, - 0xe1, 0x94, 0xe6, 0x3f, 0xb1, 0x5d, 0x23, 0xaa, 0x41, 0x5e, 0x06, 0xca, 0x98, 0xba, 0x3c, 0xe8, - 0x4b, 0x8d, 0x91, 0xc1, 0x51, 0x38, 0x23, 0x9f, 0xa3, 0xa1, 0x37, 0xb0, 0x18, 0xdb, 0xe2, 0x04, - 0x43, 0x3f, 0x8a, 0x74, 0x67, 0xc3, 0x27, 0xb8, 0x94, 0x72, 0x5e, 0xee, 0x49, 0x19, 0x28, 0x20, - 0x8b, 0xf2, 0xa8, 0x26, 0xe7, 0x68, 0x29, 0xe5, 0x4b, 0x0d, 0xb1, 0xc0, 0xd0, 0x19, 0x95, 0x47, - 0xf8, 0x04, 0x87, 0x9e, 0xc2, 0x49, 0xcd, 0x57, 0x7d, 0x62, 0x7a, 0x62, 0x51, 0x06, 0xca, 0x94, - 0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 0x52, 0x3c, 0xf4, 0x1c, 0x4e, 0xf0, 0x0a, 0x8b, 0x15, 0x19, 0x28, 0xc5, - 0x6b, 0xb6, 0x61, 0x72, 0x38, 0x7a, 0x84, 0x99, 0x5e, 0x86, 0x30, 0xe9, 0x31, 0x54, 0x81, 0xb9, - 0xf7, 0xa6, 0xcf, 0x5e, 0xf1, 0xa2, 0x4e, 0x87, 0xe8, 0x0e, 0xcc, 0x7f, 0x30, 0xec, 0x9e, 0xc9, - 0x5e, 0xed, 0x71, 0x9d, 0x1b, 0x2b, 0x63, 0xcb, 0x60, 0xfa, 0x31, 0xac, 0x5c, 0xec, 0x95, 0x6b, - 0xc5, 0xeb, 0x10, 0x5d, 0x3e, 0xb1, 0x34, 0x21, 0xcf, 0x09, 0x77, 0xd3, 0x84, 0x52, 0xbd, 0x92, - 0xd4, 0x7c, 0xcb, 0xb2, 0x3d, 0xd7, 0xb9, 0xc4, 0xbc, 0x58, 0xff, 0x9b, 0x31, 0x67, 0x31, 0x9c, - 0xe0, 0x93, 0x74, 0x2f, 0xeb, 0xec, 0xfb, 0x60, 0xbf, 0x9c, 0xce, 0x0d, 0xf5, 0xd9, 0x41, 0x80, - 0x85, 0xc3, 0x00, 0x0b, 0xbf, 0x02, 0x2c, 0x1c, 0x07, 0x18, 0x9c, 0x04, 0x18, 0x9c, 0x06, 0x18, - 0x9c, 0x05, 0x18, 0xec, 0x85, 0x18, 0x7c, 0x0d, 0x31, 0xf8, 0x16, 0x62, 0xf0, 0x23, 0xc4, 0xe0, - 0x67, 0x88, 0xc1, 0x41, 0x88, 0x85, 0xc3, 0x10, 0x0b, 0xc7, 0x21, 0x06, 0x27, 0x21, 0x16, 0x4e, - 0x43, 0x0c, 0xce, 0x42, 0x2c, 0xec, 0xfd, 0xc6, 0xc2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3f, - 0x22, 0x40, 0x8d, 0xb2, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto deleted file mode 100644 index c726b9ef4..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttype.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.casttype) = "int32", (gogoproto.nullable) = false]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; - optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; - optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; - optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; - optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; - optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 10; - repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; - optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go deleted file mode 100644 index 053f29a39..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/neither/casttypepb_test.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/casttype.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go deleted file mode 100644 index 9404f344b..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.pb.go +++ /dev/null @@ -1,2330 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/casttype.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import binary "encoding/binary" - -// 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 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"` - MyFloat32Ptr *github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,5,opt,name=MyFloat32Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32Ptr,omitempty"` - MyFloat32 github_com_gogo_protobuf_test_casttype.MyFloat32Type `protobuf:"fixed32,6,opt,name=MyFloat32,casttype=github.com/gogo/protobuf/test/casttype.MyFloat32Type" json:"MyFloat32"` - MyFloat64Ptr *github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,7,opt,name=MyFloat64Ptr,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64Ptr,omitempty"` - MyFloat64 github_com_gogo_protobuf_test_casttype.MyFloat64Type `protobuf:"fixed64,8,opt,name=MyFloat64,casttype=github.com/gogo/protobuf/test/casttype.MyFloat64Type" json:"MyFloat64"` - MyBytes github_com_gogo_protobuf_test_casttype.Bytes `protobuf:"bytes,9,opt,name=MyBytes,casttype=github.com/gogo/protobuf/test/casttype.Bytes" json:"MyBytes,omitempty"` - NormalBytes []byte `protobuf:"bytes,10,opt,name=NormalBytes" json:"NormalBytes,omitempty"` - MyUint64S []github_com_gogo_protobuf_test_casttype.MyUint64Type `protobuf:"varint,11,rep,name=MyUint64s,casttype=github.com/gogo/protobuf/test/casttype.MyUint64Type" json:"MyUint64s,omitempty"` - MyMap github_com_gogo_protobuf_test_casttype.MyMapType `protobuf:"bytes,12,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,13,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,14,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,15,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"` - String_ *github_com_gogo_protobuf_test_casttype.MyStringType `protobuf:"bytes,16,opt,name=String,casttype=github.com/gogo/protobuf/test/casttype.MyStringType" json:"String,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Castaway) Reset() { *m = Castaway{} } -func (*Castaway) ProtoMessage() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCasttype, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4235 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x7b, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0x3f, 0x17, 0x1f, 0x24, 0x70, 0x00, 0x82, 0xcb, 0x4b, 0x5a, 0x82, 0xe8, 0x18, 0xa4, 0x28, - 0xdb, 0xa2, 0xed, 0x84, 0xf2, 0xe8, 0x5b, 0x50, 0x62, 0xff, 0x09, 0x12, 0x62, 0xa0, 0x3f, 0x41, - 0x32, 0x4b, 0x32, 0xb2, 0x9c, 0x76, 0x76, 0x96, 0x8b, 0x4b, 0x70, 0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 0x04, 0xd3, 0xbd, 0x03, 0xa1, 0x8a, 0x8b, 0x76, 0x0d, - 0x57, 0xac, 0x1d, 0x5b, 0xc9, 0x79, 0x1d, 0xcf, 0xe8, 0x10, 0x0c, 0x7b, 0x2d, 0xcb, 0xd7, 0x5e, - 0xc8, 0x67, 0x69, 0x84, 0xf0, 0xa7, 0xd9, 0xbf, 0x1f, 0x86, 0xb1, 0x41, 0x42, 0xec, 0x22, 0x24, - 0x77, 0xc8, 0x28, 0xf3, 0xb1, 0x83, 0xf8, 0x80, 0x61, 0x3a, 0x9d, 0x38, 0xfc, 0x80, 0x4e, 0x5c, - 0x80, 0x8c, 0x85, 0x3d, 0x1f, 0xd7, 0x58, 0x44, 0xc4, 0x07, 0x8c, 0x29, 0x60, 0xa0, 0xde, 0x90, - 0x4a, 0x3c, 0x50, 0x48, 0x3d, 0x07, 0x63, 0x81, 0x49, 0xaa, 0xab, 0x59, 0x75, 0x11, 0x9b, 0x27, - 0xa2, 0x2c, 0x99, 0x2f, 0x0b, 0x9c, 0x42, 0x60, 0x4a, 0x0e, 0x77, 0x3c, 0xa3, 0x25, 0x00, 0xdb, - 0xc2, 0xf6, 0x8e, 0x5a, 0xc3, 0xba, 0x99, 0x4f, 0xed, 0xe3, 0xa5, 0x35, 0xa2, 0xd2, 0xe3, 0x25, - 0x9b, 0x49, 0x75, 0x13, 0x5d, 0x68, 0x87, 0xda, 0xc8, 0x3e, 0x91, 0x52, 0x65, 0x8b, 0xac, 0x27, - 0xda, 0xb6, 0x20, 0xe7, 0x62, 0x12, 0xf7, 0xb8, 0xc6, 0x47, 0x96, 0xa6, 0x46, 0xcc, 0x47, 0x8e, - 0x4c, 0xe1, 0x30, 0x36, 0xb0, 0x51, 0x37, 0xfc, 0x88, 0x8e, 0x41, 0x20, 0x50, 0x69, 0x58, 0x01, - 0xcd, 0x42, 0x59, 0x21, 0x5c, 0xd5, 0x1a, 0x78, 0xea, 0x16, 0xe4, 0x3a, 0xdd, 0x83, 0x26, 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, 0xef, 0x68, 0x4d, 0xd3, 0x57, 0x6f, 0x68, 0x66, 0x13, 0xd3, - 0x80, 0x4f, 0x2b, 0x59, 0x2e, 0xfc, 0x2c, 0x91, 0xa1, 0x69, 0xc8, 0xb0, 0x55, 0x65, 0x58, 0x35, - 0xfc, 0x02, 0xcd, 0x9e, 0x49, 0x85, 0x2d, 0xb4, 0x0a, 0x91, 0x90, 0xee, 0xaf, 0x79, 0xb6, 0x25, - 0x42, 0x93, 0x76, 0x41, 0x04, 0xb4, 0xfb, 0x73, 0xdd, 0x89, 0xfb, 0x91, 0xfe, 0xc3, 0xeb, 0x8e, - 0xa9, 0xd9, 0xd7, 0x62, 0x90, 0xa0, 0xf9, 0x62, 0x0c, 0x32, 0x9b, 0x57, 0xd7, 0xcb, 0xea, 0xd2, - 0xda, 0x56, 0x69, 0xa5, 0x2c, 0x4b, 0x28, 0x07, 0x40, 0x05, 0x97, 0x56, 0xd6, 0x16, 0x36, 0xe5, - 0x58, 0xf0, 0x5c, 0x59, 0xdd, 0x3c, 0x7b, 0x5a, 0x8e, 0x07, 0x80, 0x2d, 0x26, 0x48, 0x84, 0x15, - 0x4e, 0x9d, 0x94, 0x93, 0x48, 0x86, 0x2c, 0x23, 0xa8, 0x3c, 0x57, 0x5e, 0x3a, 0x7b, 0x5a, 0x1e, - 0xee, 0x94, 0x9c, 0x3a, 0x29, 0x8f, 0xa0, 0x51, 0x48, 0x53, 0x49, 0x69, 0x6d, 0x6d, 0x45, 0x4e, - 0x05, 0x9c, 0x1b, 0x9b, 0x4a, 0x65, 0x75, 0x59, 0x4e, 0x07, 0x9c, 0xcb, 0xca, 0xda, 0xd6, 0xba, - 0x0c, 0x01, 0x43, 0xb5, 0xbc, 0xb1, 0xb1, 0xb0, 0x5c, 0x96, 0x33, 0x81, 0x46, 0xe9, 0xea, 0x66, - 0x79, 0x43, 0xce, 0x76, 0x98, 0x75, 0xea, 0xa4, 0x3c, 0x1a, 0x74, 0x51, 0x5e, 0xdd, 0x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0xe5, 0x38, - 0x8c, 0x69, 0xf5, 0xba, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0xe4, 0x02, 0x31, 0x55, 0x9c, 0xba, - 0x0c, 0x29, 0xe1, 0x07, 0x52, 0x92, 0x89, 0x27, 0x54, 0x87, 0x1d, 0x7b, 0x63, 0x73, 0x69, 0x25, - 0x65, 0x89, 0xc6, 0xa3, 0x90, 0x35, 0x3c, 0xb5, 0x7d, 0x4b, 0x1e, 0x9b, 0x89, 0xcd, 0xa5, 0x94, - 0x8c, 0xe1, 0x05, 0x37, 0x8c, 0xb3, 0xaf, 0xc6, 0x20, 0xd7, 0x79, 0xcb, 0x8f, 0x96, 0x20, 0x65, - 0xda, 0xba, 0x46, 0x43, 0x8b, 0xbd, 0x62, 0x9a, 0x8b, 0x78, 0x31, 0x30, 0xbf, 0xc2, 0xf5, 0x95, - 0x00, 0x39, 0xf5, 0xcf, 0x12, 0xa4, 0x84, 0x18, 0x1d, 0x82, 0x84, 0xa3, 0xf9, 0xbb, 0x94, 0x2e, - 0x59, 0x8a, 0xc9, 0x92, 0x42, 0x9f, 0x89, 0xdc, 0x73, 0x34, 0x8b, 0x86, 0x00, 0x97, 0x93, 0x67, - 0x32, 0xaf, 0x26, 0xd6, 0x6a, 0xf4, 0xf8, 0x61, 0x37, 0x1a, 0xd8, 0xf2, 0x3d, 0x31, 0xaf, 0x5c, - 0xbe, 0xc8, 0xc5, 0xe8, 0x29, 0x18, 0xf7, 0x5d, 0xcd, 0x30, 0x3b, 0x74, 0x13, 0x54, 0x57, 0x16, - 0x0d, 0x81, 0x72, 0x11, 0x8e, 0x08, 0xde, 0x1a, 0xf6, 0x35, 0x7d, 0x17, 0xd7, 0xda, 0xa0, 0x61, - 0x7a, 0xcd, 0x70, 0x98, 0x2b, 0x2c, 0xf1, 0x76, 0x81, 0x9d, 0xfd, 0xa1, 0x04, 0xe3, 0xe2, 0xc0, - 0x54, 0x0b, 0x9c, 0x55, 0x05, 0xd0, 0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x46, 0x60, 0x38, 0x85, 0x63, 0x3b, 0x4d, 0x93, 0x94, 0xad, 0x68, 0x8a, 0x3f, 0x10, - 0x14, 0x02, 0xc3, 0x29, 0x0e, 0xe0, 0xd6, 0x3f, 0x14, 0x14, 0x5e, 0xc8, 0x9f, 0xcf, 0x42, 0xc6, - 0xb6, 0xcc, 0x96, 0x6d, 0x0d, 0x62, 0xc4, 0x1f, 0x71, 0x06, 0xe0, 0x10, 0x42, 0x70, 0x11, 0xd2, - 0x83, 0x4e, 0xc4, 0x9f, 0xbc, 0x23, 0x96, 0x87, 0x98, 0x81, 0x65, 0x18, 0x13, 0x09, 0xca, 0xb0, - 0xad, 0x01, 0x28, 0xfe, 0x94, 0x53, 0xe4, 0x42, 0x30, 0x3e, 0x0c, 0x1f, 0x7b, 0x7e, 0x1d, 0x0f, - 0x42, 0xf2, 0xaa, 0x18, 0x06, 0x87, 0x70, 0x57, 0x6e, 0x63, 0x4b, 0xdf, 0x1d, 0x8c, 0xe1, 0xeb, - 0xc2, 0x95, 0x02, 0x43, 0x28, 0x16, 0x61, 0xb4, 0xa1, 0xb9, 0xde, 0xae, 0x66, 0x0e, 0x34, 0x1d, - 0x7f, 0xc6, 0x39, 0xb2, 0x01, 0x88, 0x7b, 0xa4, 0x69, 0x1d, 0x84, 0xe6, 0x1b, 0xc2, 0x23, 0x21, - 0x18, 0x5f, 0x7a, 0x9e, 0x4f, 0xaf, 0xb4, 0x0e, 0xc2, 0xf6, 0xe7, 0x62, 0xe9, 0x31, 0x6c, 0x35, - 0xcc, 0x78, 0x11, 0xd2, 0x9e, 0x71, 0x6b, 0x20, 0x9a, 0xbf, 0x10, 0x33, 0x4d, 0x01, 0x04, 0x7c, - 0x15, 0x8e, 0xf4, 0x2d, 0x13, 0x03, 0x90, 0xfd, 0x25, 0x27, 0x3b, 0xd4, 0xa7, 0x54, 0xf0, 0x94, - 0x70, 0x50, 0xca, 0xbf, 0x12, 0x29, 0x01, 0x77, 0x71, 0xad, 0x93, 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41, - 0x96, 0xe6, 0x12, 0xfc, 0xbb, 0xe2, 0x62, 0xec, 0xbc, 0x34, 0xf5, 0x0c, 0xc8, 0xdd, 0xb1, 0x72, - 0x20, 0xbc, 0x02, 0xa8, 0x77, 0xc6, 0xc2, 0x0c, 0x49, 0xc6, 0xf0, 0x78, 0x98, 0x21, 0x73, 0x52, - 0x6e, 0xfb, 0xfc, 0x8a, 0x61, 0x7a, 0xb6, 0xd5, 0xc3, 0xd9, 0xed, 0xff, 0x9f, 0x8e, 0x73, 0xb6, - 0x00, 0xc3, 0x4c, 0x48, 0xc6, 0x52, 0xa1, 0xe5, 0x83, 0x56, 0x39, 0x85, 0x3d, 0x94, 0x56, 0x5e, - 0xbf, 0x5b, 0x18, 0xfa, 0xc1, 0xdd, 0xc2, 0xd0, 0xbf, 0xdc, 0x2d, 0x0c, 0xbd, 0x79, 0xb7, 0x20, - 0xbd, 0x7d, 0xb7, 0x20, 0xbd, 0x7b, 0xb7, 0x20, 0xbd, 0x7f, 0xb7, 0x20, 0xdd, 0xde, 0x2b, 0x48, - 0x5f, 0xdf, 0x2b, 0x48, 0xdf, 0xdc, 0x2b, 0x48, 0xdf, 0xdd, 0x2b, 0x48, 0xdf, 0xdb, 0x2b, 0x48, - 0xaf, 0xef, 0x15, 0x86, 0x7e, 0xb0, 0x57, 0x90, 0xde, 0xdc, 0x2b, 0x48, 0x6f, 0xef, 0x15, 0x86, - 0xde, 0xdd, 0x2b, 0x48, 0xef, 0xef, 0x15, 0x86, 0x6e, 0xff, 0xa8, 0x30, 0xf4, 0x7f, 0x01, 0x00, - 0x00, 0xff, 0xff, 0x3c, 0xbe, 0x6e, 0xcf, 0x45, 0x38, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", *this.MyFloat32Ptr, *that1.MyFloat32Ptr) - } - } else if this.MyFloat32Ptr != nil { - return fmt.Errorf("this.MyFloat32Ptr == nil && that.MyFloat32Ptr != nil") - } else if that1.MyFloat32Ptr != nil { - return fmt.Errorf("MyFloat32Ptr this(%v) Not Equal that(%v)", this.MyFloat32Ptr, that1.MyFloat32Ptr) - } - if this.MyFloat32 != that1.MyFloat32 { - return fmt.Errorf("MyFloat32 this(%v) Not Equal that(%v)", this.MyFloat32, that1.MyFloat32) - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", *this.MyFloat64Ptr, *that1.MyFloat64Ptr) - } - } else if this.MyFloat64Ptr != nil { - return fmt.Errorf("this.MyFloat64Ptr == nil && that.MyFloat64Ptr != nil") - } else if that1.MyFloat64Ptr != nil { - return fmt.Errorf("MyFloat64Ptr this(%v) Not Equal that(%v)", this.MyFloat64Ptr, that1.MyFloat64Ptr) - } - if this.MyFloat64 != that1.MyFloat64 { - return fmt.Errorf("MyFloat64 this(%v) Not Equal that(%v)", this.MyFloat64, that1.MyFloat64) - } - 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 this.String_ != nil && that1.String_ != nil { - if *this.String_ != *that1.String_ { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", *this.String_, *that1.String_) - } - } else if this.String_ != nil { - return fmt.Errorf("this.String_ == nil && that.String_ != nil") - } else if that1.String_ != nil { - return fmt.Errorf("String_ this(%v) Not Equal that(%v)", this.String_, that1.String_) - } - if !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 this.MyFloat32Ptr != nil && that1.MyFloat32Ptr != nil { - if *this.MyFloat32Ptr != *that1.MyFloat32Ptr { - return false - } - } else if this.MyFloat32Ptr != nil { - return false - } else if that1.MyFloat32Ptr != nil { - return false - } - if this.MyFloat32 != that1.MyFloat32 { - return false - } - if this.MyFloat64Ptr != nil && that1.MyFloat64Ptr != nil { - if *this.MyFloat64Ptr != *that1.MyFloat64Ptr { - return false - } - } else if this.MyFloat64Ptr != nil { - return false - } else if that1.MyFloat64Ptr != nil { - return false - } - if this.MyFloat64 != that1.MyFloat64 { - 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 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 (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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetInt32Ptr() *int32 - GetInt32() int32 - GetMyUint64Ptr() *github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyUint64() github_com_gogo_protobuf_test_casttype.MyUint64Type - GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type - GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type - GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type - 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 - GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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) GetMyFloat32Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32Ptr -} - -func (this *Castaway) GetMyFloat32() github_com_gogo_protobuf_test_casttype.MyFloat32Type { - return this.MyFloat32 -} - -func (this *Castaway) GetMyFloat64Ptr() *github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64Ptr -} - -func (this *Castaway) GetMyFloat64() github_com_gogo_protobuf_test_casttype.MyFloat64Type { - return this.MyFloat64 -} - -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 (this *Castaway) GetString_() *github_com_gogo_protobuf_test_casttype.MyStringType { - return this.String_ -} - -func NewCastawayFromFace(that CastawayFace) *Castaway { - this := &Castaway{} - this.Int32Ptr = that.GetInt32Ptr() - this.Int32 = that.GetInt32() - this.MyUint64Ptr = that.GetMyUint64Ptr() - this.MyUint64 = that.GetMyUint64() - this.MyFloat32Ptr = that.GetMyFloat32Ptr() - this.MyFloat32 = that.GetMyFloat32() - this.MyFloat64Ptr = that.GetMyFloat64Ptr() - this.MyFloat64 = that.GetMyFloat64() - 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() - this.String_ = that.GetString_() - return this -} - -type WilsonFace interface { - Proto() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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, 20) - 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.MyFloat32Ptr != nil { - s = append(s, "MyFloat32Ptr: "+valueToGoStringCasttype(this.MyFloat32Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat32Type")+",\n") - } - s = append(s, "MyFloat32: "+fmt.Sprintf("%#v", this.MyFloat32)+",\n") - if this.MyFloat64Ptr != nil { - s = append(s, "MyFloat64Ptr: "+valueToGoStringCasttype(this.MyFloat64Ptr, "github_com_gogo_protobuf_test_casttype.MyFloat64Type")+",\n") - } - s = append(s, "MyFloat64: "+fmt.Sprintf("%#v", this.MyFloat64)+",\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) - } - 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)) - } - 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)) - } - 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)) - } - 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.String_ != nil { - s = append(s, "String_: "+valueToGoStringCasttype(this.String_, "github_com_gogo_protobuf_test_casttype.MyStringType")+",\n") - } - if this.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 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 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - v3 *= -1 - } - this.MyFloat32Ptr = &v3 - } - this.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(r.Float32()) - if r.Intn(2) == 0 { - this.MyFloat32 *= -1 - } - if r.Intn(10) != 0 { - v4 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - v4 *= -1 - } - this.MyFloat64Ptr = &v4 - } - this.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(r.Float64()) - if r.Intn(2) == 0 { - this.MyFloat64 *= -1 - } - if r.Intn(10) != 0 { - v5 := r.Intn(100) - this.MyBytes = make(github_com_gogo_protobuf_test_casttype.Bytes, v5) - for i := 0; i < v5; i++ { - this.MyBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(100) - this.NormalBytes = make([]byte, v6) - for i := 0; i < v6; i++ { - this.NormalBytes[i] = byte(r.Intn(256)) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(10) - this.MyUint64S = make([]github_com_gogo_protobuf_test_casttype.MyUint64Type, v7) - for i := 0; i < v7; i++ { - this.MyUint64S[i] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - for i := 0; i < v8; i++ { - v9 := randStringCasttype(r) - this.MyMap[v9] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v10 := 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 < v10; i++ { - v11 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.MyCustomMap[v11] = github_com_gogo_protobuf_test_casttype.MyUint64Type(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - for i := 0; i < v12; i++ { - this.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(10) - this.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - for i := 0; i < v13; i++ { - this.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(int32(r.Int31()))] = *NewPopulatedWilson(r, easy) - } - } - if r.Intn(10) != 0 { - v14 := github_com_gogo_protobuf_test_casttype.MyStringType(randStringCasttype(r)) - this.String_ = &v14 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCasttype(r, 17) - } - return this -} - -func NewPopulatedWilson(r randyCasttype, easy bool) *Wilson { - this := &Wilson{} - if r.Intn(10) != 0 { - v15 := int64(r.Int63()) - if r.Intn(2) == 0 { - v15 *= -1 - } - this.Int64 = &v15 - } - 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 { - v16 := r.Intn(100) - tmps := make([]rune, v16) - for i := 0; i < v16; 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)) - v17 := r.Int63() - if r.Intn(2) == 0 { - v17 *= -1 - } - dAtA = encodeVarintPopulateCasttype(dAtA, uint64(v17)) - 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.MyFloat32Ptr != nil { - n += 5 - } - n += 5 - if m.MyFloat64Ptr != nil { - n += 9 - } - n += 9 - 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() - l += 1 + sovCasttype(uint64(l)) - } - mapEntrySize := 1 + sovCasttype(uint64(k)) + 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.String_ != nil { - l = len(*m.String_) - n += 2 + l + sovCasttype(uint64(l)) - } - 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) - } - 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)) - } - 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)) - } - 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)) - } - 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) + `,`, - `MyFloat32Ptr:` + valueToStringCasttype(this.MyFloat32Ptr) + `,`, - `MyFloat32:` + fmt.Sprintf("%v", this.MyFloat32) + `,`, - `MyFloat64Ptr:` + valueToStringCasttype(this.MyFloat64Ptr) + `,`, - `MyFloat64:` + fmt.Sprintf("%v", this.MyFloat64) + `,`, - `MyBytes:` + valueToStringCasttype(this.MyBytes) + `,`, - `NormalBytes:` + valueToStringCasttype(this.NormalBytes) + `,`, - `MyUint64S:` + fmt.Sprintf("%v", this.MyUint64S) + `,`, - `MyMap:` + mapStringForMyMap + `,`, - `MyCustomMap:` + mapStringForMyCustomMap + `,`, - `MyNullableMap:` + mapStringForMyNullableMap + `,`, - `MyEmbeddedMap:` + mapStringForMyEmbeddedMap + `,`, - `String_:` + valueToStringCasttype(this.String_) + `,`, - `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 != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32Ptr", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) - m.MyFloat32Ptr = &v2 - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat32", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.MyFloat32 = github_com_gogo_protobuf_test_casttype.MyFloat32Type(math.Float32frombits(v)) - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64Ptr", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) - m.MyFloat64Ptr = &v2 - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MyFloat64", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.MyFloat64 = github_com_gogo_protobuf_test_casttype.MyFloat64Type(math.Float64frombits(v)) - case 9: - 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(m.MyBytes[:0], dAtA[iNdEx:postIndex]...) - if m.MyBytes == nil { - m.MyBytes = []byte{} - } - iNdEx = postIndex - case 10: - 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(m.NormalBytes[:0], dAtA[iNdEx:postIndex]...) - if m.NormalBytes == nil { - m.NormalBytes = []byte{} - } - iNdEx = postIndex - case 11: - if wireType == 0 { - 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) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCasttype - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthCasttype - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field MyUint64S", wireType) - } - case 12: - 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 - } - if m.MyMap == nil { - m.MyMap = make(github_com_gogo_protobuf_test_casttype.MyMapType) - } - var mapkey string - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyMap[mapkey] = mapvalue - iNdEx = postIndex - case 13: - 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 - } - if m.MyCustomMap == nil { - m.MyCustomMap = make(map[github_com_gogo_protobuf_test_casttype.MyStringType]github_com_gogo_protobuf_test_casttype.MyUint64Type) - } - var mapkey github_com_gogo_protobuf_test_casttype.MyStringType - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyCustomMap[github_com_gogo_protobuf_test_casttype.MyStringType(mapkey)] = ((github_com_gogo_protobuf_test_casttype.MyUint64Type)(mapvalue)) - iNdEx = postIndex - case 14: - 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 - } - if m.MyNullableMap == nil { - m.MyNullableMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]*Wilson) - } - var mapkey int32 - var mapvalue *Wilson - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyNullableMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = mapvalue - iNdEx = postIndex - case 15: - 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 - } - if m.MyEmbeddedMap == nil { - m.MyEmbeddedMap = make(map[github_com_gogo_protobuf_test_casttype.MyInt32Type]Wilson) - } - var mapkey int32 - mapvalue := &Wilson{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCasttype(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCasttype - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MyEmbeddedMap[github_com_gogo_protobuf_test_casttype.MyInt32Type(mapkey)] = *mapvalue - iNdEx = postIndex - case 16: - 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 ErrIntOverflowCasttype - } - 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 ErrInvalidLengthCasttype - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := github_com_gogo_protobuf_test_casttype.MyStringType(dAtA[iNdEx:postIndex]) - m.String_ = &s - 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/casttype.proto", fileDescriptorCasttype) } - -var fileDescriptorCasttype = []byte{ - // 698 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0x7d, 0x4d, 0xd3, 0x26, 0x97, 0x06, 0xa2, 0x13, 0x83, 0x55, 0x89, 0xb3, 0x69, 0x55, - 0xe4, 0x01, 0x92, 0x2a, 0x8d, 0x4a, 0x55, 0x10, 0x83, 0xab, 0x22, 0x15, 0xe1, 0x82, 0x0c, 0x55, - 0x05, 0x62, 0xb9, 0xb4, 0x26, 0x8d, 0x70, 0xec, 0xc8, 0xbe, 0x80, 0xbc, 0x55, 0x65, 0x40, 0xe2, - 0x2f, 0x61, 0x64, 0x41, 0x62, 0x64, 0xec, 0xd8, 0x91, 0x29, 0xad, 0xcd, 0x52, 0xb6, 0x8e, 0x55, - 0x26, 0x74, 0x77, 0x4e, 0xec, 0xfe, 0x00, 0xa5, 0xe9, 0x76, 0xef, 0xee, 0xbd, 0xcf, 0xfb, 0xde, - 0xbb, 0x77, 0x77, 0xf0, 0xce, 0x96, 0xdb, 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e, 0x84, 0xc1, 0xd7, 0x08, 0x83, 0x6f, 0x11, 0x06, - 0x3f, 0x22, 0x0c, 0x7e, 0x46, 0x18, 0xec, 0x47, 0x58, 0x3a, 0x88, 0x30, 0x38, 0x8a, 0x30, 0x38, - 0x8e, 0xb0, 0x74, 0x12, 0x61, 0x70, 0x1a, 0x61, 0x69, 0xf7, 0x37, 0x96, 0xfe, 0x06, 0x00, 0x00, - 0xff, 0xff, 0xa8, 0xc0, 0xa5, 0xf1, 0xb6, 0x07, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto deleted file mode 100644 index f43d2c25f..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttype.proto +++ /dev/null @@ -1,80 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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.casttype) = "int32", (gogoproto.nullable) = false]; - optional uint64 MyUint64Ptr = 3 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - optional uint64 MyUint64 = 4 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type", (gogoproto.nullable) = false]; - optional float MyFloat32Ptr = 5 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type"]; - optional float MyFloat32 = 6 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat32Type", (gogoproto.nullable) = false]; - optional double MyFloat64Ptr = 7 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type"]; - optional double MyFloat64 = 8 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyFloat64Type", (gogoproto.nullable) = false]; - optional bytes MyBytes = 9 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.Bytes"]; - optional bytes NormalBytes = 10; - repeated uint64 MyUint64s = 11 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyMap = 12 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyMapType"]; - map MyCustomMap = 13 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyStringType", (gogoproto.castvalue) = "github.com/gogo/protobuf/test/casttype.MyUint64Type"]; - map MyNullableMap = 14 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type"]; - map MyEmbeddedMap = 15 [(gogoproto.castkey) = "github.com/gogo/protobuf/test/casttype.MyInt32Type", (gogoproto.nullable) = false]; - optional string String = 16 [(gogoproto.casttype) = "github.com/gogo/protobuf/test/casttype.MyStringType"]; -} - -message Wilson { - optional int64 Int64 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go b/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go deleted file mode 100644 index 6ddb5e555..000000000 --- a/vendor/github.com/gogo/protobuf/test/casttype/combos/unmarshaler/casttypepb_test.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/casttype.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/castvalue/Makefile b/vendor/github.com/gogo/protobuf/test/castvalue/Makefile deleted file mode 100644 index eeaad892c..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/Makefile +++ /dev/null @@ -1,40 +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. - -regenerate: - rm -rf combos - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. castvalue.proto - protoc-gen-combo --default=false --version="3.0.0" --gogo_out=. --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/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go deleted file mode 100644 index a974f4e86..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.pb.go +++ /dev/null @@ -1,856 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: castvalue.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3894 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x1d, 0x43, 0x14, 0x6d, - 0x47, 0xb4, 0x9d, 0x50, 0x19, 0x59, 0x92, 0x25, 0xa8, 0x89, 0x0b, 0x82, 0x10, 0x03, 0x95, 0x7f, - 0x59, 0x90, 0xb1, 0xe5, 0x4c, 0x67, 0x67, 0xb9, 0xb8, 0x00, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, - 0x92, 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, 0xc6, 0xce, 0xba, - 0x5c, 0x40, 0xd3, 0x30, 0xc9, 0x5e, 0x21, 0x8c, 0x98, 0xea, 0x13, 0x5d, 0xba, 0x20, 0xcb, 0x3d, - 0x43, 0x18, 0xcb, 0x74, 0x44, 0x70, 0xe9, 0x82, 0x8c, 0x16, 0xaa, 0x90, 0xa6, 0xd1, 0x85, 0x10, - 0x14, 0xd6, 0x2a, 0xcb, 0xb5, 0x35, 0x75, 0x73, 0x6b, 0xbb, 0xbe, 0xb9, 0x51, 0x59, 0x93, 0xa5, - 0x9e, 0x4c, 0xa9, 0x7d, 0x6a, 0xa7, 0xae, 0xd4, 0x56, 0xe4, 0x44, 0x58, 0xb6, 0x55, 0xab, 0x6c, - 0xd7, 0x56, 0xe4, 0xe4, 0x82, 0x0e, 0xb3, 0xc3, 0xf2, 0xe4, 0xd0, 0x9d, 0x11, 0x5a, 0xe2, 0xc4, - 0x21, 0x4b, 0x4c, 0xb9, 0x06, 0x96, 0xf8, 0xfb, 0x09, 0x98, 0x19, 0x52, 0x2b, 0x86, 0xbe, 0xe4, - 0x59, 0x48, 0xb3, 0x10, 0x65, 0xd5, 0xf3, 0x89, 0xa1, 0x45, 0x87, 0x06, 0xec, 0x40, 0x05, 0xa5, - 0xb8, 0x70, 0x07, 0x91, 0x3c, 0xa4, 0x83, 0x20, 0x14, 0x03, 0x39, 0xfd, 0x27, 0x07, 0x72, 0x3a, - 0x2b, 0x7b, 0x97, 0x46, 0x29, 0x7b, 0x54, 0x76, 0xbc, 0xdc, 0x9e, 0x1e, 0x92, 0xdb, 0xaf, 0xc2, - 0xf4, 0x00, 0xd1, 0xc8, 0x39, 0xf6, 0x25, 0x09, 0x8a, 0x87, 0x39, 0x27, 0x26, 0xd3, 0x25, 0x22, - 0x99, 0xee, 0x6a, 0xbf, 0x07, 0xcf, 0x1c, 0xbe, 0x08, 0x03, 0x6b, 0xfd, 0x9a, 0x04, 0x27, 0x86, - 0x77, 0x8a, 0x43, 0x6d, 0xf8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x52, - 0x12, 0x1d, 0x0c, 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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) - } - 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) - } - 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 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() - l += 1 + sovCastvalue(uint64(l)) - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 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) - } - 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) - } - 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 init() { proto.RegisterFile("castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 342 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x4e, 0x2c, 0x2e, - 0x29, 0x4b, 0xcc, 0x29, 0x4d, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x0b, 0x48, - 0xe9, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, - 0xeb, 0x83, 0x55, 0x24, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa9, 0x74, 0x90, - 0x99, 0x8b, 0xc3, 0x39, 0xb1, 0xb8, 0x24, 0xb1, 0x3c, 0xb1, 0x52, 0xa8, 0x80, 0x4b, 0x18, 0xc4, - 0xf6, 0x4d, 0x2c, 0x08, 0x03, 0x99, 0xe5, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0x2a, 0xc1, 0xa8, - 0xc0, 0xac, 0xc1, 0x6d, 0xa4, 0xa3, 0x87, 0xb0, 0x15, 0xa6, 0x43, 0x0f, 0x8b, 0x72, 0xd7, 0xbc, - 0x92, 0xa2, 0x4a, 0x27, 0x81, 0x13, 0xf7, 0xe4, 0x19, 0xba, 0xee, 0xcb, 0x73, 0xf8, 0x56, 0x86, - 0x67, 0xe6, 0x14, 0xe7, 0xe7, 0x05, 0x61, 0x33, 0x5a, 0xa8, 0x85, 0x91, 0x4b, 0x1a, 0x8b, 0xb8, - 0x5f, 0x69, 0x4e, 0x4e, 0x62, 0x52, 0x4e, 0xaa, 0x04, 0x13, 0xd8, 0x6a, 0x13, 0x22, 0xad, 0x86, - 0x69, 0x83, 0x38, 0x81, 0x07, 0xc5, 0x7a, 0x7c, 0xd6, 0x48, 0x45, 0x72, 0x49, 0xe0, 0xf2, 0x89, - 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x88, 0x29, - 0xa4, 0xce, 0xc5, 0x0a, 0x76, 0x8b, 0x04, 0x93, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x20, 0x92, 0xeb, - 0xa0, 0x96, 0x41, 0xe4, 0xad, 0x98, 0x2c, 0x18, 0xa5, 0x12, 0xb9, 0x14, 0x08, 0xb9, 0x94, 0x42, - 0x2b, 0x94, 0xe4, 0xb8, 0xd8, 0x20, 0x82, 0x42, 0x22, 0x5c, 0xac, 0x9e, 0x79, 0x25, 0x66, 0x26, - 0x60, 0xa3, 0x98, 0x83, 0x20, 0x1c, 0x27, 0x9f, 0x13, 0x0f, 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, - 0xb8, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x17, 0x0f, 0xe5, 0x18, 0x3f, 0x3c, 0x94, - 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x1b, 0x1e, - 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe0, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x0c, 0x17, - 0x1e, 0xc9, 0x31, 0x3c, 0x78, 0x24, 0xc7, 0xf8, 0xe2, 0x91, 0x1c, 0xc3, 0x87, 0x47, 0x72, 0x8c, - 0x3f, 0x1e, 0xc9, 0x31, 0x34, 0x3c, 0x96, 0x63, 0x00, 0x04, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x8b, - 0x19, 0x68, 0x7d, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto deleted file mode 100644 index 35e474361..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/castvalue.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go deleted file mode 100644 index ddee017e1..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/castvaluepb_test.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: castvalue.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go deleted file mode 100644 index 9c96e0c2e..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.pb.go +++ /dev/null @@ -1,1417 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/castvalue.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3903 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x4b, 0x10, 0x15, 0x43, 0x14, 0x6d, - 0x47, 0xb4, 0x9d, 0x90, 0x19, 0x59, 0x92, 0x25, 0xa8, 0x89, 0x0b, 0x82, 0x10, 0x03, 0x95, 0x7f, - 0x59, 0x92, 0xb1, 0xe5, 0x4c, 0x67, 0x67, 0xb9, 0xb8, 0x00, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, - 0x92, 0xa9, 0xe9, 0x83, 0x3a, 0x4e, 0xdb, 0x71, 0x3b, 0xfd, 0xef, 0x4c, 0x12, 0xd7, 0x71, 0x7f, - 0x66, 0x5a, 0xa7, 0xe9, 0x5f, 0xd2, 0xb4, 0x69, 0xda, 0xa7, 0xf4, 0x21, 0xad, 0x9f, 0x3a, 0xc9, - 0x5b, 0x1f, 0x3a, 0xad, 0xc5, 0x78, 0xa6, 0x6e, 0xeb, 0x36, 0x6e, 0xeb, 0x07, 0xcf, 0xe8, 0xa5, - 0x73, 0xff, 0x16, 0xbb, 0x00, 0xc8, 0x05, 0x93, 0xb1, 0xfd, 0x44, 0xec, 0xb9, 0xe7, 0xfb, 0xf6, - 0x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 0xb6, 0x46, 0xe0, 0x06, 0x79, 0x84, 0x3f, 0x72, 0x0e, 0x49, 0x8c, 0xee, 0xac, 0x2d, - 0xd5, 0x14, 0x39, 0x11, 0x5e, 0x5e, 0x0f, 0xf2, 0xe1, 0xbe, 0xf8, 0x83, 0x89, 0xa9, 0xbf, 0x95, - 0x20, 0x17, 0xea, 0x73, 0x49, 0x83, 0xa2, 0x99, 0xa6, 0x7d, 0x47, 0xd5, 0x4c, 0x43, 0xf3, 0x78, - 0x50, 0x00, 0x15, 0x55, 0x88, 0x64, 0xd8, 0x45, 0xfb, 0x40, 0x8c, 0x7f, 0x55, 0x02, 0xb9, 0xb7, - 0xc5, 0xec, 0x31, 0x50, 0xfa, 0x50, 0x0d, 0x7c, 0x45, 0x82, 0x42, 0xb4, 0xaf, 0xec, 0x31, 0xef, - 0xec, 0x87, 0x6a, 0xde, 0x1b, 0x09, 0x18, 0x8f, 0x74, 0x93, 0xc3, 0x5a, 0xf7, 0x79, 0x98, 0x34, - 0x1a, 0xb8, 0xed, 0xd8, 0x3e, 0xb6, 0xf4, 0x7d, 0xd5, 0xc4, 0xb7, 0xb1, 0x59, 0x9c, 0xa3, 0x89, - 0x62, 0xf1, 0xe8, 0x7e, 0x75, 0xa1, 0xde, 0xc5, 0xad, 0x12, 0x58, 0x79, 0xaa, 0xbe, 0x5c, 0x5b, - 0xdb, 0xdc, 0xd8, 0xae, 0xad, 0x57, 0x6f, 0xa8, 0x3b, 0xeb, 0x3f, 0xb5, 0xbe, 0xf1, 0xec, 0xba, - 0x22, 0x1b, 0x3d, 0x6a, 0xef, 0xe3, 0x56, 0xdf, 0x04, 0xb9, 0xd7, 0x28, 0x74, 0x12, 0x06, 0x99, - 0x25, 0x8f, 0xa0, 0x29, 0x98, 0x58, 0xdf, 0x50, 0xb7, 0xea, 0xcb, 0x35, 0xb5, 0x76, 0xed, 0x5a, - 0xad, 0xba, 0xbd, 0xc5, 0x6e, 0x20, 0x02, 0xed, 0xed, 0xe8, 0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, 0x64, - 0x53, 0x68, 0x15, 0x5b, 0xd8, 0xf7, 0xb1, 0xeb, 0xa9, 0x9a, 0x39, 0xc8, 0xbc, 0xd0, 0x8d, 0x41, - 0xf1, 0xcb, 0x6f, 0x47, 0x57, 0x71, 0x85, 0x21, 0x2b, 0xa6, 0x59, 0xde, 0x81, 0x93, 0x03, 0xa2, - 0x62, 0x08, 0xce, 0x97, 0x39, 0xe7, 0x74, 0x5f, 0x64, 0x10, 0xda, 0x4d, 0x10, 0xf2, 0x60, 0x2d, - 0x87, 0xe0, 0xfc, 0x6d, 0xce, 0x89, 0x38, 0x56, 0x2c, 0x29, 0x61, 0xbc, 0x0e, 0x93, 0xb7, 0xb1, - 0xbb, 0x6b, 0x7b, 0xfc, 0x96, 0x66, 0x08, 0xba, 0x57, 0x38, 0xdd, 0x04, 0x07, 0xd2, 0x6b, 0x1b, - 0xc2, 0x75, 0x05, 0x32, 0x4d, 0x4d, 0xc7, 0x43, 0x50, 0x7c, 0x85, 0x53, 0x8c, 0x11, 0x7d, 0x02, - 0xad, 0x40, 0xbe, 0x65, 0xf3, 0xca, 0x14, 0x0f, 0x7f, 0x95, 0xc3, 0x73, 0x02, 0xc3, 0x29, 0x1c, - 0xdb, 0xe9, 0x98, 0xa4, 0x6c, 0xc5, 0x53, 0xfc, 0x8e, 0xa0, 0x10, 0x18, 0x4e, 0x71, 0x0c, 0xb7, - 0xfe, 0xae, 0xa0, 0xf0, 0x42, 0xfe, 0x7c, 0x06, 0x72, 0xb6, 0x65, 0xee, 0xdb, 0xd6, 0x30, 0x46, - 0xfc, 0x1e, 0x67, 0x00, 0x0e, 0x21, 0x04, 0x57, 0x21, 0x3b, 0xec, 0x42, 0xfc, 0xc1, 0xdb, 0x62, - 0x7b, 0x88, 0x15, 0x58, 0x81, 0x09, 0x91, 0xa0, 0x0c, 0xdb, 0x1a, 0x82, 0xe2, 0x0f, 0x39, 0x45, - 0x21, 0x04, 0xe3, 0xd3, 0xf0, 0xb1, 0xe7, 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xe5, 0xc4, 0x65, 0x69, 0x46, 0x83, 0xd9, 0x38, 0x4b, 0x7f, 0xcc, 0x57, - 0xcc, 0x95, 0x60, 0x94, 0x09, 0xd1, 0x34, 0xa4, 0xeb, 0x96, 0x7f, 0xe9, 0x02, 0xa5, 0x4a, 0x2a, - 0xec, 0x61, 0x69, 0xf5, 0xf5, 0xfb, 0xa5, 0x91, 0xef, 0xdd, 0x2f, 0x8d, 0xfc, 0xd3, 0xfd, 0xd2, - 0xc8, 0x1b, 0xf7, 0x4b, 0xd2, 0x5b, 0xf7, 0x4b, 0xd2, 0x3b, 0xf7, 0x4b, 0xd2, 0x7b, 0xf7, 0x4b, - 0xd2, 0xbd, 0x83, 0x92, 0xf4, 0xd5, 0x83, 0x92, 0xf4, 0xf5, 0x83, 0x92, 0xf4, 0xed, 0x83, 0x92, - 0xf4, 0x9d, 0x83, 0x92, 0xf4, 0xfa, 0x41, 0x49, 0xfa, 0xde, 0x41, 0x49, 0x7a, 0xe3, 0xa0, 0x24, - 0xbd, 0x75, 0x50, 0x1a, 0x79, 0xe7, 0xa0, 0x24, 0xbd, 0x77, 0x50, 0x1a, 0xb9, 0xf7, 0x83, 0xd2, - 0xc8, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xe4, 0x13, 0xfa, 0x71, 0x18, 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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) - } - 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) - } - 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 (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 := 0 - if ((*Wilson)(&v)) != nil { - msgSize = ((*Wilson)(&v)).Size() - msgSize += 1 + sovCastvalue(uint64(msgSize)) - } - mapSize := 1 + sovCastvalue(uint64(k)) + 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] - msgSize := 0 - if ((*Wilson)(v)) != nil { - msgSize = ((*Wilson)(v)).Size() - msgSize += 1 + sovCastvalue(uint64(msgSize)) - } - mapSize := 1 + sovCastvalue(uint64(k)) + msgSize - i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintCastvalue(dAtA, i, uint64(k)) - if ((*Wilson)(v)) != nil { - 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 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() - l += 1 + sovCastvalue(uint64(l)) - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 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) - } - 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) - } - 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 - } - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - var mapkey int32 - mapvalue := &Wilson{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCastvalue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - var mapkey int32 - var mapvalue *Wilson - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCastvalue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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") -) - -func init() { proto.RegisterFile("combos/both/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 354 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0x2a, 0x41, - 0x14, 0xc5, 0xf7, 0xb2, 0xe1, 0x85, 0x37, 0xbc, 0x82, 0xb7, 0x5a, 0x6c, 0x20, 0xb9, 0x6c, 0x68, - 0xa4, 0xd0, 0xdd, 0x84, 0x10, 0x63, 0x2c, 0x31, 0x16, 0x26, 0x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 0x2b, - 0x4c, 0xfe, 0x98, 0x98, 0x9f, 0xfd, 0xc4, 0xc8, 0x11, 0xfd, 0xd4, 0x8b, 0x4d, 0xb0, 0xa0, 0x9c, - 0x6e, 0xcc, 0x47, 0x63, 0x8d, 0xa4, 0x55, 0x17, 0x33, 0x65, 0x41, 0x39, 0x5b, 0xf9, 0xff, 0xae, - 0xdd, 0x0b, 0x2c, 0x79, 0xdf, 0x4e, 0x6d, 0x41, 0x9e, 0x12, 0xeb, 0xbb, 0xa6, 0xbf, 0x44, 0x94, - 0x90, 0xfc, 0x49, 0x44, 0x63, 0x95, 0xa4, 0xf7, 0xba, 0x7c, 0xb3, 0xaa, 0xa2, 0xf4, 0x46, 0xb2, - 0xd4, 0xf6, 0x87, 0x02, 0xb5, 0x91, 0x40, 0xed, 0x5e, 0xa0, 0x36, 0x16, 0x08, 0x13, 0x81, 0x30, - 0x15, 0x08, 0x33, 0x81, 0x30, 0x90, 0x08, 0x57, 0x12, 0xe1, 0x5a, 0x22, 0xdc, 0x48, 0x84, 0x5b, - 0x89, 0x30, 0x94, 0x08, 0x23, 0x89, 0x30, 0x96, 0x08, 0x13, 0x89, 0xda, 0x54, 0x22, 0xcc, 0x24, - 0x6a, 0x83, 0x27, 0xd4, 0x9e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xe0, 0x74, 0x89, 0x89, 0x02, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto deleted file mode 100644 index 156639577..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvalue.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go deleted file mode 100644 index 6eccd274f..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/castvaluepb_test.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/castvalue.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go deleted file mode 100644 index 202656eee..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/both/mytypes.go +++ /dev/null @@ -1,31 +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 castvalue - -type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go deleted file mode 100644 index 73210ba39..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.pb.go +++ /dev/null @@ -1,965 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/castvalue.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3903 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0xcb, 0x10, 0x1d, 0x43, 0x14, 0x6d, - 0x47, 0xb4, 0x9d, 0x90, 0x19, 0x59, 0x92, 0x25,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0x84, 0x32, 0xaa, 0x83, 0xec, 0xd9, 0x5d, 0x57, 0xc7, 0xaa, 0x6e, 0x37, 0xb1, - 0x6a, 0x58, 0x2d, 0xbb, 0x98, 0xa5, 0x04, 0x67, 0x06, 0x27, 0x42, 0x15, 0xab, 0x76, 0x13, 0xd7, - 0xad, 0x96, 0xad, 0x14, 0xbc, 0xc8, 0x33, 0x3a, 0x05, 0xe3, 0xde, 0x81, 0xe5, 0x6b, 0x2f, 0x14, - 0xf3, 0x34, 0x42, 0xf8, 0xd3, 0xc2, 0x5f, 0x8f, 0xc3, 0xd4, 0x28, 0x21, 0x76, 0x15, 0xd2, 0x2d, - 0x32, 0xcb, 0x62, 0xe2, 0x24, 0x3e, 0x60, 0x98, 0xa8, 0x13, 0xc7, 0x7f, 0x44, 0x27, 0x56, 0x20, - 0x67, 0x61, 0xcf, 0xc7, 0x4d, 0x16, 0x11, 0xc9, 0x11, 0x63, 0x0a, 0x18, 0x68, 0x30, 0xa4, 0x52, - 0x3f, 0x52, 0x48, 0x3d, 0x07, 0x53, 0x81, 0x49, 0xaa, 0xab, 0x59, 0x6d, 0x11, 0x9b, 0xcb, 0x71, - 0x96, 0x2c, 0xd5, 0x04, 0x4e, 0x21, 0x30, 0xa5, 0x80, 0x23, 0xcf, 0x68, 0x15, 0xc0, 0xb6, 0xb0, - 0xdd, 0x52, 0x9b, 0x58, 0x37, 0x8b, 0x99, 0x23, 0xbc, 0xb4, 0x45, 0x54, 0x06, 0xbc, 0x64, 0x33, - 0xa9, 0x6e, 0xa2, 0x2b, 0xbd, 0x50, 0x9b, 0x38, 0x22, 0x52, 0x36, 0xd8, 0x26, 0x1b, 0x88, 0xb6, - 0x5d, 0x28, 0xb8, 0x98, 0xc4, 0x3d, 0x6e, 0xf2, 0x99, 0x65, 0xa9, 0x11, 0x4b, 0xb1, 0x33, 0x53, - 0x38, 0x8c, 0x4d, 0x6c, 0xd2, 0x0d, 0x3f, 0xa2, 0x47, 0x20, 0x10, 0xa8, 0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x87, 0xa5, 0xb1, 0xd7, 0x0f, 0x4b, 0xd2, - 0x9b, 0x87, 0xa5, 0xb1, 0xb7, 0x0f, 0x4b, 0xd2, 0xbb, 0x87, 0xa5, 0xb1, 0x7b, 0x3f, 0x28, 0x8d, - 0xfd, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb9, 0x18, 0x29, 0x1c, 0x1d, 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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) - } - 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) - } - 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 (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 := 0 - if ((*Wilson)(&v)) != nil { - msgSize = ((*Wilson)(&v)).Size() - msgSize += 1 + sovCastvalue(uint64(msgSize)) - } - mapSize := 1 + sovCastvalue(uint64(k)) + 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] - msgSize := 0 - if ((*Wilson)(v)) != nil { - msgSize = ((*Wilson)(v)).Size() - msgSize += 1 + sovCastvalue(uint64(msgSize)) - } - mapSize := 1 + sovCastvalue(uint64(k)) + msgSize - i = encodeVarintCastvalue(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintCastvalue(dAtA, i, uint64(k)) - if ((*Wilson)(v)) != nil { - 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 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() - l += 1 + sovCastvalue(uint64(l)) - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 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) - } - 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) - } - 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 init() { proto.RegisterFile("combos/marshaler/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 358 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0x2a, 0x41, - 0x14, 0xc5, 0xe7, 0xb2, 0xe1, 0x85, 0x37, 0xbc, 0x82, 0xb7, 0xef, 0x15, 0x1b, 0x4c, 0x2e, 0x1b, - 0x1a, 0x29, 0x74, 0x37, 0x21, 0xc4, 0x18, 0x4b, 0x8c, 0x85, 0x89, 0x58, 0x50, 0x68, 0x2c, 0x67, - 0xc9, 0xba, 0x10, 0x17, 0x86, 0xec, 0x87, 0x66, 0x3b, 0x0a, 0x2b, 0xff, 0x12, 0x4b, 0x4b, 0x4b, - 0xed, 0x28, 0x29, 0xad,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5f, 0xa5, 0x59, 0xd5, 0xc5, 0xc8, 0x98, 0x50, - 0xc9, 0x57, 0xff, 0xbe, 0x69, 0xf7, 0x0c, 0x4b, 0xdf, 0xb7, 0x32, 0x9b, 0x50, 0x64, 0xd4, 0xfc, - 0xaa, 0xe9, 0x0f, 0x11, 0x65, 0xa4, 0xbf, 0x52, 0x51, 0xff, 0x4f, 0xb3, 0xbb, 0xbd, 0x68, 0xa3, - 0xa6, 0xa2, 0xb4, 0x66, 0xba, 0xd4, 0xf7, 0x86, 0x02, 0xc9, 0x48, 0x20, 0xb9, 0x13, 0x48, 0xc6, - 0x02, 0x61, 0x22, 0x10, 0xa6, 0x02, 0x61, 0x26, 0x10, 0x06, 0x12, 0xe1, 0x52, 0x22, 0x5c, 0x49, - 0x84, 0x6b, 0x89, 0x70, 0x23, 0x11, 0x86, 0x12, 0x61, 0x24, 0x91, 0x8c, 0x25, 0xc2, 0x44, 0x22, - 0x99, 0x4a, 0x84, 0x99, 0x44, 0x32, 0x78, 0x44, 0xf2, 0x14, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x22, - 0x8c, 0x46, 0x8e, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto deleted file mode 100644 index 728312b86..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvalue.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go deleted file mode 100644 index 23e086c50..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/castvaluepb_test.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/castvalue.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastawayMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestWilsonMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go deleted file mode 100644 index 202656eee..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/marshaler/mytypes.go +++ /dev/null @@ -1,31 +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 castvalue - -type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go deleted file mode 100644 index 26ccbbd53..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.pb.go +++ /dev/null @@ -1,1309 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/castvalue.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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() {} -func (*Castaway) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{0} } - -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 (*Wilson) Descriptor() ([]byte, []int) { return fileDescriptorCastvalue, []int{1} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3903 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0xcb, 0x10, 0x1d, 0x43, 0x14, 0x6c, - 0x47, 0xb4, 0x9d, 0x90, 0x19, 0x59, 0x92, 0x25, 0xa8, 0x89, 0x0b, 0x82, 0x10, 0x03, 0x95, 0x7f, - 0x59, 0x92, 0xb1, 0xe5, 0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xac, 0x1a, 0x56, 0xcb, 0x2e, 0x66, 0x29, 0xc1, 0x99, 0xc1, 0x89, 0x50, 0xc5, 0x9a, 0xdd, 0xc4, - 0x0d, 0xab, 0x65, 0x2b, 0x05, 0x2f, 0xf2, 0x8c, 0x4e, 0xc1, 0xb8, 0x77, 0x60, 0xf9, 0xda, 0x0b, - 0xc5, 0x3c, 0x8d, 0x10, 0xfe, 0x54, 0xfe, 0xeb, 0x71, 0x98, 0x1a, 0x25, 0xc4, 0xae, 0x42, 0xba, - 0x45, 0x66, 0x59, 0x4c, 0x9c, 0xc4, 0x07, 0x0c, 0x13, 0x75, 0xe2, 0xf8, 0x8f, 0xe8, 0xc4, 0x2a, - 0xe4, 0x2c, 0xec, 0xf9, 0xb8, 0xc9, 0x22, 0x22, 0x39, 0x62, 0x4c, 0x01, 0x03, 0x0d, 0x86, 0x54, - 0xea, 0x47, 0x0a, 0xa9, 0xe7, 0x60, 0x2a, 0x30, 0x49, 0x75, 0x35, 0xab, 0x2d, 0x62, 0x73, 0x29, - 0xce, 0x92, 0xc5, 0xba, 0xc0, 0x29, 0x04, 0xa6, 0x14, 0x70, 0xe4, 0x19, 0xad, 0x00, 0xd8, 0x16, - 0xb6, 0x5b, 0x6a, 0x13, 0xeb, 0x66, 0x31, 0x73, 0x84, 0x97, 0x36, 0x89, 0xca, 0x80, 0x97, 0x6c, - 0x26, 0xd5, 0x4d, 0x74, 0xa5, 0x17, 0x6a, 0x13, 0x47, 0x44, 0xca, 0x3a, 0xdb, 0x64, 0x03, 0xd1, - 0xb6, 0x0b, 0x05, 0x17, 0x93, 0xb8, 0xc7, 0x4d, 0x3e, 0xb3, 0x2c, 0x35, 0x62, 0x31, 0x76, 0x66, - 0x0a, 0x87, 0xb1, 0x89, 0x4d, 0xba, 0xe1, 0x47, 0xf4, 0x08, 0x04, 0x02, 0x95, 0x86, 0x15, 0xd0, - 0x2c, 0x94, 0x17, 0xc2, 0x0d, 0xad, 0x83, 0xe7, 0xee, 0x42, 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82, 0x67, 0x12, 0x58, 0x4d, 0xdc, 0xd2, 0xba, 0xa6, 0xaf, 0xde, 0xd6, 0xcc, 0x2e, 0xa6, 0x01, - 0x9f, 0x55, 0xf2, 0x5c, 0xf8, 0x69, 0x22, 0x43, 0x67, 0x20, 0xc7, 0x76, 0x95, 0x61, 0x35, 0xf1, - 0x0b, 0x34, 0x7b, 0xa6, 0x15, 0xb6, 0xd1, 0x1a, 0x44, 0x42, 0x5e, 0x7f, 0xd3, 0xb3, 0x2d, 0x11, - 0x9a, 0xf4, 0x15, 0x44, 0x40, 0x5f, 0xff, 0x74, 0x7f, 0xe2, 0x7e, 0x78, 0xf8, 0xf4, 0xfa, 0x63, - 0xaa, 0xfc, 0xad, 0x04, 0xa4, 0x68, 0xbe, 0x98, 0x82, 0xdc, 0xce, 0x8d, 0xad, 0xba, 0xba, 0xb2, - 0xb9, 0xbb, 0xbc, 0x56, 0x97, 0x25, 0x54, 0x00, 0xa0, 0x82, 0x6b, 0x6b, 0x9b, 0xd5, 0x1d, 0x39, - 0x11, 0x3c, 0x37, 0x36, 0x76, 0x2e, 0x5d, 0x90, 0x93, 0x01, 0x60, 0x97, 0x09, 0x52, 0x61, 0x85, - 0xa7, 0xce, 0xcb, 0x69, 0x24, 0x43, 0x9e, 0x11, 0x34, 0x9e, 0xab, 0xaf, 0x5c, 0xba, 0x20, 0x8f, - 0x47, 0x25, 0x4f, 0x9d, 0x97, 0x27, 0xd0, 0x24, 0x64, 0xa9, 0x64, 0x79, 0x73, 0x73, 0x4d, 0xce, - 0x04, 0x9c, 0xdb, 0x3b, 0x4a, 0x63, 0x63, 0x55, 0xce, 0x06, 0x9c, 0xab, 0xca, 0xe6, 0xee, 0x96, - 0x0c, 0x01, 0xc3, 0x7a, 0x7d, 0x7b, 0xbb, 0xba, 0x5a, 0x97, 0x73, 0x81, 0xc6, 0xf2, 0x8d, 0x9d, - 0xfa, 0xb6, 0x9c, 0x8f, 0x98, 0xf5, 0xd4, 0x79, 0x79, 0x32, 0x78, 0x45, 0x7d, 0x63, 0x77, 0x5d, - 0x2e, 0xa0, 0x69, 0x98, 0x64, 0xaf, 0x10, 0x46, 0x4c, 0xf5, 0x89, 0x2e, 0x5d, 0x90, 0xe5, 0x9e, - 0x21, 0x8c, 0x65, 0x3a, 0x22, 0xb8, 0x74, 0x41, 0x46, 0xe5, 0x1a, 0xa4, 0x69, 0x74, 0x21, 0x04, - 0x85, 0xb5, 0xea, 0x72, 0x7d, 0x4d, 0xdd, 0xdc, 0xda, 0x69, 0x6c, 0x6e, 0x54, 0xd7, 0x64, 0xa9, - 0x27, 0x53, 0xea, 0x9f, 0xda, 0x6d, 0x28, 0xf5, 0x15, 0x39, 0x11, 0x96, 0x6d, 0xd5, 0xab, 0x3b, - 0xf5, 0x15, 0x39, 0x59, 0xd6, 0x61, 0x76, 0x58, 0x9e, 0x1c, 0xba, 0x33, 0x42, 0x4b, 0x9c, 0x38, - 0x62, 0x89, 0x29, 0xd7, 0xc0, 0x12, 0xff, 0x20, 0x01, 0x33, 0x43, 0x6a, 0xc5, 0xd0, 0x97, 0x3c, - 0x03, 0x69, 0x16, 0xa2, 0xac, 0x7a, 0x3e, 0x3e, 0xb4, 0xe8, 0xd0, 0x80, 0x1d, 0xa8, 0xa0, 0x14, - 0x17, 0xee, 0x20, 0x92, 0x47, 0x74, 0x10, 0x84, 0x62, 0x20, 0xa7, 0xff, 0xf4, 0x40, 0x4e, 0x67, - 0x65, 0xef, 0xd2, 0x28, 0x65, 0x8f, 0xca, 0x4e, 0x96, 0xdb, 0xd3, 0x43, 0x72, 0xfb, 0x55, 0x98, - 0x1e, 0x20, 0x1a, 0x39, 0xc7, 0xbe, 0x28, 0x41, 0xf1, 0x28, 0xe7, 0xc4, 0x64, 0xba, 0x44, 0x24, - 0xd3, 0x5d, 0xed, 0xf7, 0xe0, 0xd9, 0xa3, 0x17, 0x61, 0x60, 0xad, 0x5f, 0x95, 0xe0, 0xd4, 0xf0, - 0x4e, 0x71, 0xa8, 0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0x00, 0x00, 0xff, 0xff, 0xfd, 0x50, 0xe9, 0xb6, 0x1f, 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Castaway) - if !ok { - that2, ok := that.(Castaway) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Wilson) - if !ok { - that2, ok := that.(Wilson) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetCastMapValueMessage() map[int32]MyWilson - GetCastMapValueMessageNullable() map[int32]*MyWilson -} - -func (this *Castaway) Proto() proto.Message { - return this -} - -func (this *Castaway) TestProto() 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() proto.Message - GetInt64() *int64 -} - -func (this *Wilson) Proto() proto.Message { - return this -} - -func (this *Wilson) TestProto() 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) - } - 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) - } - 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 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() - l += 1 + sovCastvalue(uint64(l)) - } - mapEntrySize := 1 + sovCastvalue(uint64(k)) + 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) - } - 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) - } - 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 - } - if m.CastMapValueMessage == nil { - m.CastMapValueMessage = make(map[int32]MyWilson) - } - var mapkey int32 - mapvalue := &Wilson{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCastvalue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.CastMapValueMessageNullable == nil { - m.CastMapValueMessageNullable = make(map[int32]*MyWilson) - } - var mapkey int32 - var mapvalue *Wilson - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipCastvalue(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthCastvalue - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/castvalue.proto", fileDescriptorCastvalue) } - -var fileDescriptorCastvalue = []byte{ - // 359 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x8f, 0xbd, 0x4f, 0xf2, 0x50, - 0x14, 0xc6, 0xef, 0xa1, 0xe1, 0x0d, 0xef, 0xc5, 0x01, 0xab, 0x43, 0x83, 0xc9, 0xa1, 0x61, 0x91, - 0x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0x6b, 0x6b, 0x19, 0x89, 0xae, 0xfd, 0x12, 0x3d, 0xb7, 0xa5, 0x15, - 0x96, 0x3e, 0xe1, 0xbf, 0xc3, 0x14, 0x4f, 0xa8, 0xf6, 0xd5, 0x4f, 0xd4, 0x02, 0x55, 0xce, 0xec, - 0x58, 0x03, 0x1d, 0x2a, 0xd9, 0xe6, 0x6c, 0x54, 0xd7, 0x69, 0x56, 0x76, 0xd1, 0x32, 0x3a, 0x54, - 0xf2, 0xd5, 0xe5, 0x0f, 0xed, 0x5e, 0x61, 0xe9, 0xfb, 0x4e, 0x66, 0x1b, 0x8a, 0x8c, 0xea, 0x3f, - 0x35, 0xfd, 0x23, 0xa2, 0x8c, 0xf4, 0x5f, 0x2a, 0xaa, 0xab, 0x34, 0xbb, 0xef, 0x85, 0x5b, 0x35, - 0x19, 0xa5, 0x34, 0xd3, 0xa5, 0x7e, 0x30, 0x48, 0x90, 0x0c, 0x13, 0x24, 0x0f, 0x09, 0x92, 0x51, - 0x82, 0x30, 0x4e, 0x10, 0x26, 0x09, 0xc2, 0x34, 0x41, 0xe8, 0x0b, 0x84, 0x6b, 0x81, 0x70, 0x23, - 0x10, 0x6e, 0x05, 0xc2, 0x9d, 0x40, 0x18, 0x08, 0x24, 0x43, 0x81, 0x30, 0x12, 0x08, 0x63, 0x81, - 0x64, 0x22, 0x10, 0xa6, 0x02, 0x49, 0xff, 0x19, 0xc9, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, - 0xe3, 0x1c, 0x3e, 0x90, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto deleted file mode 100644 index 2f046a716..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvalue.proto +++ /dev/null @@ -1,66 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go deleted file mode 100644 index 278e50cb3..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/castvaluepb_test.go +++ /dev/null @@ -1,455 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/castvalue.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCastawayProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkWilsonProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Castaway{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Wilson{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Castaway{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Wilson{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastaway(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Castaway{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedWilson(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Wilson{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestWilsonGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastawaySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastaway(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedWilson(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go deleted file mode 100644 index 202656eee..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/combos/unmarshaler/mytypes.go +++ /dev/null @@ -1,31 +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 castvalue - -type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go b/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go deleted file mode 100644 index 202656eee..000000000 --- a/vendor/github.com/gogo/protobuf/test/castvalue/mytypes.go +++ /dev/null @@ -1,31 +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 castvalue - -type MyWilson Wilson diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go deleted file mode 100644 index 53f720e96..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/both/bug_test.go +++ /dev/null @@ -1,252 +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 test - -import ( - "fmt" - "math" - "math/rand" - "testing" - "time" - - "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") -} - -func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - nins := make([]*NinOptNative, rep) - for i := range nins { - nins[i] = NewPopulatedNinOptNative(r, true) - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldE, nins); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} - -func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - ints := make([]int64, rep) - for i := range ints { - ints[i] = r.Int63() - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldD, ints); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go deleted file mode 100644 index 4c2020853..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/both/thetestpb_test.go +++ /dev/null @@ -1,17949 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/thetest.proto - -/* -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 - Node - NonByteCustomType - NidOptNonByteCustomType - NinOptNonByteCustomType - NidRepNonByteCustomType - NinRepNonByteCustomType - ProtoType -*/ -package test - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNodeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNode(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Node{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProtoTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkProtoTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomDashCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomDash(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOrBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOrBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestADeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedADeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndDeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndDeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNilCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNil(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTimerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTimer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestMyExtendableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedMyExtendable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOtherExtenableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOtherExtenable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinitionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessageCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedScopeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedScope(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomContainerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomContainer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNoExtensionsMapCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNoExtensionsMap(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognized(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNodeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNode(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestProtoTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNilGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestProtoTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNodeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestProtoTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go deleted file mode 100644 index 53f720e96..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/bug_test.go +++ /dev/null @@ -1,252 +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 test - -import ( - "fmt" - "math" - "math/rand" - "testing" - "time" - - "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") -} - -func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - nins := make([]*NinOptNative, rep) - for i := range nins { - nins[i] = NewPopulatedNinOptNative(r, true) - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldE, nins); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} - -func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - ints := make([]int64, rep) - for i := range ints { - ints[i] = r.Int63() - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldD, ints); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go deleted file mode 100644 index 4112884ac..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/t.go +++ /dev/null @@ -1,77 +0,0 @@ -package test - -import ( - "encoding/json" - "strings" - - "github.com/gogo/protobuf/proto" -) - -type T struct { - Data string -} - -func (gt *T) protoType() *ProtoType { - return &ProtoType{ - Field2: >.Data, - } -} - -func (gt T) Equal(other T) bool { - return gt.protoType().Equal(other.protoType()) -} - -func (gt *T) Size() int { - proto := &ProtoType{ - Field2: >.Data, - } - return proto.Size() -} - -func NewPopulatedT(r randyThetest) *T { - data := NewPopulatedProtoType(r, false).Field2 - gt := &T{} - if data != nil { - gt.Data = *data - } - return gt -} - -func (r T) Marshal() ([]byte, error) { - return proto.Marshal(r.protoType()) -} - -func (r *T) MarshalTo(data []byte) (n int, err error) { - return r.protoType().MarshalTo(data) -} - -func (r *T) Unmarshal(data []byte) error { - pr := &ProtoType{} - err := proto.Unmarshal(data, pr) - if err != nil { - return err - } - - if pr.Field2 != nil { - r.Data = *pr.Field2 - } - return nil -} - -func (gt T) MarshalJSON() ([]byte, error) { - return json.Marshal(gt.Data) -} - -func (gt *T) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - *gt = T{Data: s} - return nil -} - -func (gt T) Compare(other T) int { - return strings.Compare(gt.Data, other.Data) -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go deleted file mode 100644 index 023da8d4a..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.pb.go +++ /dev/null @@ -1,29504 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/thetest.proto - -/* - 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 - Node - NonByteCustomType - NidOptNonByteCustomType - NinOptNonByteCustomType - NidRepNonByteCustomType - NinRepNonByteCustomType - ProtoType -*/ -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 bytes "bytes" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import binary "encoding/binary" - -// 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 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 -} -func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } - -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 -} -func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -type YetAnotherTestEnum int32 - -const ( - AA YetAnotherTestEnum = 0 - BetterYetBB YetAnotherTestEnum = 1 -) - -var YetAnotherTestEnum_name = map[int32]string{ - 0: "AA", - 1: "BB", -} -var YetAnotherTestEnum_value = map[string]int32{ - "AA": 0, - "BB": 1, -} - -func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { - p := new(YetAnotherTestEnum) - *p = x - return p -} -func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) -} -func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") - if err != nil { - return err - } - *x = YetAnotherTestEnum(value) - return nil -} -func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -type YetYetAnotherTestEnum int32 - -const ( - YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 - YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 -) - -var YetYetAnotherTestEnum_name = map[int32]string{ - 0: "CC", - 1: "DD", -} -var YetYetAnotherTestEnum_value = map[string]int32{ - "CC": 0, - "DD": 1, -} - -func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { - p := new(YetYetAnotherTestEnum) - *p = x - return p -} -func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) -} -func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") - if err != nil { - return err - } - *x = YetYetAnotherTestEnum(value) - return nil -} -func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } - -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 -} -func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{42, 0} -} - -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() {} -func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } - -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() {} -func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } - -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() {} -func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } - -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() {} -func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } - -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() {} -func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } - -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() {} -func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } - -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() {} -func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } - -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() {} -func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } - -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() {} -func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } - -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() {} -func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } - -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() {} -func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } - -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() {} -func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } - -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() {} -func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } - -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() {} -func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } - -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() {} -func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } - -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() {} -func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } - -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() {} -func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } - -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() {} -func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } - -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() {} -func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } - -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() {} -func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } - -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() {} -func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } - -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() {} -func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } - -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() {} -func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } - -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() {} -func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } - -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() {} -func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } - -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() {} -func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } - -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() {} -func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } - -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() {} -func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } - -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() {} -func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } - -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() {} -func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } - -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() {} -func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} -func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } - -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() {} -func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} -func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} -func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} -func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} -func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C -const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB -const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptEnumDefault_Field2 -} - -func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptEnumDefault_Field3 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} -func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} -func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E -const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB -const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_AnotherNinOptEnumDefault_Field2 -} - -func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_AnotherNinOptEnumDefault_Field3 -} - -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() {} -func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} -func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } - -var extRange_MyExtendable = []proto.ExtensionRange{ - {Start: 100, End: 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -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"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} -func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {Start: 14, End: 16}, - {Start: 10, End: 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -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() {} -func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } - -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() {} -func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{42, 0} -} - -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() {} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{42, 0, 0} -} - -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() {} -func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } - -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.12341" 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() {} -func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 -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() {} -func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } - -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() {} -func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } - -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() {} -func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } - -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() {} -func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } - -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() {} -func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } - -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() {} -func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } - -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() {} -func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{51} -} - -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() {} -func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } - -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() {} -func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {Start: 100, End: 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() {} -func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } - -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() {} -func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } - -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() {} -func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{55, 0} -} - -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() {} -func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } - -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() {} -func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{56, 0} -} - -type Node struct { - Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Node) Reset() { *m = Node{} } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } - -type NonByteCustomType struct { - Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } -func (*NonByteCustomType) ProtoMessage() {} -func (*NonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{58} } - -type NidOptNonByteCustomType struct { - Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } -func (*NidOptNonByteCustomType) ProtoMessage() {} -func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{59} } - -type NinOptNonByteCustomType struct { - Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } -func (*NinOptNonByteCustomType) ProtoMessage() {} -func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{60} } - -type NidRepNonByteCustomType struct { - Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } -func (*NidRepNonByteCustomType) ProtoMessage() {} -func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{61} } - -type NinRepNonByteCustomType struct { - Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } -func (*NinRepNonByteCustomType) ProtoMessage() {} -func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{62} } - -type ProtoType struct { - Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ProtoType) Reset() { *m = ProtoType{} } -func (*ProtoType) ProtoMessage() {} -func (*ProtoType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{63} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", - Filename: "combos/marshaler/thetest.proto", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", - Filename: "combos/marshaler/thetest.proto", -} - -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.RegisterType((*Node)(nil), "test.Node") - proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") - proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") - proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") - proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") - proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") - proto.RegisterType((*ProtoType)(nil), "test.ProtoType") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) - proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_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_FieldD) - proto.RegisterExtension(E_FieldE) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != that1.Field1 { - if this.Field1 < that1.Field1 { - return -1 - } - return 1 - } - if this.Field2 != that1.Field2 { - if this.Field2 < that1.Field2 { - return -1 - } - return 1 - } - if this.Field3 != that1.Field3 { - if this.Field3 < that1.Field3 { - return -1 - } - return 1 - } - if this.Field4 != that1.Field4 { - if this.Field4 < that1.Field4 { - return -1 - } - return 1 - } - if this.Field5 != that1.Field5 { - if this.Field5 < that1.Field5 { - return -1 - } - return 1 - } - if this.Field6 != that1.Field6 { - if this.Field6 < that1.Field6 { - return -1 - } - return 1 - } - if this.Field7 != that1.Field7 { - if this.Field7 < that1.Field7 { - return -1 - } - return 1 - } - if this.Field8 != that1.Field8 { - if this.Field8 < that1.Field8 { - return -1 - } - return 1 - } - if this.Field9 != that1.Field9 { - if this.Field9 < that1.Field9 { - return -1 - } - return 1 - } - if this.Field10 != that1.Field10 { - if this.Field10 < that1.Field10 { - return -1 - } - return 1 - } - if this.Field11 != that1.Field11 { - if this.Field11 < that1.Field11 { - return -1 - } - return 1 - } - if this.Field12 != that1.Field12 { - if this.Field12 < that1.Field12 { - return -1 - } - return 1 - } - if this.Field13 != that1.Field13 { - if !this.Field13 { - return -1 - } - return 1 - } - if this.Field14 != that1.Field14 { - if this.Field14 < that1.Field14 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - if *this.Field4 < *that1.Field4 { - return -1 - } - return 1 - } - } else if this.Field4 != nil { - return 1 - } else if that1.Field4 != nil { - return -1 - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - if *this.Field5 < *that1.Field5 { - return -1 - } - return 1 - } - } else if this.Field5 != nil { - return 1 - } else if that1.Field5 != nil { - return -1 - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - if *this.Field8 < *that1.Field8 { - return -1 - } - return 1 - } - } else if this.Field8 != nil { - return 1 - } else if that1.Field8 != nil { - return -1 - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - if *this.Field9 < *that1.Field9 { - return -1 - } - return 1 - } - } else if this.Field9 != nil { - return 1 - } else if that1.Field9 != nil { - return -1 - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - if *this.Field10 < *that1.Field10 { - return -1 - } - return 1 - } - } else if this.Field10 != nil { - return 1 - } else if that1.Field10 != nil { - return -1 - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - if *this.Field11 < *that1.Field11 { - return -1 - } - return 1 - } - } else if this.Field11 != nil { - return 1 - } else if that1.Field11 != nil { - return -1 - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - if *this.Field12 < *that1.Field12 { - return -1 - } - return 1 - } - } else if this.Field12 != nil { - return 1 - } else if that1.Field12 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepPackedNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepPackedNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != that1.Field1 { - if this.Field1 < that1.Field1 { - return -1 - } - return 1 - } - if this.Field2 != that1.Field2 { - if this.Field2 < that1.Field2 { - return -1 - } - return 1 - } - if c := this.Field3.Compare(&that1.Field3); c != 0 { - return c - } - if c := this.Field4.Compare(&that1.Field4); c != 0 { - return c - } - if this.Field6 != that1.Field6 { - if this.Field6 < that1.Field6 { - return -1 - } - return 1 - } - if this.Field7 != that1.Field7 { - if this.Field7 < that1.Field7 { - return -1 - } - return 1 - } - if c := this.Field8.Compare(&that1.Field8); c != 0 { - return c - } - if this.Field13 != that1.Field13 { - if !this.Field13 { - return -1 - } - return 1 - } - if this.Field14 != that1.Field14 { - if this.Field14 < that1.Field14 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := this.Field3.Compare(that1.Field3); c != 0 { - return c - } - if c := this.Field4.Compare(that1.Field4); c != 0 { - return c - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if c := this.Field8.Compare(that1.Field8); c != 0 { - return c - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { - return c - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { - return c - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { - return c - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { - return c - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { - return c - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { - return c - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidEmbeddedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.Field200.Compare(&that1.Field200); c != 0 { - return c - } - if this.Field210 != that1.Field210 { - if !this.Field210 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinEmbeddedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.Field200.Compare(that1.Field200); c != 0 { - return c - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - if !*this.Field210 { - return -1 - } - return 1 - } - } else if this.Field210 != nil { - return 1 - } else if that1.Field210 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidNestedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(&that1.Field1); c != 0 { - return c - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinNestedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(that1.Field1); c != 0 { - return c - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Id.Compare(that1.Id); c != 0 { - return c - } - if c := this.Value.Compare(that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomDash) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Value == nil { - if this.Value != nil { - return 1 - } - } else if this.Value == nil { - return -1 - } else if c := this.Value.Compare(*that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Id == nil { - if this.Id != nil { - return 1 - } - } else if this.Id == nil { - return -1 - } else if c := this.Id.Compare(*that1.Id); c != 0 { - return c - } - if that1.Value == nil { - if this.Value != nil { - return 1 - } - } else if this.Value == nil { - return -1 - } else if c := this.Value.Compare(*that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Id) != len(that1.Id) { - if len(this.Id) < len(that1.Id) { - return -1 - } - return 1 - } - for i := range this.Id { - if c := this.Id[i].Compare(that1.Id[i]); c != 0 { - return c - } - } - if len(this.Value) != len(that1.Value) { - if len(this.Value) < len(that1.Value) { - return -1 - } - return 1 - } - for i := range this.Value { - if c := this.Value[i].Compare(that1.Value[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Id) != len(that1.Id) { - if len(this.Id) < len(that1.Id) { - return -1 - } - return 1 - } - for i := range this.Id { - if c := this.Id[i].Compare(that1.Id[i]); c != 0 { - return c - } - } - if len(this.Value) != len(that1.Value) { - if len(this.Value) < len(that1.Value) { - return -1 - } - return 1 - } - for i := range this.Value { - if c := this.Value[i].Compare(that1.Value[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNativeUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - if *this.Field4 < *that1.Field4 { - return -1 - } - return 1 - } - } else if this.Field4 != nil { - return 1 - } else if that1.Field4 != nil { - return -1 - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - if *this.Field5 < *that1.Field5 { - return -1 - } - return 1 - } - } else if this.Field5 != nil { - return 1 - } else if that1.Field5 != nil { - return -1 - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := this.Field3.Compare(that1.Field3); c != 0 { - return c - } - if c := this.Field4.Compare(that1.Field4); c != 0 { - return c - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.Field200.Compare(that1.Field200); c != 0 { - return c - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - if !*this.Field210 { - return -1 - } - return 1 - } - } else if this.Field210 != nil { - return 1 - } else if that1.Field210 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinNestedStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(that1.Field1); c != 0 { - return c - } - if c := this.Field2.Compare(that1.Field2); c != 0 { - return c - } - if c := this.Field3.Compare(that1.Field3); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Tree) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Or.Compare(that1.Or); c != 0 { - return c - } - if c := this.And.Compare(that1.And); c != 0 { - return c - } - if c := this.Leaf.Compare(that1.Leaf); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *OrBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Left.Compare(&that1.Left); c != 0 { - return c - } - if c := this.Right.Compare(&that1.Right); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AndBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Left.Compare(&that1.Left); c != 0 { - return c - } - if c := this.Right.Compare(&that1.Right); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Leaf) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if this.StrValue != that1.StrValue { - if this.StrValue < that1.StrValue { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *DeepTree) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Down.Compare(that1.Down); c != 0 { - return c - } - if c := this.And.Compare(that1.And); c != 0 { - return c - } - if c := this.Leaf.Compare(that1.Leaf); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *ADeepBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Down.Compare(&that1.Down); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AndDeepBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Left.Compare(&that1.Left); c != 0 { - return c - } - if c := this.Right.Compare(&that1.Right); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *DeepLeaf) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Tree.Compare(&that1.Tree); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Nil) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != that1.Field1 { - if this.Field1 < that1.Field1 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptEnumDefault) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AnotherNinOptEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Timer) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Time1 != that1.Time1 { - if this.Time1 < that1.Time1 { - return -1 - } - return 1 - } - if this.Time2 != that1.Time2 { - if this.Time2 < that1.Time2 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Data, that1.Data); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *MyExtendable) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - extkeys := make([]int32, 0, len(thismap)+len(thatmap)) - for k := range thismap { - extkeys = append(extkeys, k) - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - extkeys = append(extkeys, k) - } - } - sortkeys.Int32s(extkeys) - for _, k := range extkeys { - if v, ok := thismap[k]; ok { - if v2, ok := thatmap[k]; ok { - if c := v.Compare(&v2); c != 0 { - return c - } - } else { - return 1 - } - } else { - return -1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *OtherExtenable) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if *this.Field13 < *that1.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if c := this.M.Compare(that1.M); c != 0 { - return c - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - extkeys := make([]int32, 0, len(thismap)+len(thatmap)) - for k := range thismap { - extkeys = append(extkeys, k) - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - extkeys = append(extkeys, k) - } - } - sortkeys.Int32s(extkeys) - for _, k := range extkeys { - if v, ok := thismap[k]; ok { - if v2, ok := thatmap[k]; ok { - if c := v.Compare(&v2); c != 0 { - return c - } - } else { - return 1 - } - } else { - return -1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedDefinition) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - if *this.EnumField < *that1.EnumField { - return -1 - } - return 1 - } - } else if this.EnumField != nil { - return 1 - } else if that1.EnumField != nil { - return -1 - } - if c := this.NNM.Compare(that1.NNM); c != 0 { - return c - } - if c := this.NM.Compare(that1.NM); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - if *this.NestedField1 < *that1.NestedField1 { - return -1 - } - return 1 - } - } else if this.NestedField1 != nil { - return 1 - } else if that1.NestedField1 != nil { - return -1 - } - if c := this.NNM.Compare(that1.NNM); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - if *this.NestedNestedField1 < *that1.NestedNestedField1 { - return -1 - } - return 1 - } - } else if this.NestedNestedField1 != nil { - return 1 - } else if that1.NestedNestedField1 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedScope) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.A.Compare(that1.A); c != 0 { - return c - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - if *this.B < *that1.B { - return -1 - } - return 1 - } - } else if this.B != nil { - return 1 - } else if that1.B != nil { - return -1 - } - if c := this.C.Compare(that1.C); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNativeDefault) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - if *this.Field4 < *that1.Field4 { - return -1 - } - return 1 - } - } else if this.Field4 != nil { - return 1 - } else if that1.Field4 != nil { - return -1 - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - if *this.Field5 < *that1.Field5 { - return -1 - } - return 1 - } - } else if this.Field5 != nil { - return 1 - } else if that1.Field5 != nil { - return -1 - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - if *this.Field8 < *that1.Field8 { - return -1 - } - return 1 - } - } else if this.Field8 != nil { - return 1 - } else if that1.Field8 != nil { - return -1 - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - if *this.Field9 < *that1.Field9 { - return -1 - } - return 1 - } - } else if this.Field9 != nil { - return 1 - } else if that1.Field9 != nil { - return -1 - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - if *this.Field10 < *that1.Field10 { - return -1 - } - return 1 - } - } else if this.Field10 != nil { - return 1 - } else if that1.Field10 != nil { - return -1 - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - if *this.Field11 < *that1.Field11 { - return -1 - } - return 1 - } - } else if this.Field11 != nil { - return 1 - } else if that1.Field11 != nil { - return -1 - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - if *this.Field12 < *that1.Field12 { - return -1 - } - return 1 - } - } else if this.Field12 != nil { - return 1 - } else if that1.Field12 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomContainer) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNidOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != that1.FieldA { - if this.FieldA < that1.FieldA { - return -1 - } - return 1 - } - if this.FieldB != that1.FieldB { - if this.FieldB < that1.FieldB { - return -1 - } - return 1 - } - if this.FieldC != that1.FieldC { - if this.FieldC < that1.FieldC { - return -1 - } - return 1 - } - if this.FieldD != that1.FieldD { - if this.FieldD < that1.FieldD { - return -1 - } - return 1 - } - if this.FieldE != that1.FieldE { - if this.FieldE < that1.FieldE { - return -1 - } - return 1 - } - if this.FieldF != that1.FieldF { - if this.FieldF < that1.FieldF { - return -1 - } - return 1 - } - if this.FieldG != that1.FieldG { - if this.FieldG < that1.FieldG { - return -1 - } - return 1 - } - if this.FieldH != that1.FieldH { - if this.FieldH < that1.FieldH { - return -1 - } - return 1 - } - if this.FieldI != that1.FieldI { - if this.FieldI < that1.FieldI { - return -1 - } - return 1 - } - if this.FieldJ != that1.FieldJ { - if this.FieldJ < that1.FieldJ { - return -1 - } - return 1 - } - if this.FieldK != that1.FieldK { - if this.FieldK < that1.FieldK { - return -1 - } - return 1 - } - if this.FieldL != that1.FieldL { - if this.FieldL < that1.FieldL { - return -1 - } - return 1 - } - if this.FieldM != that1.FieldM { - if !this.FieldM { - return -1 - } - return 1 - } - if this.FieldN != that1.FieldN { - if this.FieldN < that1.FieldN { - return -1 - } - return 1 - } - if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - if *this.FieldA < *that1.FieldA { - return -1 - } - return 1 - } - } else if this.FieldA != nil { - return 1 - } else if that1.FieldA != nil { - return -1 - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - if *this.FieldB < *that1.FieldB { - return -1 - } - return 1 - } - } else if this.FieldB != nil { - return 1 - } else if that1.FieldB != nil { - return -1 - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - if *this.FieldC < *that1.FieldC { - return -1 - } - return 1 - } - } else if this.FieldC != nil { - return 1 - } else if that1.FieldC != nil { - return -1 - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - if *this.FieldD < *that1.FieldD { - return -1 - } - return 1 - } - } else if this.FieldD != nil { - return 1 - } else if that1.FieldD != nil { - return -1 - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - if *this.FieldE < *that1.FieldE { - return -1 - } - return 1 - } - } else if this.FieldE != nil { - return 1 - } else if that1.FieldE != nil { - return -1 - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - if *this.FieldF < *that1.FieldF { - return -1 - } - return 1 - } - } else if this.FieldF != nil { - return 1 - } else if that1.FieldF != nil { - return -1 - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - if *this.FieldG < *that1.FieldG { - return -1 - } - return 1 - } - } else if this.FieldG != nil { - return 1 - } else if that1.FieldG != nil { - return -1 - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - if *this.FieldH < *that1.FieldH { - return -1 - } - return 1 - } - } else if this.FieldH != nil { - return 1 - } else if that1.FieldH != nil { - return -1 - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - if *this.FieldI < *that1.FieldI { - return -1 - } - return 1 - } - } else if this.FieldI != nil { - return 1 - } else if that1.FieldI != nil { - return -1 - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - if *this.FieldJ < *that1.FieldJ { - return -1 - } - return 1 - } - } else if this.FieldJ != nil { - return 1 - } else if that1.FieldJ != nil { - return -1 - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - if *this.FieldK < *that1.FieldK { - return -1 - } - return 1 - } - } else if this.FieldK != nil { - return 1 - } else if that1.FieldK != nil { - return -1 - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - if *this.FielL < *that1.FielL { - return -1 - } - return 1 - } - } else if this.FielL != nil { - return 1 - } else if that1.FielL != nil { - return -1 - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - if !*this.FieldM { - return -1 - } - return 1 - } - } else if this.FieldM != nil { - return 1 - } else if that1.FieldM != nil { - return -1 - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - if *this.FieldN < *that1.FieldN { - return -1 - } - return 1 - } - } else if this.FieldN != nil { - return 1 - } else if that1.FieldN != nil { - return -1 - } - if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinRepNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.FieldA) != len(that1.FieldA) { - if len(this.FieldA) < len(that1.FieldA) { - return -1 - } - return 1 - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - if this.FieldA[i] < that1.FieldA[i] { - return -1 - } - return 1 - } - } - if len(this.FieldB) != len(that1.FieldB) { - if len(this.FieldB) < len(that1.FieldB) { - return -1 - } - return 1 - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - if this.FieldB[i] < that1.FieldB[i] { - return -1 - } - return 1 - } - } - if len(this.FieldC) != len(that1.FieldC) { - if len(this.FieldC) < len(that1.FieldC) { - return -1 - } - return 1 - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - if this.FieldC[i] < that1.FieldC[i] { - return -1 - } - return 1 - } - } - if len(this.FieldD) != len(that1.FieldD) { - if len(this.FieldD) < len(that1.FieldD) { - return -1 - } - return 1 - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - if this.FieldD[i] < that1.FieldD[i] { - return -1 - } - return 1 - } - } - if len(this.FieldE) != len(that1.FieldE) { - if len(this.FieldE) < len(that1.FieldE) { - return -1 - } - return 1 - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - if this.FieldE[i] < that1.FieldE[i] { - return -1 - } - return 1 - } - } - if len(this.FieldF) != len(that1.FieldF) { - if len(this.FieldF) < len(that1.FieldF) { - return -1 - } - return 1 - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - if this.FieldF[i] < that1.FieldF[i] { - return -1 - } - return 1 - } - } - if len(this.FieldG) != len(that1.FieldG) { - if len(this.FieldG) < len(that1.FieldG) { - return -1 - } - return 1 - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - if this.FieldG[i] < that1.FieldG[i] { - return -1 - } - return 1 - } - } - if len(this.FieldH) != len(that1.FieldH) { - if len(this.FieldH) < len(that1.FieldH) { - return -1 - } - return 1 - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - if this.FieldH[i] < that1.FieldH[i] { - return -1 - } - return 1 - } - } - if len(this.FieldI) != len(that1.FieldI) { - if len(this.FieldI) < len(that1.FieldI) { - return -1 - } - return 1 - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - if this.FieldI[i] < that1.FieldI[i] { - return -1 - } - return 1 - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - if len(this.FieldJ) < len(that1.FieldJ) { - return -1 - } - return 1 - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - if this.FieldJ[i] < that1.FieldJ[i] { - return -1 - } - return 1 - } - } - if len(this.FieldK) != len(that1.FieldK) { - if len(this.FieldK) < len(that1.FieldK) { - return -1 - } - return 1 - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - if this.FieldK[i] < that1.FieldK[i] { - return -1 - } - return 1 - } - } - if len(this.FieldL) != len(that1.FieldL) { - if len(this.FieldL) < len(that1.FieldL) { - return -1 - } - return 1 - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - if this.FieldL[i] < that1.FieldL[i] { - return -1 - } - return 1 - } - } - if len(this.FieldM) != len(that1.FieldM) { - if len(this.FieldM) < len(that1.FieldM) { - return -1 - } - return 1 - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - if !this.FieldM[i] { - return -1 - } - return 1 - } - } - if len(this.FieldN) != len(that1.FieldN) { - if len(this.FieldN) < len(that1.FieldN) { - return -1 - } - return 1 - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - if this.FieldN[i] < that1.FieldN[i] { - return -1 - } - return 1 - } - } - if len(this.FieldO) != len(that1.FieldO) { - if len(this.FieldO) < len(that1.FieldO) { - return -1 - } - return 1 - } - for i := range this.FieldO { - if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - if *this.FieldA < *that1.FieldA { - return -1 - } - return 1 - } - } else if this.FieldA != nil { - return 1 - } else if that1.FieldA != nil { - return -1 - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - if *this.FieldB < *that1.FieldB { - return -1 - } - return 1 - } - } else if this.FieldB != nil { - return 1 - } else if that1.FieldB != nil { - return -1 - } - if c := this.FieldC.Compare(that1.FieldC); c != 0 { - return c - } - if len(this.FieldD) != len(that1.FieldD) { - if len(this.FieldD) < len(that1.FieldD) { - return -1 - } - return 1 - } - for i := range this.FieldD { - if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { - return c - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - if *this.FieldE < *that1.FieldE { - return -1 - } - return 1 - } - } else if this.FieldE != nil { - return 1 - } else if that1.FieldE != nil { - return -1 - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - if *this.FieldF < *that1.FieldF { - return -1 - } - return 1 - } - } else if this.FieldF != nil { - return 1 - } else if that1.FieldF != nil { - return -1 - } - if c := this.FieldG.Compare(that1.FieldG); c != 0 { - return c - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - if !*this.FieldH { - return -1 - } - return 1 - } - } else if this.FieldH != nil { - return 1 - } else if that1.FieldH != nil { - return -1 - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - if *this.FieldI < *that1.FieldI { - return -1 - } - return 1 - } - } else if this.FieldI != nil { - return 1 - } else if that1.FieldI != nil { - return -1 - } - if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.FieldA == nil { - if this.FieldA != nil { - return 1 - } - } else if this.FieldA == nil { - return -1 - } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { - return c - } - if that1.FieldB == nil { - if this.FieldB != nil { - return 1 - } - } else if this.FieldB == nil { - return -1 - } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { - return c - } - if len(this.FieldC) != len(that1.FieldC) { - if len(this.FieldC) < len(that1.FieldC) { - return -1 - } - return 1 - } - for i := range this.FieldC { - if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { - return c - } - } - if len(this.FieldD) != len(that1.FieldD) { - if len(this.FieldD) < len(that1.FieldD) { - return -1 - } - return 1 - } - for i := range this.FieldD { - if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.FieldA.Compare(that1.FieldA); c != 0 { - return c - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - if !*this.FieldB { - return -1 - } - return 1 - } - } else if this.FieldB != nil { - return 1 - } else if that1.FieldB != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - if *this.FieldA < *that1.FieldA { - return -1 - } - return 1 - } - } else if this.FieldA != nil { - return 1 - } else if that1.FieldA != nil { - return -1 - } - if len(this.FieldB) != len(that1.FieldB) { - if len(this.FieldB) < len(that1.FieldB) { - return -1 - } - return 1 - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - if this.FieldB[i] < that1.FieldB[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NoExtensionsMap) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Unrecognized) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - return 0 -} -func (this *UnrecognizedWithInner) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Embedded) != len(that1.Embedded) { - if len(this.Embedded) < len(that1.Embedded) { - return -1 - } - return 1 - } - for i := range this.Embedded { - if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { - return c - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - return 0 -} -func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { - return c - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - return 0 -} -func (this *Node) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Label != nil && that1.Label != nil { - if *this.Label != *that1.Label { - if *this.Label < *that1.Label { - return -1 - } - return 1 - } - } else if this.Label != nil { - return 1 - } else if that1.Label != nil { - return -1 - } - if len(this.Children) != len(that1.Children) { - if len(this.Children) < len(that1.Children) { - return -1 - } - return 1 - } - for i := range this.Children { - if c := this.Children[i].Compare(that1.Children[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NonByteCustomType) - if !ok { - that2, ok := that.(NonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Field1 == nil { - if this.Field1 != nil { - return 1 - } - } else if this.Field1 == nil { - return -1 - } else if c := this.Field1.Compare(*that1.Field1); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptNonByteCustomType) - if !ok { - that2, ok := that.(NidOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(that1.Field1); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNonByteCustomType) - if !ok { - that2, ok := that.(NinOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Field1 == nil { - if this.Field1 != nil { - return 1 - } - } else if this.Field1 == nil { - return -1 - } else if c := this.Field1.Compare(*that1.Field1); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepNonByteCustomType) - if !ok { - that2, ok := that.(NidRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepNonByteCustomType) - if !ok { - that2, ok := that.(NinRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *ProtoType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ProtoType) - if !ok { - that2, ok := that.(ProtoType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -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 (this *Node) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ProtoType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6623 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x7b, 0x6c, 0x1c, 0xd7, - 0x79, 0x2f, 0x67, 0x67, 0x49, 0x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x10, 0x6a, 0x8f, 0x0e, 0x02, 0x8b, - 0xe8, 0xaa, 0xe9, 0xff, 0xad, 0xab, 0xa6, 0xd3, 0x65, 0xef, 0x7c, 0x9c, 0x65, 0x8f, 0x8c, 0x1d, - 0xac, 0xb6, 0xf7, 0x87, 0xd4, 0xf6, 0xcb, 0x30, 0xde, 0x25, 0x28, 0x76, 0x8d, 0xfd, 0xb0, 0x02, - 0xe9, 0x5e, 0xc6, 0x89, 0xa8, 0x74, 0x09, 0xa1, 0xd2, 0x5d, 0x96, 0x2d, 0x78, 0xa2, 0xb7, 0x13, - 0xba, 0x7c, 0xfd, 0x45, 0x05, 0x26, 0xc3, 0x3b, 0xc5, 0x50, 0x1d, 0x1e, 0x82, 0x81, 0x16, 0x72, - 0x77, 0x6c, 0xde, 0x2d, 0x9d, 0x0a, 0x59, 0x83, 0x31, 0x59, 0x76, 0x36, 0x43, 0x05, 0x17, 0x71, - 0xb5, 0x57, 0xbb, 0x47, 0xb5, 0xe9, 0xd2, 0xf4, 0x63, 0x09, 0x38, 0x12, 0x2a, 0x3c, 0x54, 0xd1, - 0xbb, 0x00, 0x1a, 0x56, 0x7b, 0xd7, 0xa5, 0x1d, 0x11, 0x2d, 0xb0, 0x83, 0x64, 0x84, 0x14, 0x2f, - 0x5c, 0x3c, 0x77, 0x5d, 0x8f, 0xae, 0x12, 0x3a, 0xd0, 0x21, 0xc2, 0x70, 0xd1, 0x57, 0x34, 0x49, - 0x14, 0xcd, 0xf4, 0x98, 0x69, 0x57, 0x60, 0xce, 0x83, 0x56, 0x6b, 0x36, 0x90, 0xe5, 0x56, 0x1d, - 0xb7, 0x83, 0xcc, 0x56, 0xc3, 0xda, 0x26, 0x2b, 0x48, 0x2a, 0xd7, 0xbf, 0x65, 0x36, 0x1d, 0x64, - 0x8c, 0x51, 0xf2, 0x3a, 0xa7, 0x62, 0x04, 0x09, 0xa0, 0x4e, 0x00, 0x31, 0x20, 0x20, 0x28, 0xd9, - 0x43, 0x64, 0xbf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0x83, 0x62, 0x36, - 0x9b, 0xf6, 0x53, 0x55, 0xb3, 0xd9, 0x30, 0x1d, 0x16, 0x14, 0x40, 0x86, 0xf2, 0x78, 0x24, 0xae, - 0xd3, 0xde, 0x11, 0xe5, 0x9f, 0x53, 0x40, 0x93, 0x5b, 0x4c, 0x49, 0x41, 0xe5, 0xe7, 0xaa, 0xe0, - 0x67, 0x14, 0x18, 0x15, 0xfb, 0x4a, 0x49, 0xbd, 0x13, 0x3f, 0x57, 0xf5, 0xbe, 0x9f, 0x80, 0x11, - 0xa1, 0x9b, 0x8c, 0xab, 0xdd, 0x07, 0x61, 0xbc, 0x51, 0x47, 0xad, 0xb6, 0xed, 0x22, 0xab, 0xb6, - 0x57, 0x6d, 0xa2, 0x27, 0x51, 0x33, 0x9d, 0x25, 0x85, 0xe2, 0xf4, 0xfe, 0xfd, 0xea, 0xdc, 0x92, - 0x8f, 0x5b, 0xc6, 0xb0, 0xdc, 0xc4, 0x52, 0xa9, 0xbc, 0xb2, 0xb6, 0xba, 0x51, 0xae, 0x14, 0xaf, - 0x57, 0x37, 0x2b, 0xef, 0xa9, 0xac, 0x3e, 0x5a, 0x31, 0xb4, 0x86, 0xc4, 0xf6, 0x36, 0xa6, 0xfa, - 0x1a, 0x68, 0xb2, 0x52, 0xfa, 0x51, 0x08, 0x53, 0x4b, 0xeb, 0xd3, 0x27, 0x60, 0xac, 0xb2, 0x5a, - 0x5d, 0x5f, 0x2a, 0x95, 0xab, 0xe5, 0x2b, 0x57, 0xca, 0xc5, 0x8d, 0x75, 0xba, 0x03, 0xe1, 0x71, - 0x6f, 0x88, 0x49, 0xfd, 0x69, 0x15, 0x26, 0x42, 0x34, 0xd1, 0xf3, 0xec, 0xdd, 0x81, 0xbe, 0xce, - 0x3c, 0x10, 0x47, 0xfb, 0x39, 0xbc, 0xe4, 0xaf, 0x99, 0x1d, 0x97, 0xbd, 0x6a, 0xdc, 0x07, 0xd8, - 0x4a, 0x96, 0xdb, 0xd8, 0x6a,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0x17, 0x12, 0x9a, 0x62, 0x90, 0xef, 0x78, 0xdc, - 0x69, 0x9b, 0x16, 0x09, 0x01, 0x36, 0x8e, 0xbf, 0x63, 0xbf, 0x36, 0x91, 0x59, 0x27, 0xaf, 0x1f, - 0x76, 0xab, 0x85, 0x2c, 0xd7, 0xe1, 0x7e, 0x65, 0xe3, 0x45, 0x36, 0xac, 0xbf, 0x0b, 0xc6, 0xdd, - 0x8e, 0xd9, 0x68, 0x0a, 0xbc, 0x49, 0xc2, 0xab, 0x71, 0x82, 0xc7, 0x9c, 0x83, 0x3b, 0xb8, 0xdc, - 0x3a, 0x72, 0xcd, 0xda, 0x0e, 0xaa, 0xfb, 0xa0, 0x01, 0xb2, 0xcd, 0x70, 0x94, 0x31, 0x94, 0x18, - 0x9d, 0x63, 0xb3, 0xdf, 0x55, 0x60, 0x9c, 0xbf, 0x30, 0xd5, 0x3d, 0x63, 0xad, 0x00, 0x98, 0x96, - 0x65, 0xbb, 0x41, 0x73, 0x75, 0x87, 0x72, 0x17, 0x6e, 0x2e, 0xef, 0x81, 0x8c, 0x80, 0x80, 0xa9, - 0x16, 0x80, 0x4f, 0xe9, 0x69, 0xb6, 0x69, 0x18, 0x62, 0x47, 0x38, 0xe4, 0x1c, 0x90, 0xbe, 0x62, - 0x03, 0x1d, 0xc2, 0x6f, 0x56, 0xfa, 0x61, 0xe8, 0xbf, 0x81, 0xb6, 0x1b, 0x16, 0xdb, 0x98, 0xa5, - 0x5f, 0xf8, 0x46, 0x48, 0xd2, 0xdb, 0x08, 0x29, 0x7c, 0x00, 0x26, 0x6a, 0x76, 0x4b, 0x56, 0xb7, - 0xa0, 0x49, 0xaf, 0xf9, 0xce, 0x23, 0xca, 0xfb, 0xc1, 0x6f, 0x31, 0x7f, 0xaa, 0x28, 0xbf, 0x95, - 0x50, 0xaf, 0xae, 0x15, 0xbe, 0x9c, 0x98, 0xba, 0x4a, 0xa1, 0x6b, 0x7c, 0xa6, 0x06, 0xda, 0x6a, - 0xa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x77, 0x59, 0x47, 0x13, 0x01, 0xff, 0xf7, 0x37, 0xbc, 0x97, 0x5c, - 0x0f, 0x53, 0x28, 0x87, 0xef, 0xd7, 0xc1, 0x55, 0xfb, 0xaa, 0x4d, 0x77, 0xea, 0xde, 0x9f, 0x8d, - 0xde, 0x72, 0x83, 0xbf, 0x6e, 0x42, 0xa6, 0x66, 0xb7, 0x6e, 0xd8, 0xce, 0x69, 0xaf, 0xd8, 0x9c, - 0x76, 0x77, 0x10, 0x5e, 0x63, 0xd8, 0x56, 0x5c, 0x12, 0x7f, 0x9e, 0x3a, 0xd8, 0xfe, 0x1d, 0x39, - 0x9d, 0xad, 0x34, 0xf0, 0x14, 0x2a, 0x64, 0x83, 0x5c, 0x3f, 0x06, 0x03, 0x64, 0x52, 0x67, 0xc8, - 0x21, 0x94, 0x52, 0x48, 0xde, 0x7c, 0x79, 0xba, 0xcf, 0x60, 0x63, 0x1e, 0x75, 0x81, 0xec, 0x60, - 0x26, 0x04, 0xea, 0x82, 0x47, 0x3d, 0x4b, 0x37, 0x31, 0x05, 0xea, 0x59, 0x8f, 0xba, 0x48, 0xb6, - 0x33, 0x55, 0x81, 0xba, 0xe8, 0x51, 0xcf, 0x91, 0x2d, 0xfb, 0x11, 0x81, 0x7a, 0xce, 0xa3, 0x9e, - 0x27, 0x1b, 0xf5, 0x49, 0x81, 0x7a, 0xde, 0xa3, 0x5e, 0x20, 0x7b, 0xf4, 0xe3, 0x02, 0xf5, 0x82, - 0x47, 0xbd, 0x48, 0xf6, 0xe6, 0x75, 0x81, 0x7a, 0xd1, 0xa3, 0x5e, 0x22, 0x17, 0x5f, 0x0e, 0x09, - 0xd4, 0x4b, 0x7a, 0x06, 0x0e, 0xd1, 0x99, 0xcf, 0x93, 0x83, 0xdc, 0x31, 0x46, 0xe6, 0x83, 0x3e, - 0xfd, 0x0c, 0xb9, 0xe4, 0x32, 0x20, 0xd2, 0xcf, 0xf8, 0xf4, 0x05, 0x72, 0xdf, 0x5e, 0x13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8, 0x6b, 0x4a, 0x72, 0x57, 0x22, 0xe0, 0xaa, 0x29, - 0xc9, 0x55, 0x89, 0x80, 0x9b, 0xa6, 0x24, 0x37, 0x25, 0x02, 0x2e, 0x9a, 0x92, 0x5c, 0x94, 0x08, - 0xb8, 0x67, 0x4a, 0x72, 0x4f, 0x22, 0xe0, 0x9a, 0x63, 0xb2, 0x6b, 0x12, 0x41, 0xb7, 0x1c, 0x93, - 0xdd, 0x92, 0x08, 0xba, 0xe4, 0x98, 0xec, 0x92, 0x44, 0xd0, 0x1d, 0xc7, 0x64, 0x77, 0x24, 0x82, - 0xae, 0xf8, 0x59, 0x82, 0x77, 0x84, 0xeb, 0x6e, 0x67, 0xb7, 0xe6, 0xde, 0x56, 0x47, 0x38, 0x2f, - 0xb4, 0x0f, 0x43, 0x0b, 0xfa, 0x1c, 0x69, 0x58, 0x83, 0x1d, 0xa7, 0xb4, 0x82, 0xcd, 0x0b, 0x8d, - 0x45, 0x00, 0x61, 0x85, 0x23, 0x16, 0x6f, 0xab, 0x37, 0x9c, 0x17, 0xda, 0x8c, 0x68, 0xfd, 0x2e, - 0xbe, 0xed, 0x1d, 0xdb, 0x8b, 0x09, 0xde, 0xb1, 0x31, 0xf3, 0x1f, 0xb4, 0x63, 0x9b, 0x8d, 0x36, - 0xb9, 0x67, 0xec, 0xd9, 0x68, 0x63, 0x77, 0xad, 0x3a, 0x71, 0x3b, 0xb8, 0xd9, 0x68, 0xd3, 0x7a, - 0x46, 0x7d, 0x6b, 0xfb, 0x2d, 0x16, 0xc1, 0x06, 0x6a, 0x87, 0x44, 0xf0, 0x41, 0xfb, 0xad, 0x79, - 0xa1, 0x94, 0x1c, 0x34, 0x82, 0xd5, 0x03, 0x47, 0xf0, 0x41, 0x3b, 0xaf, 0x79, 0xa1, 0xbc, 0x1c, - 0x38, 0x82, 0xdf, 0x86, 0x7e, 0x88, 0x45, 0xb0, 0x6f, 0xfe, 0x83, 0xf6, 0x43, 0xb3, 0xd1, 0x26, - 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xf2, 0x5d, 0xf5, 0x62, 0xf0, 0x94, - 0x74, 0x57, 0x49, 0xe4, 0x7b, 0xc4, 0x8b, 0xc6, 0x53, 0xd2, 0xad, 0x25, 0x91, 0x6f, 0xc9, 0x8b, - 0xcb, 0x19, 0xf9, 0xfe, 0x92, 0xc8, 0x78, 0xcd, 0x8f, 0xd0, 0x19, 0xf9, 0x26, 0x93, 0xc8, 0xf9, - 0x1e, 0x3f, 0x56, 0x67, 0xe4, 0x3b, 0x4d, 0x22, 0xe7, 0xb2, 0x1f, 0xb5, 0x33, 0xf2, 0x59, 0x99, - 0xc8, 0xb9, 0xe2, 0xc7, 0xef, 0x8c, 0x7c, 0x6a, 0x26, 0x72, 0x56, 0xfc, 0x48, 0x9e, 0x91, 0xcf, - 0xcf, 0x44, 0xce, 0x55, 0x7f, 0x13, 0xfd, 0xdb, 0x52, 0xf8, 0x05, 0x6e, 0x41, 0x65, 0xa5, 0xf0, - 0x83, 0x90, 0xd0, 0x93, 0x0a, 0x59, 0x80, 0xc7, 0x0f, 0xbb, 0xac, 0x14, 0x76, 0x10, 0x12, 0x72, - 0x59, 0x29, 0xe4, 0x20, 0x24, 0xdc, 0xb2, 0x52, 0xb8, 0x41, 0x48, 0xa8, 0x65, 0xa5, 0x50, 0x83, - 0x90, 0x30, 0xcb, 0x4a, 0x61, 0x06, 0x21, 0x21, 0x96, 0x95, 0x42, 0x0c, 0x42, 0xc2, 0x2b, 0x2b, - 0x85, 0x17, 0x84, 0x84, 0xd6, 0x49, 0x39, 0xb4, 0x20, 0x2c, 0xac, 0x4e, 0xca, 0x61, 0x05, 0x61, - 0x21, 0x75, 0xb7, 0x1c, 0x52, 0x83, 0xb7, 0x5e, 0x9e, 0xee, 0xc7, 0x43, 0x81, 0x68, 0x3a, 0x29, - 0x47, 0x13, 0x84, 0x45, 0xd2, 0x49, 0x39, 0x92, 0x20, 0x2c, 0x8a, 0x4e, 0xca, 0x51, 0x04, 0x61, - 0x11, 0xf4, 0xa2, 0x1c, 0x41, 0xfe, 0x1d, 0x9f, 0xac, 0x74, 0xa4, 0x18, 0x15, 0x41, 0x6a, 0x8c, - 0x08, 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, 0xa4, 0xc6, 0x88, 0x20, 0x35, - 0x46, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x13, 0x41, 0x6a, 0xac, 0x08, 0x52, 0x7b, 0x45, 0xd0, - 0x49, 0xf9, 0xc6, 0x03, 0x84, 0x15, 0xa4, 0x93, 0xf2, 0xd1, 0x67, 0x74, 0x08, 0xa9, 0xb1, 0x42, - 0x48, 0xed, 0x15, 0x42, 0xdf, 0x56, 0x61, 0x42, 0x08, 0x21, 0x76, 0x3e, 0xf4, 0x56, 0x55, 0xa0, - 0xf3, 0x31, 0x2e, 0x58, 0x84, 0xc5, 0xd4, 0xf9, 0x18, 0x87, 0xd4, 0xfb, 0xc5, 0x59, 0x77, 0x15, - 0x2a, 0xc7, 0xa8, 0x42, 0x57, 0xbc, 0x18, 0x3a, 0x1f, 0xe3, 0xe2, 0x45, 0x77, 0xec, 0x5d, 0xdc, - 0xaf, 0x08, 0x3c, 0x12, 0xab, 0x08, 0x2c, 0xc5, 0x2a, 0x02, 0xd7, 0x7c, 0x0f, 0x7e, 0x24, 0x01, - 0x87, 0x7d, 0x0f, 0xd2, 0x4f, 0xe4, 0x17, 0x93, 0xb2, 0x81, 0x23, 0x2a, 0x9d, 0x1f, 0xdb, 0x04, - 0xdc, 0x98, 0x58, 0xaa, 0xeb, 0x6b, 0xe2, 0x61, 0x55, 0xee, 0xa0, 0x07, 0x38, 0x01, 0x8f, 0xb3, - 0xcd, 0xd0, 0x93, 0xa0, 0x2e, 0xd5, 0x1d, 0x52, 0x2d, 0xc2, 0x1e, 0x5b, 0x34, 0x30, 0x59, 0x37, - 0x60, 0x80, 0xb0, 0x3b, 0xc4, 0xbd, 0xb7, 0xf3, 0xe0, 0x92, 0xc1, 0x24, 0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0xfd, 0x28, 0xf1, 0x29, 0x48, 0x15, 0x77, 0x1a, 0xcd, 0x7a, 0x07, 0x59, 0xec, 0xcc, 0x9e, - 0x6d, 0xa1, 0x63, 0x8c, 0xe1, 0xd1, 0xb2, 0x45, 0x18, 0xaf, 0xd8, 0x56, 0x61, 0xcf, 0x0d, 0xd6, - 0x8d, 0x39, 0x29, 0x45, 0xd8, 0x99, 0x0f, 0xf9, 0x63, 0x10, 0xcc, 0x50, 0xe8, 0xff, 0xde, 0xcb, - 0xd3, 0xca, 0x86, 0xb7, 0x7f, 0xbe, 0x02, 0x47, 0x59, 0xfa, 0x74, 0x89, 0x5a, 0x88, 0x12, 0x35, - 0xc8, 0xce, 0xa9, 0x03, 0xe2, 0x96, 0xb0, 0x38, 0x2b, 0x54, 0xdc, 0x9b, 0xd3, 0x0c, 0x37, 0x45, - 0xfb, 0x6a, 0xa6, 0x1e, 0x48, 0xb3, 0x50, 0x71, 0x73, 0x51, 0xe2, 0x24, 0xcd, 0xee, 0x86, 0x41, - 0x8f, 0x16, 0x88, 0x86, 0x60, 0xa6, 0x2c, 0xcc, 0x66, 0x61, 0x28, 0x90, 0xb0, 0x7a, 0x3f, 0x28, - 0x79, 0xad, 0x0f, 0xff, 0x57, 0xd0, 0x14, 0xfc, 0x5f, 0x51, 0x4b, 0xcc, 0xde, 0x03, 0x63, 0xd2, - 0xfe, 0x25, 0xa6, 0x94, 0x34, 0xc0, 0xff, 0x95, 0xb5, 0xa1, 0xa9, 0xe4, 0x47, 0x7f, 0x3b, 0xd3, - 0x37, 0x7b, 0x19, 0xf4, 0xee, 0x9d, 0x4e, 0x7d, 0x00, 0x12, 0x79, 0x2c, 0xf2, 0x28, 0x24, 0x0a, - 0x05, 0x4d, 0x99, 0x1a, 0xfb, 0xbf, 0x9f, 0x3d, 0x3e, 0x54, 0x20, 0x7f, 0x97, 0x7c, 0x1d, 0xb9, - 0x85, 0x02, 0x03, 0x3f, 0x04, 0x47, 0x42, 0x77, 0x4a, 0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0xa3, 0xfc, - 0xf4, 0x56, 0xa6, 0xef, 0xd9, 0x57, 0x33, 0x7d, 0xcf, 0xbf, 0x9a, 0xe9, 0x7b, 0xe1, 0xd5, 0x8c, - 0xf2, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x52, 0xf4, 0xf0, 0x33, 0xdb, 0x66, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 YetAnotherTestEnum) String() string { - s, ok := YetAnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x YetYetAnotherTestEnum) String() string { - s, ok := YetYetAnotherTestEnum_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 { - return this == nil - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 { - return this == nil - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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) - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) - } - } else { - return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) - } - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - return fmt.Errorf("XXX_InternalExtensions[%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 { - return this == nil - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range thatmap { - if _, ok := thismap[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) - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) - } - } else { - return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) - } - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - return fmt.Errorf("XXX_InternalExtensions[%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 { - return this == nil - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range thatmap { - if _, ok := thismap[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 { - return this == nil - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *Node) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Node") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Node but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Node but is not nil && this == nil") - } - if this.Label != nil && that1.Label != nil { - if *this.Label != *that1.Label { - return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) - } - } else if this.Label != nil { - return fmt.Errorf("this.Label == nil && that.Label != nil") - } else if that1.Label != nil { - return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) - } - if len(this.Children) != len(that1.Children) { - return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) - } - for i := range this.Children { - if !this.Children[i].Equal(that1.Children[i]) { - return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[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 *Node) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Label != nil && that1.Label != nil { - if *this.Label != *that1.Label { - return false - } - } else if this.Label != nil { - return false - } else if that1.Label != nil { - return false - } - if len(this.Children) != len(that1.Children) { - return false - } - for i := range this.Children { - if !this.Children[i].Equal(that1.Children[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NonByteCustomType) - if !ok { - that2, ok := that.(NonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") - } - if that1.Field1 == nil { - if this.Field1 != nil { - return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") - } - } else if !this.Field1.Equal(*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 *NonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NonByteCustomType) - if !ok { - that2, ok := that.(NonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Field1 == nil { - if this.Field1 != nil { - return false - } - } else if !this.Field1.Equal(*that1.Field1) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNonByteCustomType) - if !ok { - that2, ok := that.(NidOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNonByteCustomType 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NidOptNonByteCustomType) - if !ok { - that2, ok := that.(NidOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNonByteCustomType) - if !ok { - that2, ok := that.(NinOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") - } - if that1.Field1 == nil { - if this.Field1 != nil { - return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") - } - } else if !this.Field1.Equal(*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 *NinOptNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NinOptNonByteCustomType) - if !ok { - that2, ok := that.(NinOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Field1 == nil { - if this.Field1 != nil { - return false - } - } else if !this.Field1.Equal(*that1.Field1) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNonByteCustomType) - if !ok { - that2, ok := that.(NidRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNonByteCustomType 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].Equal(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 *NidRepNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NidRepNonByteCustomType) - if !ok { - that2, ok := that.(NidRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if !this.Field1[i].Equal(that1.Field1[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNonByteCustomType) - if !ok { - that2, ok := that.(NinRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNonByteCustomType 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].Equal(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 *NinRepNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NinRepNonByteCustomType) - if !ok { - that2, ok := that.(NinRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if !this.Field1[i].Equal(that1.Field1[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ProtoType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ProtoType) - if !ok { - that2, ok := that.(ProtoType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ProtoType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ProtoType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ProtoType 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ProtoType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProtoType) - if !ok { - that2, ok := that.(ProtoType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *NidOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidRepNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinRepNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() 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() proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() 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() proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() 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() proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() 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() proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() proto.Message { - return this -} - -func (this *CustomDash) TestProto() 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() proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() 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() proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() 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() proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() 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() proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() 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() proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() 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() proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() 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() proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() proto.Message { - return this -} - -func (this *Tree) TestProto() 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() proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() proto.Message { - return this -} - -func (this *OrBranch) TestProto() 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() proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() proto.Message { - return this -} - -func (this *AndBranch) TestProto() 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() proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() proto.Message { - return this -} - -func (this *Leaf) TestProto() 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() proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() proto.Message { - return this -} - -func (this *DeepTree) TestProto() 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() proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() 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() proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() 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() proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() 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() proto.Message -} - -func (this *Nil) Proto() proto.Message { - return this -} - -func (this *Nil) TestProto() proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() 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() proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { - return this.Field2 -} - -func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { - return this.Field3 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type NidRepEnumFace interface { - Proto() proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { - return this.Field2 -} - -func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { - return this.Field3 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type NinRepEnumFace interface { - Proto() proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { - return this.Field2 -} - -func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { - return this.Field3 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { - return this.Field2 -} - -func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { - return this.Field3 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TimerFace interface { - Proto() proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() proto.Message { - return this -} - -func (this *Timer) TestProto() 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() proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() 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() proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() 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() proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() 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() proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() proto.Message { - return this -} - -func (this *NestedScope) TestProto() 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() proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() proto.Message { - return this -} - -func (this *CustomContainer) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() 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() proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() 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() proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() proto.Message { - return this -} - -func (this *Unrecognized) TestProto() 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() proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() 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() proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() 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() proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() 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() proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() 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 -} - -type NodeFace interface { - Proto() proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() proto.Message { - return this -} - -func (this *Node) TestProto() proto.Message { - return NewNodeFromFace(this) -} - -func (this *Node) GetLabel() *string { - return this.Label -} - -func (this *Node) GetChildren() []*Node { - return this.Children -} - -func NewNodeFromFace(that NodeFace) *Node { - this := &Node{} - this.Label = that.GetLabel() - this.Children = that.GetChildren() - return this -} - -type NonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() *T -} - -func (this *NonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NonByteCustomType) TestProto() proto.Message { - return NewNonByteCustomTypeFromFace(this) -} - -func (this *NonByteCustomType) GetField1() *T { - return this.Field1 -} - -func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { - this := &NonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NidOptNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() T -} - -func (this *NidOptNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NidOptNonByteCustomType) TestProto() proto.Message { - return NewNidOptNonByteCustomTypeFromFace(this) -} - -func (this *NidOptNonByteCustomType) GetField1() T { - return this.Field1 -} - -func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { - this := &NidOptNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NinOptNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() *T -} - -func (this *NinOptNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NinOptNonByteCustomType) TestProto() proto.Message { - return NewNinOptNonByteCustomTypeFromFace(this) -} - -func (this *NinOptNonByteCustomType) GetField1() *T { - return this.Field1 -} - -func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { - this := &NinOptNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NidRepNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() []T -} - -func (this *NidRepNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NidRepNonByteCustomType) TestProto() proto.Message { - return NewNidRepNonByteCustomTypeFromFace(this) -} - -func (this *NidRepNonByteCustomType) GetField1() []T { - return this.Field1 -} - -func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { - this := &NidRepNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NinRepNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() []T -} - -func (this *NinRepNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NinRepNonByteCustomType) TestProto() proto.Message { - return NewNinRepNonByteCustomTypeFromFace(this) -} - -func (this *NinRepNonByteCustomType) GetField1() []T { - return this.Field1 -} - -func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { - this := &NinRepNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type ProtoTypeFace interface { - Proto() proto.Message - GetField2() *string -} - -func (this *ProtoType) Proto() proto.Message { - return this -} - -func (this *ProtoType) TestProto() proto.Message { - return NewProtoTypeFromFace(this) -} - -func (this *ProtoType) GetField2() *string { - return this.Field2 -} - -func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { - this := &ProtoType{} - this.Field2 = that.GetField2() - 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 { - vs := make([]*NidOptNative, len(this.Field3)) - for i := range vs { - vs[i] = &this.Field3[i] - } - s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") - } - if this.Field4 != nil { - vs := make([]*NinOptNative, len(this.Field4)) - for i := range vs { - vs[i] = &this.Field4[i] - } - s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\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 { - vs := make([]*NidOptNative, len(this.Field8)) - for i := range vs { - vs[i] = &this.Field8[i] - } - s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\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 { - vs := make([]*NidRepStruct, len(this.Field2)) - for i := range vs { - vs[i] = &this.Field2[i] - } - s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\n") - } - if this.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, 7) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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, 7) - s = append(s, "&test.NidRepEnum{") - 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 *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinRepEnum{") - 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 *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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, 7) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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, 7) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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") - } - s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") - if this.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") - } - s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") - if this.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, "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, "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, "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 (this *Node) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Node{") - if this.Label != nil { - s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") - } - if this.Children != nil { - s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NonByteCustomType{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptNonByteCustomType{") - 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 *NinOptNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptNonByteCustomType{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepNonByteCustomType{") - 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 *NinRepNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepNonByteCustomType{") - 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 *ProtoType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ProtoType{") - 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 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(m proto.Message) string { - e := proto.GetUnsafeExtensionsMap(m) - if e == nil { - return "nil" - } - s := "proto.NewUnsafeXXX_InternalExtensions(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) - i += 4 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) - i += 4 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) - i += 8 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) - i += 4 - } - if m.Field10 != nil { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) - i += 4 - } - if m.Field11 != nil { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) - i += 8 - } - if m.Field12 != nil { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*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++ - f1 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - dAtA[i] = 0x15 - i++ - f2 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - f5 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - dAtA[i] = 0x15 - i++ - f6 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f6)) - 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++ - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.Field10) > 0 { - for _, num := range m.Field10 { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.Field11) > 0 { - for _, num := range m.Field11 { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } - if len(m.Field12) > 0 { - for _, num := range m.Field12 { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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 { - f9 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) - 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 { - f10 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f10)) - i += 4 - } - } - 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 { - binary.LittleEndian.PutUint32(dAtA[i:], uint32(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 { - binary.LittleEndian.PutUint32(dAtA[i:], uint32(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 { - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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 { - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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 { - f25 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f25)) - 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 { - f26 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f26)) - i += 4 - } - } - 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 { - binary.LittleEndian.PutUint32(dAtA[i:], uint32(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 { - binary.LittleEndian.PutUint32(dAtA[i:], uint32(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 { - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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 { - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) - i += 4 - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) - i += 4 - } - 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(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f47)) - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - dAtA[i] = 0x15 - i++ - f48 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f48)) - 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++ - 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(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f50)) - i += 8 - } - } - if len(m.Field2) > 0 { - for _, num := range m.Field2 { - dAtA[i] = 0x15 - i++ - f51 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f51)) - 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++ - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) - i += 4 - } - 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.Field2 != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) - } - if m.Field3 != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) - } - 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 len(m.Field2) > 0 { - for _, num := range m.Field2 { - dAtA[i] = 0x10 - i++ - i = encodeVarintThetest(dAtA, i, uint64(num)) - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - dAtA[i] = 0x18 - 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 len(m.Field2) > 0 { - for _, num := range m.Field2 { - dAtA[i] = 0x10 - i++ - i = encodeVarintThetest(dAtA, i, uint64(num)) - } - } - if len(m.Field3) > 0 { - for _, num := range m.Field3 { - dAtA[i] = 0x18 - 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.Field2 != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) - } - if m.Field3 != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) - } - 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.Field2 != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) - } - if m.Field3 != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) - } - 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.Field2 != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field2)) - } - if m.Field3 != nil { - dAtA[i] = 0x18 - i++ - i = encodeVarintThetest(dAtA, i, uint64(*m.Field3)) - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Time1)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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)) - } - n, err := proto.EncodeInternalExtension(m, 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)) - } - n, err := proto.EncodeInternalExtension(m, 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.NestedField1)) - i += 8 - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) - i += 4 - } - if m.Field10 != nil { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) - i += 4 - } - if m.Field11 != nil { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) - i += 8 - } - if m.Field12 != nil { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*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())) - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.FieldA)))) - i += 8 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldI)) - i += 4 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.FieldJ)) - i += 4 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.FieldK)) - i += 8 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) - i += 8 - } - if m.FieldB != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldI)) - i += 4 - } - if m.FieldJ != nil { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.FieldJ)) - i += 4 - } - if m.FieldK != nil { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.FieldK)) - i += 8 - } - if m.FielL != nil { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*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++ - f92 := math.Float64bits(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f92)) - i += 8 - } - } - if len(m.FieldB) > 0 { - for _, num := range m.FieldB { - dAtA[i] = 0x15 - i++ - f93 := math.Float32bits(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f93)) - 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++ - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.FieldJ) > 0 { - for _, num := range m.FieldJ { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.FieldK) > 0 { - for _, num := range m.FieldK { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } - if len(m.FieldL) > 0 { - for _, num := range m.FieldL { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.FieldA)))) - i += 8 - } - if m.FieldB != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.FieldB)))) - i += 4 - } - 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 (m *Node) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Node) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Label != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintThetest(dAtA, i, uint64(len(*m.Label))) - i += copy(dAtA[i:], *m.Label) - } - if len(m.Children) > 0 { - for _, msg := range m.Children { - 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 *NonByteCustomType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NonByteCustomType) 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())) - n103, err := m.Field1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n103 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidOptNonByteCustomType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NidOptNonByteCustomType) 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())) - n104, err := m.Field1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n104 - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinOptNonByteCustomType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NinOptNonByteCustomType) 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())) - n105, err := m.Field1.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n105 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NidRepNonByteCustomType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NidRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, msg := range m.Field1 { - 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.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *NinRepNonByteCustomType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NinRepNonByteCustomType) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Field1) > 0 { - for _, msg := range m.Field1 { - 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.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *ProtoType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProtoType) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Field2 != nil { - dAtA[i] = 0xa - 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 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 = string(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 := string(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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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 = string(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 := string(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(10) - 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(10) - 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(5) - 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(5) - 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(10) - 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(10) - 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(5) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(10) - 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(10) - 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(10) - 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(5) - 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(5) - 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(10) - 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(10) - 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(5) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(10) - 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(5) - 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(5) - 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 := string(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 := string(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 = string(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 r.Intn(10) != 0 { - v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v153 - } - if r.Intn(10) != 0 { - v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v154 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v155 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v155) - for i := 0; i < v155; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v156 := r.Intn(10) - this.Field2 = make([]YetAnotherTestEnum, v156) - for i := 0; i < v156; i++ { - this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if r.Intn(10) != 0 { - v157 := r.Intn(10) - this.Field3 = make([]YetYetAnotherTestEnum, v157) - for i := 0; i < v157; i++ { - this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v158 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v158) - for i := 0; i < v158; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v159 := r.Intn(10) - this.Field2 = make([]YetAnotherTestEnum, v159) - for i := 0; i < v159; i++ { - this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if r.Intn(10) != 0 { - v160 := r.Intn(10) - this.Field3 = make([]YetYetAnotherTestEnum, v160) - for i := 0; i < v160; i++ { - this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v161 - } - if r.Intn(10) != 0 { - v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v162 - } - if r.Intn(10) != 0 { - v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v163 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v164 - } - if r.Intn(10) != 0 { - v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v165 - } - if r.Intn(10) != 0 { - v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v166 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v169 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - 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 - } - v170 := r.Intn(100) - this.Data = make([]byte, v170) - for i := 0; i < v170; 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 { - v171 := int64(r.Int63()) - if r.Intn(2) == 0 { - v171 *= -1 - } - this.Field1 = &v171 - } - 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) - 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 { - v172 := int64(r.Int63()) - if r.Intn(2) == 0 { - v172 *= -1 - } - this.Field2 = &v172 - } - if r.Intn(10) != 0 { - v173 := int64(r.Int63()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field13 = &v173 - } - 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) - 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 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field1 = &v174 - } - if r.Intn(10) != 0 { - v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v175 - } - 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 { - v176 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v176 - } - 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 { - v177 := string(randStringThetest(r)) - this.NestedNestedField1 = &v177 - } - 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 { - v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v178 - } - 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 { - v179 := float64(r.Float64()) - if r.Intn(2) == 0 { - v179 *= -1 - } - this.Field1 = &v179 - } - if r.Intn(10) != 0 { - v180 := float32(r.Float32()) - if r.Intn(2) == 0 { - v180 *= -1 - } - this.Field2 = &v180 - } - if r.Intn(10) != 0 { - v181 := int32(r.Int31()) - if r.Intn(2) == 0 { - v181 *= -1 - } - this.Field3 = &v181 - } - if r.Intn(10) != 0 { - v182 := int64(r.Int63()) - if r.Intn(2) == 0 { - v182 *= -1 - } - this.Field4 = &v182 - } - if r.Intn(10) != 0 { - v183 := uint32(r.Uint32()) - this.Field5 = &v183 - } - if r.Intn(10) != 0 { - v184 := uint64(uint64(r.Uint32())) - this.Field6 = &v184 - } - if r.Intn(10) != 0 { - v185 := int32(r.Int31()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.Field7 = &v185 - } - if r.Intn(10) != 0 { - v186 := int64(r.Int63()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.Field8 = &v186 - } - if r.Intn(10) != 0 { - v187 := uint32(r.Uint32()) - this.Field9 = &v187 - } - if r.Intn(10) != 0 { - v188 := int32(r.Int31()) - if r.Intn(2) == 0 { - v188 *= -1 - } - this.Field10 = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.Field11 = &v189 - } - if r.Intn(10) != 0 { - v190 := int64(r.Int63()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.Field12 = &v190 - } - if r.Intn(10) != 0 { - v191 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v191 - } - if r.Intn(10) != 0 { - v192 := string(randStringThetest(r)) - this.Field14 = &v192 - } - if r.Intn(10) != 0 { - v193 := r.Intn(100) - this.Field15 = make([]byte, v193) - for i := 0; i < v193; 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{} - v194 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v194 - 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 = string(randStringThetest(r)) - v195 := r.Intn(100) - this.FieldO = make([]byte, v195) - for i := 0; i < v195; 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 { - v196 := float64(r.Float64()) - if r.Intn(2) == 0 { - v196 *= -1 - } - this.FieldA = &v196 - } - if r.Intn(10) != 0 { - v197 := float32(r.Float32()) - if r.Intn(2) == 0 { - v197 *= -1 - } - this.FieldB = &v197 - } - if r.Intn(10) != 0 { - v198 := int32(r.Int31()) - if r.Intn(2) == 0 { - v198 *= -1 - } - this.FieldC = &v198 - } - if r.Intn(10) != 0 { - v199 := int64(r.Int63()) - if r.Intn(2) == 0 { - v199 *= -1 - } - this.FieldD = &v199 - } - if r.Intn(10) != 0 { - v200 := uint32(r.Uint32()) - this.FieldE = &v200 - } - if r.Intn(10) != 0 { - v201 := uint64(uint64(r.Uint32())) - this.FieldF = &v201 - } - if r.Intn(10) != 0 { - v202 := int32(r.Int31()) - if r.Intn(2) == 0 { - v202 *= -1 - } - this.FieldG = &v202 - } - if r.Intn(10) != 0 { - v203 := int64(r.Int63()) - if r.Intn(2) == 0 { - v203 *= -1 - } - this.FieldH = &v203 - } - if r.Intn(10) != 0 { - v204 := uint32(r.Uint32()) - this.FieldI = &v204 - } - if r.Intn(10) != 0 { - v205 := int32(r.Int31()) - if r.Intn(2) == 0 { - v205 *= -1 - } - this.FieldJ = &v205 - } - if r.Intn(10) != 0 { - v206 := uint64(uint64(r.Uint32())) - this.FieldK = &v206 - } - if r.Intn(10) != 0 { - v207 := int64(r.Int63()) - if r.Intn(2) == 0 { - v207 *= -1 - } - this.FielL = &v207 - } - if r.Intn(10) != 0 { - v208 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v208 - } - if r.Intn(10) != 0 { - v209 := string(randStringThetest(r)) - this.FieldN = &v209 - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldO = make([]byte, v210) - for i := 0; i < v210; 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 { - v211 := r.Intn(10) - this.FieldA = make([]float64, v211) - for i := 0; i < v211; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldB = make([]float32, v212) - for i := 0; i < v212; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(10) - this.FieldC = make([]int32, v213) - for i := 0; i < v213; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v214 := r.Intn(10) - this.FieldD = make([]int64, v214) - for i := 0; i < v214; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v215 := r.Intn(10) - this.FieldE = make([]uint32, v215) - for i := 0; i < v215; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v216 := r.Intn(10) - this.FieldF = make([]uint64, v216) - for i := 0; i < v216; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldG = make([]int32, v217) - for i := 0; i < v217; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v218 := r.Intn(10) - this.FieldH = make([]int64, v218) - for i := 0; i < v218; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v219 := r.Intn(10) - this.FieldI = make([]uint32, v219) - for i := 0; i < v219; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v220 := r.Intn(10) - this.FieldJ = make([]int32, v220) - for i := 0; i < v220; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v221 := r.Intn(10) - this.FieldK = make([]uint64, v221) - for i := 0; i < v221; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v222 := r.Intn(10) - this.FieldL = make([]int64, v222) - for i := 0; i < v222; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldM = make([]bool, v223) - for i := 0; i < v223; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v224 := r.Intn(10) - this.FieldN = make([]string, v224) - for i := 0; i < v224; i++ { - this.FieldN[i] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldO = make([][]byte, v225) - for i := 0; i < v225; i++ { - v226 := r.Intn(100) - this.FieldO[i] = make([]byte, v226) - for j := 0; j < v226; 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 { - v227 := float64(r.Float64()) - if r.Intn(2) == 0 { - v227 *= -1 - } - this.FieldA = &v227 - } - if r.Intn(10) != 0 { - v228 := float32(r.Float32()) - if r.Intn(2) == 0 { - v228 *= -1 - } - this.FieldB = &v228 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v229 := r.Intn(5) - this.FieldD = make([]*NinOptNative, v229) - for i := 0; i < v229; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v230 := uint64(uint64(r.Uint32())) - this.FieldE = &v230 - } - if r.Intn(10) != 0 { - v231 := int32(r.Int31()) - if r.Intn(2) == 0 { - v231 *= -1 - } - this.FieldF = &v231 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v232 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v232 - } - if r.Intn(10) != 0 { - v233 := string(randStringThetest(r)) - this.FieldI = &v233 - } - if r.Intn(10) != 0 { - v234 := r.Intn(100) - this.FieldJ = make([]byte, v234) - for i := 0; i < v234; 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 { - v235 := r.Intn(10) - this.FieldC = make([]Uuid, v235) - for i := 0; i < v235; i++ { - v236 := NewPopulatedUuid(r) - this.FieldC[i] = *v236 - } - } - if r.Intn(10) != 0 { - v237 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) - for i := 0; i < v237; i++ { - v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v238 - } - } - 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: - v239 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v239 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v240 - } - if r.Intn(10) != 0 { - v241 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v241) - for i := 0; i < v241; 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 { - v242 := int64(r.Int63()) - if r.Intn(2) == 0 { - v242 *= -1 - } - this.Field1 = &v242 - } - 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) - 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 { - v243 := string(randStringThetest(r)) - this.Field1 = &v243 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v244 := r.Intn(5) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) - for i := 0; i < v244; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v245 := string(randStringThetest(r)) - this.Field2 = &v245 - } - 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 { - v246 := uint32(r.Uint32()) - this.Field1 = &v246 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v247 - if r.Intn(10) != 0 { - v248 := string(randStringThetest(r)) - this.Field2 = &v248 - } - 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 { - v249 := uint32(r.Uint32()) - this.Field1 = &v249 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNode(r randyThetest, easy bool) *Node { - this := &Node{} - if r.Intn(10) != 0 { - v250 := string(randStringThetest(r)) - this.Label = &v250 - } - if r.Intn(10) == 0 { - v251 := r.Intn(5) - this.Children = make([]*Node, v251) - for i := 0; i < v251; i++ { - this.Children[i] = NewPopulatedNode(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { - this := &NonByteCustomType{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedT(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { - this := &NidOptNonByteCustomType{} - v252 := NewPopulatedT(r) - this.Field1 = *v252 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { - this := &NinOptNonByteCustomType{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedT(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { - this := &NidRepNonByteCustomType{} - if r.Intn(10) != 0 { - v253 := r.Intn(10) - this.Field1 = make([]T, v253) - for i := 0; i < v253; i++ { - v254 := NewPopulatedT(r) - this.Field1[i] = *v254 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { - this := &NinRepNonByteCustomType{} - if r.Intn(10) != 0 { - v255 := r.Intn(10) - this.Field1 = make([]T, v255) - for i := 0; i < v255; i++ { - v256 := NewPopulatedT(r) - this.Field1[i] = *v256 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { - this := &ProtoType{} - if r.Intn(10) != 0 { - v257 := string(randStringThetest(r)) - this.Field2 = &v257 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - 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 { - v258 := r.Intn(100) - tmps := make([]rune, v258) - for i := 0; i < v258; 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)) - v259 := r.Int63() - if r.Intn(2) == 0 { - v259 *= -1 - } - dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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 len(m.Field2) > 0 { - for _, e := range m.Field2 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - 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 len(m.Field2) > 0 { - for _, e := range m.Field2 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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)) - } - n += proto.SizeOfInternalExtension(m) - 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)) - } - n += proto.SizeOfInternalExtension(m) - 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 (m *Node) Size() (n int) { - var l int - _ = l - if m.Label != nil { - l = len(*m.Label) - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Children) > 0 { - for _, e := range m.Children { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NonByteCustomType) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptNonByteCustomType) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNonByteCustomType) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNonByteCustomType) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNonByteCustomType) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProtoType) Size() (n int) { - var l int - _ = 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 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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `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) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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_InternalExtensions:` + proto.StringFromInternalExtension(this) + `,`, - `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_InternalExtensions:` + proto.StringFromInternalExtension(this) + `,`, - `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 (this *Node) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Node{`, - `Label:` + valueToStringThetest(this.Label) + `,`, - `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NonByteCustomType{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNonByteCustomType{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNonByteCustomType{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNonByteCustomType{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNonByteCustomType{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ProtoType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ProtoType{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - 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 init() { proto.RegisterFile("combos/marshaler/thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 3086 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, - 0xd5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0x16, 0x8c, 0xbe, 0x15, 0xbd, - 0x91, 0xf5, 0x31, 0x44, 0x2c, 0x51, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0x46, 0x6e, - 0x44, 0x19, 0x8c, 0xdc, 0xd6, 0x40, 0x81, 0x82, 0x16, 0xd7, 0x22, 0x51, 0x69, 0x29, 0x90, 0xab, - 0x34, 0xee, 0xa1, 0x08, 0x72, 0x28, 0x82, 0x5e, 0x8b, 0x1e, 0xdb, 0xb8, 0x28, 0x0a, 0xa4, 0xb7, - 0x1c, 0x8a, 0xa2, 0x28, 0x8a, 0xc6, 0x97, 0x02, 0xea, 0xcd, 0xe8, 0xa9, 0x08, 0x0a, 0x21, 0x62, - 0x2e, 0x39, 0x06, 0xbd, 0x34, 0x87, 0x1c, 0x8a, 0xdd, 0x9d, 0x9d, 0x9d, 0x19, 0xee, 0x72, 0x97, - 0x96, 0xd2, 0xe6, 0x62, 0x8b, 0xf3, 0xde, 0x9b, 0x79, 0xfb, 0x7e, 0xbf, 0xf7, 0xf6, 0xed, 0xcc, - 0x80, 0xba, 0xd7, 0x39, 0xbc, 0xdf, 0xe9, 0x2d, 0x1f, 0x36, 0xba, 0xbd, 0x56, 0xe3, 0x40, 0xef, - 0x2e, 0x9b, 0x2d, 0xdd, 0xd4, 0x7b, 0xe6, 0xd2, 0x51, 0xb7, 0x63, 0x76, 0xe4, 0xb8, 0xf5, 0x77, - 0xea, 0xfa, 0x7e, 0xdb, 0x6c, 0x1d, 0xdf, 0x5f, 0xda, 0xeb, 0x1c, 0x2e, 0xef, 0x77, 0xf6, 0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 0x4c, 0xf0, 0xf2, 0x82, 0x27, 0x5f, 0x53, 0x66, 0xd2, 0x28, - 0x33, 0xc5, 0xcb, 0xd7, 0xb4, 0x77, 0x6d, 0x78, 0x0d, 0x0f, 0xde, 0x59, 0x1e, 0x5e, 0x0a, 0xec, - 0x2c, 0x0f, 0x2c, 0x85, 0x74, 0x96, 0x87, 0x94, 0x82, 0x39, 0xcb, 0x83, 0x49, 0x61, 0x9c, 0xe5, - 0x61, 0xa4, 0x00, 0xce, 0xf2, 0x00, 0x52, 0xe8, 0x66, 0x79, 0xe8, 0x28, 0x68, 0xb3, 0x3c, 0x68, - 0x14, 0xae, 0x59, 0x1e, 0x2e, 0x0a, 0x94, 0x22, 0x00, 0xe5, 0x41, 0xa4, 0x08, 0x10, 0x79, 0xe0, - 0x28, 0x02, 0x38, 0x1e, 0x2c, 0x8a, 0x00, 0x8b, 0x07, 0x88, 0x22, 0x00, 0xe2, 0x41, 0xa1, 0x08, - 0x50, 0x78, 0x20, 0x90, 0x1c, 0xab, 0xeb, 0x47, 0x3e, 0x39, 0x86, 0x87, 0xe6, 0x18, 0x1e, 0x9a, - 0x63, 0x78, 0x68, 0x8e, 0xe1, 0xa1, 0x39, 0x86, 0x87, 0xe6, 0x18, 0x1e, 0x9a, 0x63, 0x78, 0x68, - 0x8e, 0xe1, 0xa1, 0x39, 0x86, 0x87, 0xe7, 0x18, 0x0e, 0xc9, 0x31, 0x1c, 0x92, 0x63, 0x38, 0x24, - 0xc7, 0x70, 0x48, 0x8e, 0xe1, 0x90, 0x1c, 0xc3, 0x81, 0x39, 0xe6, 0xc1, 0x3b, 0xcb, 0xc3, 0xeb, - 0x9b, 0x63, 0x38, 0x20, 0xc7, 0x70, 0x40, 0x8e, 0xe1, 0x80, 0x1c, 0xc3, 0x01, 0x39, 0x86, 0x03, - 0x72, 0x0c, 0x07, 0xe4, 0x18, 0x0e, 0xc8, 0x31, 0x1c, 0x94, 0x63, 0x38, 0x30, 0xc7, 0x70, 0x60, - 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xc1, 0x20, 0x5a, 0x7f, 0x6b, - 0x63, 0x80, 0x6b, 0xed, 0x03, 0xed, 0x55, 0x00, 0x27, 0xe5, 0xab, 0xc6, 0xf1, 0xa1, 0x90, 0x75, - 0xd3, 0x6e, 0x80, 0x77, 0x5b, 0xfa, 0xae, 0xde, 0xb3, 0x55, 0xf8, 0x7e, 0xca, 0x2a, 0x30, 0xe0, - 0xa4, 0x98, 0x6d, 0xff, 0x52, 0xa8, 0xbd, 0x6f, 0x27, 0x66, 0xa9, 0x2a, 0x8e, 0xea, 0x3d, 0xdd, - 0xdc, 0x34, 0x3a, 0x66, 0x4b, 0xef, 0x0a, 0x16, 0x79, 0x79, 0x95, 0x4b, 0xd8, 0xe9, 0xfc, 0x0b, - 0xd4, 0x22, 0xd0, 0x68, 0x55, 0xfb, 0xd0, 0x76, 0xd0, 0x6a, 0x05, 0x06, 0x1e, 0x10, 0x47, 0x78, - 0x40, 0x79, 0x9d, 0xeb, 0xdf, 0x86, 0xb8, 0x29, 0x7c, 0x5a, 0xde, 0xe4, 0xbe, 0x73, 0x86, 0x3b, - 0xcb, 0x7f, 0x63, 0xba, 0x31, 0x75, 0x5d, 0x7e, 0x29, 0xd4, 0xe5, 0x80, 0xee, 0x76, 0xd4, 0x98, - 0xe2, 0xa8, 0x31, 0xfd, 0x13, 0xed, 0x38, 0xac, 0xe1, 0x8a, 0xfe, 0xa0, 0x71, 0x7c, 0x60, 0xca, - 0x2f, 0x87, 0x62, 0x5f, 0x44, 0x65, 0xea, 0x6a, 0x21, 0x2a, 0xfc, 0x45, 0xa9, 0x54, 0xa2, 0xee, - 0xde, 0x18, 0x81, 0x02, 0x45, 0xa9, 0x5c, 0xa6, 0x65, 0x3b, 0xf1, 0xde, 0xa3, 0x79, 0xf4, 0xc1, - 0xa3, 0xf9, 0x98, 0xf6, 0x3b, 0x04, 0x97, 0x89, 0x26, 0x43, 0xdc, 0xeb, 0x82, 0xf3, 0x57, 0xdc, - 0x9a, 0xe1, 0x17, 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15, 0xa4, - 0x05, 0xf1, 0xe8, 0x33, 0x9c, 0x42, 0x38, 0x12, 0x85, 0x70, 0x10, 0x85, 0x3e, 0xc2, 0xf0, 0x2c, - 0x47, 0x21, 0x72, 0x3e, 0x74, 0x51, 0x15, 0x68, 0x3d, 0xc2, 0x05, 0x0b, 0x3f, 0x4e, 0xad, 0x47, - 0x38, 0xa4, 0x1e, 0xc6, 0xb3, 0xc1, 0x2a, 0x54, 0x8d, 0x50, 0x85, 0x6e, 0x51, 0x0e, 0xad, 0x47, - 0xb8, 0x78, 0x31, 0xc8, 0xbd, 0x8d, 0x61, 0x45, 0xe0, 0xf5, 0x48, 0x45, 0x60, 0x2b, 0x52, 0x11, - 0xb8, 0xed, 0x21, 0xf8, 0x53, 0x09, 0x9e, 0xf3, 0x10, 0x74, 0xfe, 0xda, 0x7d, 0x78, 0x64, 0x95, - 0x00, 0xef, 0x88, 0x4a, 0x76, 0x8f, 0x6d, 0x18, 0x18, 0xa5, 0xad, 0xa6, 0x7c, 0x87, 0x3f, 0xac, - 0x2a, 0x8e, 0x7a, 0x80, 0xc3, 0x20, 0x4e, 0x36, 0x43, 0x17, 0x00, 0x6f, 0x35, 0x7b, 0x76, 0xb5, - 0xf0, 0x5b, 0xb6, 0x5c, 0xb7, 0xc4, 0x72, 0x1d, 0xc6, 0x6d, 0xf5, 0x9e, 0x0d, 0xef, 0x79, 0x16, - 0xae, 0xd4, 0xc9, 0x4c, 0xda, 0x63, 0x04, 0x69, 0x8e, 0xca, 0x17, 0x73, 0x64, 0xf0, 0x4a, 0xa4, - 0x23, 0x03, 0x2e, 0x41, 0xbc, 0xe3, 0x83, 0xff, 0x1f, 0x3c, 0xa9, 0x66, 0xb3, 0x44, 0x3c, 0x4a, - 0xf8, 0x09, 0x4c, 0x7b, 0x4f, 0x60, 0x7f, 0xb3, 0xad, 0x85, 0xef, 0x66, 0xfa, 0xa5, 0xe6, 0x9a, - 0xb0, 0x8b, 0x36, 0xd4, 0x8c, 0x66, 0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 0x57, 0x57, 0x0f, 0x39, 0xb1, 0x2e, 0x15, 0xcb, 0xc4, 0xbe, 0xec, 0x6b, 0xff, 0x40, - 0x38, 0x56, 0xe5, 0xdf, 0x10, 0x64, 0x92, 0x32, 0x75, 0xb8, 0xe2, 0x3b, 0x49, 0x8b, 0xb9, 0xec, - 0x5e, 0xa1, 0x0e, 0x57, 0x7d, 0x75, 0xdb, 0x21, 0x97, 0xbe, 0xaa, 0xc5, 0x65, 0xf2, 0x92, 0xdf, - 0x5c, 0x91, 0xaf, 0xb8, 0x39, 0xca, 0x55, 0x60, 0x12, 0x20, 0x57, 0xab, 0x58, 0x26, 0x06, 0xa5, - 0x40, 0x83, 0xe0, 0x28, 0xb9, 0x96, 0xc5, 0xd7, 0xc9, 0x24, 0xe5, 0xc0, 0x49, 0x42, 0x42, 0xe5, - 0x9a, 0x97, 0x76, 0x4f, 0xce, 0xd4, 0xd8, 0x93, 0x33, 0x35, 0xf6, 0x8f, 0x33, 0x35, 0xf6, 0xc9, - 0x99, 0x8a, 0x3e, 0x3b, 0x53, 0xd1, 0xe7, 0x67, 0x2a, 0xfa, 0xe2, 0x4c, 0x45, 0xef, 0xf4, 0x55, - 0xf4, 0x41, 0x5f, 0x45, 0x1f, 0xf6, 0x55, 0xf4, 0xc7, 0xbe, 0x8a, 0x1e, 0xf7, 0x55, 0x74, 0xd2, - 0x57, 0xd1, 0x93, 0xbe, 0x1a, 0xfb, 0xa4, 0xaf, 0xa2, 0xcf, 0xfa, 0x6a, 0xec, 0xf3, 0xbe, 0x8a, - 0xbe, 0xe8, 0xab, 0xb1, 0x77, 0x3e, 0x55, 0x63, 0x8f, 0x3e, 0x55, 0x63, 0x1f, 0x7c, 0xaa, 0xa2, - 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x3d, 0xd8, 0x02, 0x18, 0x4c, 0x36, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto deleted file mode 100644 index ce6cc599e..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetest.proto +++ /dev/null @@ -1,649 +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 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.protosizer_all) = false; - -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; - -option (gogoproto.compare_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; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -enum YetAnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - AA = 0; - BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; -} - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -enum YetYetAnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = true; - CC = 0; - DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; - optional YetAnotherTestEnum Field2 = 2; - optional YetYetAnotherTestEnum Field3 = 3; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; - repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; - repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; - repeated YetAnotherTestEnum Field2 = 2; - repeated YetYetAnotherTestEnum Field3 = 3; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; - optional YetAnotherTestEnum Field2 = 2 [default=BB]; - optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; - optional YetAnotherTestEnum Field2 = 2; - optional YetYetAnotherTestEnum Field3 = 3; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; - optional YetAnotherTestEnum Field2 = 2 [default=BB]; - optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; -} - - -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; - repeated int64 FieldD = 104; - repeated NinOptNative FieldE = 105; -} - -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; -} - -message Node { - optional string Label = 1; - repeated Node Children = 2; -} - -message NonByteCustomType { - optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; -} - -message NidOptNonByteCustomType { - optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; -} - -message NinOptNonByteCustomType { - optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; -} - -message NidRepNonByteCustomType { - repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; -} - -message NinRepNonByteCustomType { - repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; -} - -message ProtoType { - optional string Field2 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go deleted file mode 100644 index 60ffaa87f..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/thetestpb_test.go +++ /dev/null @@ -1,17949 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/thetest.proto - -/* -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 - Node - NonByteCustomType - NidOptNonByteCustomType - NinOptNonByteCustomType - NidRepNonByteCustomType - NinRepNonByteCustomType - ProtoType -*/ -package test - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepPackedNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomDashMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepCustomMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinNestedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOrBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepTreeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestADeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAndDeepBranchMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDeepLeafMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNilMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAnotherNinOptEnumDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTimerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyExtendableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOtherExtenableMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinitionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedDefinition_NestedMessage_NestedNestedMsgMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedScopeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNativeDefaultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomContainerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNidOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinOptNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinRepNativeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinStructMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameNinEmbeddedStructUnionMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomNameEnumMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNoExtensionsMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithInner_InnerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUnrecognizedWithEmbed_EmbeddedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNodeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNode(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Node{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepNonByteCustomTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProtoTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkProtoTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomDashCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomDash(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOrBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOrBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestADeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedADeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndDeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndDeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNilCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNil(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTimerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTimer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestMyExtendableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedMyExtendable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOtherExtenableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOtherExtenable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinitionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessageCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedScopeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedScope(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomContainerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomContainer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNoExtensionsMapCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNoExtensionsMap(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognized(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNodeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNode(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestProtoTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNilGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestProtoTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNodeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestProtoTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/combos/marshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go deleted file mode 100644 index ae349da4a..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/marshaler/uuid.go +++ /dev/null @@ -1,133 +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 test - -import ( - "bytes" - "encoding/hex" - "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) { - s := hex.EncodeToString([]byte(uuid)) - return json.Marshal(s) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - d, err := hex.DecodeString(s) - if err != nil { - return err - } - *uuid = Uuid(d) - return nil -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -func (uuid Uuid) Compare(other Uuid) int { - return bytes.Compare(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/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go deleted file mode 100644 index 53f720e96..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/bug_test.go +++ /dev/null @@ -1,252 +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 test - -import ( - "fmt" - "math" - "math/rand" - "testing" - "time" - - "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") -} - -func TestRepeatedExtensionsMsgsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - nins := make([]*NinOptNative, rep) - for i := range nins { - nins[i] = NewPopulatedNinOptNative(r, true) - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldE, nins); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} - -func TestRepeatedExtensionsFieldsIssue161(t *testing.T) { - r := rand.New(rand.NewSource(time.Now().UnixNano())) - rep := 10 - ints := make([]int64, rep) - for i := range ints { - ints[i] = r.Int63() - } - input := &MyExtendable{} - if err := proto.SetExtension(input, E_FieldD, ints); err != nil { - t.Fatal(err) - } - data, err := proto.Marshal(input) - if err != nil { - t.Fatal(err) - } - output := &MyExtendable{} - if err := proto.Unmarshal(data, output); err != nil { - t.Fatal(err) - } - if !input.Equal(output) { - t.Fatal("expected equal") - } - data2, err2 := proto.Marshal(output) - if err2 != nil { - t.Fatal(err2) - } - if len(data) != len(data2) { - t.Fatal("expected equal length buffers") - } -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go deleted file mode 100644 index c7c292e82..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/t.go +++ /dev/null @@ -1,73 +0,0 @@ -package test - -import ( - "encoding/json" - "strings" - - "github.com/gogo/protobuf/proto" -) - -type T struct { - Data string -} - -func (gt *T) protoType() *ProtoType { - return &ProtoType{ - Field2: >.Data, - } -} - -func (gt T) Equal(other T) bool { - return gt.protoType().Equal(other.protoType()) -} - -func (gt *T) Size() int { - proto := &ProtoType{ - Field2: >.Data, - } - return proto.Size() -} - -func NewPopulatedT(r randyThetest) *T { - data := NewPopulatedProtoType(r, false).Field2 - gt := &T{} - if data != nil { - gt.Data = *data - } - return gt -} - -func (r T) Marshal() ([]byte, error) { - return proto.Marshal(r.protoType()) -} - -func (r *T) Unmarshal(data []byte) error { - pr := &ProtoType{} - err := proto.Unmarshal(data, pr) - if err != nil { - return err - } - - if pr.Field2 != nil { - r.Data = *pr.Field2 - } - return nil -} - -func (gt T) MarshalJSON() ([]byte, error) { - return json.Marshal(gt.Data) -} - -func (gt *T) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - *gt = T{Data: s} - return nil -} - -func (gt T) Compare(other T) int { - return strings.Compare(gt.Data, other.Data) -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go deleted file mode 100644 index ac5b2d8a1..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.pb.go +++ /dev/null @@ -1,39266 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/thetest.proto - -/* - 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 - Node - NonByteCustomType - NidOptNonByteCustomType - NinOptNonByteCustomType - NidRepNonByteCustomType - NinRepNonByteCustomType - ProtoType -*/ -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 bytes "bytes" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import sort "sort" -import reflect "reflect" - -import io "io" -import binary "encoding/binary" - -// 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 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 -} -func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } - -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 -} -func (AnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -type YetAnotherTestEnum int32 - -const ( - AA YetAnotherTestEnum = 0 - BetterYetBB YetAnotherTestEnum = 1 -) - -var YetAnotherTestEnum_name = map[int32]string{ - 0: "AA", - 1: "BB", -} -var YetAnotherTestEnum_value = map[string]int32{ - "AA": 0, - "BB": 1, -} - -func (x YetAnotherTestEnum) Enum() *YetAnotherTestEnum { - p := new(YetAnotherTestEnum) - *p = x - return p -} -func (x YetAnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(YetAnotherTestEnum_name, int32(x)) -} -func (x *YetAnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(YetAnotherTestEnum_value, data, "YetAnotherTestEnum") - if err != nil { - return err - } - *x = YetAnotherTestEnum(value) - return nil -} -func (YetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -type YetYetAnotherTestEnum int32 - -const ( - YetYetAnotherTestEnum_CC YetYetAnotherTestEnum = 0 - YetYetAnotherTestEnum_BetterYetDD YetYetAnotherTestEnum = 1 -) - -var YetYetAnotherTestEnum_name = map[int32]string{ - 0: "CC", - 1: "DD", -} -var YetYetAnotherTestEnum_value = map[string]int32{ - "CC": 0, - "DD": 1, -} - -func (x YetYetAnotherTestEnum) Enum() *YetYetAnotherTestEnum { - p := new(YetYetAnotherTestEnum) - *p = x - return p -} -func (x YetYetAnotherTestEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(YetYetAnotherTestEnum_name, int32(x)) -} -func (x *YetYetAnotherTestEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(YetYetAnotherTestEnum_value, data, "YetYetAnotherTestEnum") - if err != nil { - return err - } - *x = YetYetAnotherTestEnum(value) - return nil -} -func (YetYetAnotherTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } - -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 -} -func (NestedDefinition_NestedEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{42, 0} -} - -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() {} -func (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{0} } - -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() {} -func (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{1} } - -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() {} -func (*NidRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{2} } - -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() {} -func (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{3} } - -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() {} -func (*NidRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{4} } - -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() {} -func (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{5} } - -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() {} -func (*NidOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{6} } - -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() {} -func (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{7} } - -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() {} -func (*NidRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{8} } - -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() {} -func (*NinRepStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{9} } - -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() {} -func (*NidEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{10} } - -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() {} -func (*NinEmbeddedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{11} } - -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() {} -func (*NidNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{12} } - -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() {} -func (*NinNestedStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{13} } - -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() {} -func (*NidOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{14} } - -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() {} -func (*CustomDash) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{15} } - -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() {} -func (*NinOptCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{16} } - -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() {} -func (*NidRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{17} } - -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() {} -func (*NinRepCustom) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{18} } - -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() {} -func (*NinOptNativeUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{19} } - -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() {} -func (*NinOptStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{20} } - -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() {} -func (*NinEmbeddedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{21} } - -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() {} -func (*NinNestedStructUnion) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{22} } - -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() {} -func (*Tree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{23} } - -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() {} -func (*OrBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{24} } - -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() {} -func (*AndBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{25} } - -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() {} -func (*Leaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{26} } - -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() {} -func (*DeepTree) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{27} } - -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() {} -func (*ADeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{28} } - -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() {} -func (*AndDeepBranch) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{29} } - -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() {} -func (*DeepLeaf) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{30} } - -type Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (*Nil) ProtoMessage() {} -func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{31} } - -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() {} -func (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{32} } - -type NinOptEnum struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnum) Reset() { *m = NinOptEnum{} } -func (*NinOptEnum) ProtoMessage() {} -func (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{33} } - -type NidRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepEnum) Reset() { *m = NidRepEnum{} } -func (*NidRepEnum) ProtoMessage() {} -func (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{34} } - -type NinRepEnum struct { - Field1 []TheTestEnum `protobuf:"varint,1,rep,name=Field1,enum=test.TheTestEnum" json:"Field1,omitempty"` - Field2 []YetAnotherTestEnum `protobuf:"varint,2,rep,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 []YetYetAnotherTestEnum `protobuf:"varint,3,rep,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepEnum) Reset() { *m = NinRepEnum{} } -func (*NinRepEnum) ProtoMessage() {} -func (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{35} } - -type NinOptEnumDefault struct { - Field1 *TheTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.TheTestEnum,def=2" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptEnumDefault) Reset() { *m = NinOptEnumDefault{} } -func (*NinOptEnumDefault) ProtoMessage() {} -func (*NinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{36} } - -const Default_NinOptEnumDefault_Field1 TheTestEnum = C -const Default_NinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB -const Default_NinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC - -func (m *NinOptEnumDefault) GetField1() TheTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_NinOptEnumDefault_Field1 -} - -func (m *NinOptEnumDefault) GetField2() YetAnotherTestEnum { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_NinOptEnumDefault_Field2 -} - -func (m *NinOptEnumDefault) GetField3() YetYetAnotherTestEnum { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_NinOptEnumDefault_Field3 -} - -type AnotherNinOptEnum struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnum) Reset() { *m = AnotherNinOptEnum{} } -func (*AnotherNinOptEnum) ProtoMessage() {} -func (*AnotherNinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{37} } - -type AnotherNinOptEnumDefault struct { - Field1 *AnotherTestEnum `protobuf:"varint,1,opt,name=Field1,enum=test.AnotherTestEnum,def=11" json:"Field1,omitempty"` - Field2 *YetAnotherTestEnum `protobuf:"varint,2,opt,name=Field2,enum=test.YetAnotherTestEnum,def=1" json:"Field2,omitempty"` - Field3 *YetYetAnotherTestEnum `protobuf:"varint,3,opt,name=Field3,enum=test.YetYetAnotherTestEnum,def=0" json:"Field3,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *AnotherNinOptEnumDefault) Reset() { *m = AnotherNinOptEnumDefault{} } -func (*AnotherNinOptEnumDefault) ProtoMessage() {} -func (*AnotherNinOptEnumDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{38} } - -const Default_AnotherNinOptEnumDefault_Field1 AnotherTestEnum = E -const Default_AnotherNinOptEnumDefault_Field2 YetAnotherTestEnum = BetterYetBB -const Default_AnotherNinOptEnumDefault_Field3 YetYetAnotherTestEnum = YetYetAnotherTestEnum_CC - -func (m *AnotherNinOptEnumDefault) GetField1() AnotherTestEnum { - if m != nil && m.Field1 != nil { - return *m.Field1 - } - return Default_AnotherNinOptEnumDefault_Field1 -} - -func (m *AnotherNinOptEnumDefault) GetField2() YetAnotherTestEnum { - if m != nil && m.Field2 != nil { - return *m.Field2 - } - return Default_AnotherNinOptEnumDefault_Field2 -} - -func (m *AnotherNinOptEnumDefault) GetField3() YetYetAnotherTestEnum { - if m != nil && m.Field3 != nil { - return *m.Field3 - } - return Default_AnotherNinOptEnumDefault_Field3 -} - -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() {} -func (*Timer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{39} } - -type MyExtendable struct { - Field1 *int64 `protobuf:"varint,1,opt,name=Field1" json:"Field1,omitempty"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *MyExtendable) Reset() { *m = MyExtendable{} } -func (*MyExtendable) ProtoMessage() {} -func (*MyExtendable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{40} } - -var extRange_MyExtendable = []proto.ExtensionRange{ - {Start: 100, End: 199}, -} - -func (*MyExtendable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_MyExtendable -} - -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"` - proto.XXX_InternalExtensions `json:"-"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OtherExtenable) Reset() { *m = OtherExtenable{} } -func (*OtherExtenable) ProtoMessage() {} -func (*OtherExtenable) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{41} } - -var extRange_OtherExtenable = []proto.ExtensionRange{ - {Start: 14, End: 16}, - {Start: 10, End: 12}, -} - -func (*OtherExtenable) ExtensionRangeArray() []proto.ExtensionRange { - return extRange_OtherExtenable -} - -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() {} -func (*NestedDefinition) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{42} } - -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() {} -func (*NestedDefinition_NestedMessage) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{42, 0} -} - -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() {} -func (*NestedDefinition_NestedMessage_NestedNestedMsg) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{42, 0, 0} -} - -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() {} -func (*NestedScope) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{43} } - -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.12341" 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() {} -func (*NinOptNativeDefault) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{44} } - -const Default_NinOptNativeDefault_Field1 float64 = 1234.1234 -const Default_NinOptNativeDefault_Field2 float32 = 1234.12341 -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() {} -func (*CustomContainer) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{45} } - -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() {} -func (*CustomNameNidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{46} } - -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() {} -func (*CustomNameNinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{47} } - -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() {} -func (*CustomNameNinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{48} } - -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() {} -func (*CustomNameNinStruct) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{49} } - -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() {} -func (*CustomNameCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{50} } - -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() {} -func (*CustomNameNinEmbeddedStructUnion) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{51} -} - -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() {} -func (*CustomNameEnum) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{52} } - -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() {} -func (*NoExtensionsMap) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{53} } - -var extRange_NoExtensionsMap = []proto.ExtensionRange{ - {Start: 100, End: 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() {} -func (*Unrecognized) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{54} } - -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() {} -func (*UnrecognizedWithInner) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{55} } - -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() {} -func (*UnrecognizedWithInner_Inner) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{55, 0} -} - -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() {} -func (*UnrecognizedWithEmbed) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{56} } - -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() {} -func (*UnrecognizedWithEmbed_Embedded) Descriptor() ([]byte, []int) { - return fileDescriptorThetest, []int{56, 0} -} - -type Node struct { - Label *string `protobuf:"bytes,1,opt,name=Label" json:"Label,omitempty"` - Children []*Node `protobuf:"bytes,2,rep,name=Children" json:"Children,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Node) Reset() { *m = Node{} } -func (*Node) ProtoMessage() {} -func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{57} } - -type NonByteCustomType struct { - Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NonByteCustomType) Reset() { *m = NonByteCustomType{} } -func (*NonByteCustomType) ProtoMessage() {} -func (*NonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{58} } - -type NidOptNonByteCustomType struct { - Field1 T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidOptNonByteCustomType) Reset() { *m = NidOptNonByteCustomType{} } -func (*NidOptNonByteCustomType) ProtoMessage() {} -func (*NidOptNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{59} } - -type NinOptNonByteCustomType struct { - Field1 *T `protobuf:"bytes,1,opt,name=Field1,customtype=T" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinOptNonByteCustomType) Reset() { *m = NinOptNonByteCustomType{} } -func (*NinOptNonByteCustomType) ProtoMessage() {} -func (*NinOptNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{60} } - -type NidRepNonByteCustomType struct { - Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NidRepNonByteCustomType) Reset() { *m = NidRepNonByteCustomType{} } -func (*NidRepNonByteCustomType) ProtoMessage() {} -func (*NidRepNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{61} } - -type NinRepNonByteCustomType struct { - Field1 []T `protobuf:"bytes,1,rep,name=Field1,customtype=T" json:"Field1,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *NinRepNonByteCustomType) Reset() { *m = NinRepNonByteCustomType{} } -func (*NinRepNonByteCustomType) ProtoMessage() {} -func (*NinRepNonByteCustomType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{62} } - -type ProtoType struct { - Field2 *string `protobuf:"bytes,1,opt,name=Field2" json:"Field2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *ProtoType) Reset() { *m = ProtoType{} } -func (*ProtoType) ProtoMessage() {} -func (*ProtoType) Descriptor() ([]byte, []int) { return fileDescriptorThetest, []int{63} } - -var E_FieldA = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA", - Tag: "fixed64,100,opt,name=FieldA", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldB = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB", - Tag: "bytes,101,opt,name=FieldB", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldC = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC", - Tag: "bytes,102,opt,name=FieldC", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldD = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]int64)(nil), - Field: 104, - Name: "test.FieldD", - Tag: "varint,104,rep,name=FieldD", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldE = &proto.ExtensionDesc{ - ExtendedType: (*MyExtendable)(nil), - ExtensionType: ([]*NinOptNative)(nil), - Field: 105, - Name: "test.FieldE", - Tag: "bytes,105,rep,name=FieldE", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldA1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*float64)(nil), - Field: 100, - Name: "test.FieldA1", - Tag: "fixed64,100,opt,name=FieldA1", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldB1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinOptNative)(nil), - Field: 101, - Name: "test.FieldB1", - Tag: "bytes,101,opt,name=FieldB1", - Filename: "combos/unmarshaler/thetest.proto", -} - -var E_FieldC1 = &proto.ExtensionDesc{ - ExtendedType: (*NoExtensionsMap)(nil), - ExtensionType: (*NinEmbeddedStruct)(nil), - Field: 102, - Name: "test.FieldC1", - Tag: "bytes,102,opt,name=FieldC1", - Filename: "combos/unmarshaler/thetest.proto", -} - -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.RegisterType((*Node)(nil), "test.Node") - proto.RegisterType((*NonByteCustomType)(nil), "test.NonByteCustomType") - proto.RegisterType((*NidOptNonByteCustomType)(nil), "test.NidOptNonByteCustomType") - proto.RegisterType((*NinOptNonByteCustomType)(nil), "test.NinOptNonByteCustomType") - proto.RegisterType((*NidRepNonByteCustomType)(nil), "test.NidRepNonByteCustomType") - proto.RegisterType((*NinRepNonByteCustomType)(nil), "test.NinRepNonByteCustomType") - proto.RegisterType((*ProtoType)(nil), "test.ProtoType") - proto.RegisterEnum("test.TheTestEnum", TheTestEnum_name, TheTestEnum_value) - proto.RegisterEnum("test.AnotherTestEnum", AnotherTestEnum_name, AnotherTestEnum_value) - proto.RegisterEnum("test.YetAnotherTestEnum", YetAnotherTestEnum_name, YetAnotherTestEnum_value) - proto.RegisterEnum("test.YetYetAnotherTestEnum", YetYetAnotherTestEnum_name, YetYetAnotherTestEnum_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_FieldD) - proto.RegisterExtension(E_FieldE) - proto.RegisterExtension(E_FieldA1) - proto.RegisterExtension(E_FieldB1) - proto.RegisterExtension(E_FieldC1) -} -func (this *NidOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != that1.Field1 { - if this.Field1 < that1.Field1 { - return -1 - } - return 1 - } - if this.Field2 != that1.Field2 { - if this.Field2 < that1.Field2 { - return -1 - } - return 1 - } - if this.Field3 != that1.Field3 { - if this.Field3 < that1.Field3 { - return -1 - } - return 1 - } - if this.Field4 != that1.Field4 { - if this.Field4 < that1.Field4 { - return -1 - } - return 1 - } - if this.Field5 != that1.Field5 { - if this.Field5 < that1.Field5 { - return -1 - } - return 1 - } - if this.Field6 != that1.Field6 { - if this.Field6 < that1.Field6 { - return -1 - } - return 1 - } - if this.Field7 != that1.Field7 { - if this.Field7 < that1.Field7 { - return -1 - } - return 1 - } - if this.Field8 != that1.Field8 { - if this.Field8 < that1.Field8 { - return -1 - } - return 1 - } - if this.Field9 != that1.Field9 { - if this.Field9 < that1.Field9 { - return -1 - } - return 1 - } - if this.Field10 != that1.Field10 { - if this.Field10 < that1.Field10 { - return -1 - } - return 1 - } - if this.Field11 != that1.Field11 { - if this.Field11 < that1.Field11 { - return -1 - } - return 1 - } - if this.Field12 != that1.Field12 { - if this.Field12 < that1.Field12 { - return -1 - } - return 1 - } - if this.Field13 != that1.Field13 { - if !this.Field13 { - return -1 - } - return 1 - } - if this.Field14 != that1.Field14 { - if this.Field14 < that1.Field14 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - if *this.Field4 < *that1.Field4 { - return -1 - } - return 1 - } - } else if this.Field4 != nil { - return 1 - } else if that1.Field4 != nil { - return -1 - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - if *this.Field5 < *that1.Field5 { - return -1 - } - return 1 - } - } else if this.Field5 != nil { - return 1 - } else if that1.Field5 != nil { - return -1 - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - if *this.Field8 < *that1.Field8 { - return -1 - } - return 1 - } - } else if this.Field8 != nil { - return 1 - } else if that1.Field8 != nil { - return -1 - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - if *this.Field9 < *that1.Field9 { - return -1 - } - return 1 - } - } else if this.Field9 != nil { - return 1 - } else if that1.Field9 != nil { - return -1 - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - if *this.Field10 < *that1.Field10 { - return -1 - } - return 1 - } - } else if this.Field10 != nil { - return 1 - } else if that1.Field10 != nil { - return -1 - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - if *this.Field11 < *that1.Field11 { - return -1 - } - return 1 - } - } else if this.Field11 != nil { - return 1 - } else if that1.Field11 != nil { - return -1 - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - if *this.Field12 < *that1.Field12 { - return -1 - } - return 1 - } - } else if this.Field12 != nil { - return 1 - } else if that1.Field12 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepPackedNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepPackedNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if this.Field4[i] != that1.Field4[i] { - if this.Field4[i] < that1.Field4[i] { - return -1 - } - return 1 - } - } - if len(this.Field5) != len(that1.Field5) { - if len(this.Field5) < len(that1.Field5) { - return -1 - } - return 1 - } - for i := range this.Field5 { - if this.Field5[i] != that1.Field5[i] { - if this.Field5[i] < that1.Field5[i] { - return -1 - } - return 1 - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if this.Field8[i] != that1.Field8[i] { - if this.Field8[i] < that1.Field8[i] { - return -1 - } - return 1 - } - } - if len(this.Field9) != len(that1.Field9) { - if len(this.Field9) < len(that1.Field9) { - return -1 - } - return 1 - } - for i := range this.Field9 { - if this.Field9[i] != that1.Field9[i] { - if this.Field9[i] < that1.Field9[i] { - return -1 - } - return 1 - } - } - if len(this.Field10) != len(that1.Field10) { - if len(this.Field10) < len(that1.Field10) { - return -1 - } - return 1 - } - for i := range this.Field10 { - if this.Field10[i] != that1.Field10[i] { - if this.Field10[i] < that1.Field10[i] { - return -1 - } - return 1 - } - } - if len(this.Field11) != len(that1.Field11) { - if len(this.Field11) < len(that1.Field11) { - return -1 - } - return 1 - } - for i := range this.Field11 { - if this.Field11[i] != that1.Field11[i] { - if this.Field11[i] < that1.Field11[i] { - return -1 - } - return 1 - } - } - if len(this.Field12) != len(that1.Field12) { - if len(this.Field12) < len(that1.Field12) { - return -1 - } - return 1 - } - for i := range this.Field12 { - if this.Field12[i] != that1.Field12[i] { - if this.Field12[i] < that1.Field12[i] { - return -1 - } - return 1 - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != that1.Field1 { - if this.Field1 < that1.Field1 { - return -1 - } - return 1 - } - if this.Field2 != that1.Field2 { - if this.Field2 < that1.Field2 { - return -1 - } - return 1 - } - if c := this.Field3.Compare(&that1.Field3); c != 0 { - return c - } - if c := this.Field4.Compare(&that1.Field4); c != 0 { - return c - } - if this.Field6 != that1.Field6 { - if this.Field6 < that1.Field6 { - return -1 - } - return 1 - } - if this.Field7 != that1.Field7 { - if this.Field7 < that1.Field7 { - return -1 - } - return 1 - } - if c := this.Field8.Compare(&that1.Field8); c != 0 { - return c - } - if this.Field13 != that1.Field13 { - if !this.Field13 { - return -1 - } - return 1 - } - if this.Field14 != that1.Field14 { - if this.Field14 < that1.Field14 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := this.Field3.Compare(that1.Field3); c != 0 { - return c - } - if c := this.Field4.Compare(that1.Field4); c != 0 { - return c - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if c := this.Field8.Compare(that1.Field8); c != 0 { - return c - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if c := this.Field3[i].Compare(&that1.Field3[i]); c != 0 { - return c - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if c := this.Field4[i].Compare(&that1.Field4[i]); c != 0 { - return c - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if c := this.Field8[i].Compare(&that1.Field8[i]); c != 0 { - return c - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if c := this.Field3[i].Compare(that1.Field3[i]); c != 0 { - return c - } - } - if len(this.Field4) != len(that1.Field4) { - if len(this.Field4) < len(that1.Field4) { - return -1 - } - return 1 - } - for i := range this.Field4 { - if c := this.Field4[i].Compare(that1.Field4[i]); c != 0 { - return c - } - } - if len(this.Field6) != len(that1.Field6) { - if len(this.Field6) < len(that1.Field6) { - return -1 - } - return 1 - } - for i := range this.Field6 { - if this.Field6[i] != that1.Field6[i] { - if this.Field6[i] < that1.Field6[i] { - return -1 - } - return 1 - } - } - if len(this.Field7) != len(that1.Field7) { - if len(this.Field7) < len(that1.Field7) { - return -1 - } - return 1 - } - for i := range this.Field7 { - if this.Field7[i] != that1.Field7[i] { - if this.Field7[i] < that1.Field7[i] { - return -1 - } - return 1 - } - } - if len(this.Field8) != len(that1.Field8) { - if len(this.Field8) < len(that1.Field8) { - return -1 - } - return 1 - } - for i := range this.Field8 { - if c := this.Field8[i].Compare(that1.Field8[i]); c != 0 { - return c - } - } - if len(this.Field13) != len(that1.Field13) { - if len(this.Field13) < len(that1.Field13) { - return -1 - } - return 1 - } - for i := range this.Field13 { - if this.Field13[i] != that1.Field13[i] { - if !this.Field13[i] { - return -1 - } - return 1 - } - } - if len(this.Field14) != len(that1.Field14) { - if len(this.Field14) < len(that1.Field14) { - return -1 - } - return 1 - } - for i := range this.Field14 { - if this.Field14[i] != that1.Field14[i] { - if this.Field14[i] < that1.Field14[i] { - return -1 - } - return 1 - } - } - if len(this.Field15) != len(that1.Field15) { - if len(this.Field15) < len(that1.Field15) { - return -1 - } - return 1 - } - for i := range this.Field15 { - if c := bytes.Compare(this.Field15[i], that1.Field15[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidEmbeddedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.Field200.Compare(&that1.Field200); c != 0 { - return c - } - if this.Field210 != that1.Field210 { - if !this.Field210 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinEmbeddedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.Field200.Compare(that1.Field200); c != 0 { - return c - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - if !*this.Field210 { - return -1 - } - return 1 - } - } else if this.Field210 != nil { - return 1 - } else if that1.Field210 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidNestedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(&that1.Field1); c != 0 { - return c - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if c := this.Field2[i].Compare(&that1.Field2[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinNestedStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(that1.Field1); c != 0 { - return c - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if c := this.Field2[i].Compare(that1.Field2[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Id.Compare(that1.Id); c != 0 { - return c - } - if c := this.Value.Compare(that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomDash) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Value == nil { - if this.Value != nil { - return 1 - } - } else if this.Value == nil { - return -1 - } else if c := this.Value.Compare(*that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Id == nil { - if this.Id != nil { - return 1 - } - } else if this.Id == nil { - return -1 - } else if c := this.Id.Compare(*that1.Id); c != 0 { - return c - } - if that1.Value == nil { - if this.Value != nil { - return 1 - } - } else if this.Value == nil { - return -1 - } else if c := this.Value.Compare(*that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Id) != len(that1.Id) { - if len(this.Id) < len(that1.Id) { - return -1 - } - return 1 - } - for i := range this.Id { - if c := this.Id[i].Compare(that1.Id[i]); c != 0 { - return c - } - } - if len(this.Value) != len(that1.Value) { - if len(this.Value) < len(that1.Value) { - return -1 - } - return 1 - } - for i := range this.Value { - if c := this.Value[i].Compare(that1.Value[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepCustom) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Id) != len(that1.Id) { - if len(this.Id) < len(that1.Id) { - return -1 - } - return 1 - } - for i := range this.Id { - if c := this.Id[i].Compare(that1.Id[i]); c != 0 { - return c - } - } - if len(this.Value) != len(that1.Value) { - if len(this.Value) < len(that1.Value) { - return -1 - } - return 1 - } - for i := range this.Value { - if c := this.Value[i].Compare(that1.Value[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNativeUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - if *this.Field4 < *that1.Field4 { - return -1 - } - return 1 - } - } else if this.Field4 != nil { - return 1 - } else if that1.Field4 != nil { - return -1 - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - if *this.Field5 < *that1.Field5 { - return -1 - } - return 1 - } - } else if this.Field5 != nil { - return 1 - } else if that1.Field5 != nil { - return -1 - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := this.Field3.Compare(that1.Field3); c != 0 { - return c - } - if c := this.Field4.Compare(that1.Field4); c != 0 { - return c - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinEmbeddedStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.Field200.Compare(that1.Field200); c != 0 { - return c - } - if this.Field210 != nil && that1.Field210 != nil { - if *this.Field210 != *that1.Field210 { - if !*this.Field210 { - return -1 - } - return 1 - } - } else if this.Field210 != nil { - return 1 - } else if that1.Field210 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinNestedStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(that1.Field1); c != 0 { - return c - } - if c := this.Field2.Compare(that1.Field2); c != 0 { - return c - } - if c := this.Field3.Compare(that1.Field3); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Tree) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Or.Compare(that1.Or); c != 0 { - return c - } - if c := this.And.Compare(that1.And); c != 0 { - return c - } - if c := this.Leaf.Compare(that1.Leaf); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *OrBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Left.Compare(&that1.Left); c != 0 { - return c - } - if c := this.Right.Compare(&that1.Right); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AndBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Left.Compare(&that1.Left); c != 0 { - return c - } - if c := this.Right.Compare(&that1.Right); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Leaf) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if this.StrValue != that1.StrValue { - if this.StrValue < that1.StrValue { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *DeepTree) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Down.Compare(that1.Down); c != 0 { - return c - } - if c := this.And.Compare(that1.And); c != 0 { - return c - } - if c := this.Leaf.Compare(that1.Leaf); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *ADeepBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Down.Compare(&that1.Down); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AndDeepBranch) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Left.Compare(&that1.Left); c != 0 { - return c - } - if c := this.Right.Compare(&that1.Right); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *DeepLeaf) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Tree.Compare(&that1.Tree); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Nil) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != that1.Field1 { - if this.Field1 < that1.Field1 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if this.Field1[i] != that1.Field1[i] { - if this.Field1[i] < that1.Field1[i] { - return -1 - } - return 1 - } - } - if len(this.Field2) != len(that1.Field2) { - if len(this.Field2) < len(that1.Field2) { - return -1 - } - return 1 - } - for i := range this.Field2 { - if this.Field2[i] != that1.Field2[i] { - if this.Field2[i] < that1.Field2[i] { - return -1 - } - return 1 - } - } - if len(this.Field3) != len(that1.Field3) { - if len(this.Field3) < len(that1.Field3) { - return -1 - } - return 1 - } - for i := range this.Field3 { - if this.Field3[i] != that1.Field3[i] { - if this.Field3[i] < that1.Field3[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptEnumDefault) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AnotherNinOptEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *AnotherNinOptEnumDefault) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Timer) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Time1 != that1.Time1 { - if this.Time1 < that1.Time1 { - return -1 - } - return 1 - } - if this.Time2 != that1.Time2 { - if this.Time2 < that1.Time2 { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Data, that1.Data); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *MyExtendable) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - extkeys := make([]int32, 0, len(thismap)+len(thatmap)) - for k := range thismap { - extkeys = append(extkeys, k) - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - extkeys = append(extkeys, k) - } - } - sortkeys.Int32s(extkeys) - for _, k := range extkeys { - if v, ok := thismap[k]; ok { - if v2, ok := thatmap[k]; ok { - if c := v.Compare(&v2); c != 0 { - return c - } - } else { - return 1 - } - } else { - return -1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *OtherExtenable) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if *this.Field13 < *that1.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if c := this.M.Compare(that1.M); c != 0 { - return c - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - extkeys := make([]int32, 0, len(thismap)+len(thatmap)) - for k := range thismap { - extkeys = append(extkeys, k) - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - extkeys = append(extkeys, k) - } - } - sortkeys.Int32s(extkeys) - for _, k := range extkeys { - if v, ok := thismap[k]; ok { - if v2, ok := thatmap[k]; ok { - if c := v.Compare(&v2); c != 0 { - return c - } - } else { - return 1 - } - } else { - return -1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedDefinition) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.EnumField != nil && that1.EnumField != nil { - if *this.EnumField != *that1.EnumField { - if *this.EnumField < *that1.EnumField { - return -1 - } - return 1 - } - } else if this.EnumField != nil { - return 1 - } else if that1.EnumField != nil { - return -1 - } - if c := this.NNM.Compare(that1.NNM); c != 0 { - return c - } - if c := this.NM.Compare(that1.NM); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedDefinition_NestedMessage) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.NestedField1 != nil && that1.NestedField1 != nil { - if *this.NestedField1 != *that1.NestedField1 { - if *this.NestedField1 < *that1.NestedField1 { - return -1 - } - return 1 - } - } else if this.NestedField1 != nil { - return 1 - } else if that1.NestedField1 != nil { - return -1 - } - if c := this.NNM.Compare(that1.NNM); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.NestedNestedField1 != nil && that1.NestedNestedField1 != nil { - if *this.NestedNestedField1 != *that1.NestedNestedField1 { - if *this.NestedNestedField1 < *that1.NestedNestedField1 { - return -1 - } - return 1 - } - } else if this.NestedNestedField1 != nil { - return 1 - } else if that1.NestedNestedField1 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NestedScope) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.A.Compare(that1.A); c != 0 { - return c - } - if this.B != nil && that1.B != nil { - if *this.B != *that1.B { - if *this.B < *that1.B { - return -1 - } - return 1 - } - } else if this.B != nil { - return 1 - } else if that1.B != nil { - return -1 - } - if c := this.C.Compare(that1.C); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNativeDefault) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if this.Field3 != nil && that1.Field3 != nil { - if *this.Field3 != *that1.Field3 { - if *this.Field3 < *that1.Field3 { - return -1 - } - return 1 - } - } else if this.Field3 != nil { - return 1 - } else if that1.Field3 != nil { - return -1 - } - if this.Field4 != nil && that1.Field4 != nil { - if *this.Field4 != *that1.Field4 { - if *this.Field4 < *that1.Field4 { - return -1 - } - return 1 - } - } else if this.Field4 != nil { - return 1 - } else if that1.Field4 != nil { - return -1 - } - if this.Field5 != nil && that1.Field5 != nil { - if *this.Field5 != *that1.Field5 { - if *this.Field5 < *that1.Field5 { - return -1 - } - return 1 - } - } else if this.Field5 != nil { - return 1 - } else if that1.Field5 != nil { - return -1 - } - if this.Field6 != nil && that1.Field6 != nil { - if *this.Field6 != *that1.Field6 { - if *this.Field6 < *that1.Field6 { - return -1 - } - return 1 - } - } else if this.Field6 != nil { - return 1 - } else if that1.Field6 != nil { - return -1 - } - if this.Field7 != nil && that1.Field7 != nil { - if *this.Field7 != *that1.Field7 { - if *this.Field7 < *that1.Field7 { - return -1 - } - return 1 - } - } else if this.Field7 != nil { - return 1 - } else if that1.Field7 != nil { - return -1 - } - if this.Field8 != nil && that1.Field8 != nil { - if *this.Field8 != *that1.Field8 { - if *this.Field8 < *that1.Field8 { - return -1 - } - return 1 - } - } else if this.Field8 != nil { - return 1 - } else if that1.Field8 != nil { - return -1 - } - if this.Field9 != nil && that1.Field9 != nil { - if *this.Field9 != *that1.Field9 { - if *this.Field9 < *that1.Field9 { - return -1 - } - return 1 - } - } else if this.Field9 != nil { - return 1 - } else if that1.Field9 != nil { - return -1 - } - if this.Field10 != nil && that1.Field10 != nil { - if *this.Field10 != *that1.Field10 { - if *this.Field10 < *that1.Field10 { - return -1 - } - return 1 - } - } else if this.Field10 != nil { - return 1 - } else if that1.Field10 != nil { - return -1 - } - if this.Field11 != nil && that1.Field11 != nil { - if *this.Field11 != *that1.Field11 { - if *this.Field11 < *that1.Field11 { - return -1 - } - return 1 - } - } else if this.Field11 != nil { - return 1 - } else if that1.Field11 != nil { - return -1 - } - if this.Field12 != nil && that1.Field12 != nil { - if *this.Field12 != *that1.Field12 { - if *this.Field12 < *that1.Field12 { - return -1 - } - return 1 - } - } else if this.Field12 != nil { - return 1 - } else if that1.Field12 != nil { - return -1 - } - if this.Field13 != nil && that1.Field13 != nil { - if *this.Field13 != *that1.Field13 { - if !*this.Field13 { - return -1 - } - return 1 - } - } else if this.Field13 != nil { - return 1 - } else if that1.Field13 != nil { - return -1 - } - if this.Field14 != nil && that1.Field14 != nil { - if *this.Field14 != *that1.Field14 { - if *this.Field14 < *that1.Field14 { - return -1 - } - return 1 - } - } else if this.Field14 != nil { - return 1 - } else if that1.Field14 != nil { - return -1 - } - if c := bytes.Compare(this.Field15, that1.Field15); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomContainer) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.CustomStruct.Compare(&that1.CustomStruct); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNidOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != that1.FieldA { - if this.FieldA < that1.FieldA { - return -1 - } - return 1 - } - if this.FieldB != that1.FieldB { - if this.FieldB < that1.FieldB { - return -1 - } - return 1 - } - if this.FieldC != that1.FieldC { - if this.FieldC < that1.FieldC { - return -1 - } - return 1 - } - if this.FieldD != that1.FieldD { - if this.FieldD < that1.FieldD { - return -1 - } - return 1 - } - if this.FieldE != that1.FieldE { - if this.FieldE < that1.FieldE { - return -1 - } - return 1 - } - if this.FieldF != that1.FieldF { - if this.FieldF < that1.FieldF { - return -1 - } - return 1 - } - if this.FieldG != that1.FieldG { - if this.FieldG < that1.FieldG { - return -1 - } - return 1 - } - if this.FieldH != that1.FieldH { - if this.FieldH < that1.FieldH { - return -1 - } - return 1 - } - if this.FieldI != that1.FieldI { - if this.FieldI < that1.FieldI { - return -1 - } - return 1 - } - if this.FieldJ != that1.FieldJ { - if this.FieldJ < that1.FieldJ { - return -1 - } - return 1 - } - if this.FieldK != that1.FieldK { - if this.FieldK < that1.FieldK { - return -1 - } - return 1 - } - if this.FieldL != that1.FieldL { - if this.FieldL < that1.FieldL { - return -1 - } - return 1 - } - if this.FieldM != that1.FieldM { - if !this.FieldM { - return -1 - } - return 1 - } - if this.FieldN != that1.FieldN { - if this.FieldN < that1.FieldN { - return -1 - } - return 1 - } - if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinOptNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - if *this.FieldA < *that1.FieldA { - return -1 - } - return 1 - } - } else if this.FieldA != nil { - return 1 - } else if that1.FieldA != nil { - return -1 - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - if *this.FieldB < *that1.FieldB { - return -1 - } - return 1 - } - } else if this.FieldB != nil { - return 1 - } else if that1.FieldB != nil { - return -1 - } - if this.FieldC != nil && that1.FieldC != nil { - if *this.FieldC != *that1.FieldC { - if *this.FieldC < *that1.FieldC { - return -1 - } - return 1 - } - } else if this.FieldC != nil { - return 1 - } else if that1.FieldC != nil { - return -1 - } - if this.FieldD != nil && that1.FieldD != nil { - if *this.FieldD != *that1.FieldD { - if *this.FieldD < *that1.FieldD { - return -1 - } - return 1 - } - } else if this.FieldD != nil { - return 1 - } else if that1.FieldD != nil { - return -1 - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - if *this.FieldE < *that1.FieldE { - return -1 - } - return 1 - } - } else if this.FieldE != nil { - return 1 - } else if that1.FieldE != nil { - return -1 - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - if *this.FieldF < *that1.FieldF { - return -1 - } - return 1 - } - } else if this.FieldF != nil { - return 1 - } else if that1.FieldF != nil { - return -1 - } - if this.FieldG != nil && that1.FieldG != nil { - if *this.FieldG != *that1.FieldG { - if *this.FieldG < *that1.FieldG { - return -1 - } - return 1 - } - } else if this.FieldG != nil { - return 1 - } else if that1.FieldG != nil { - return -1 - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - if *this.FieldH < *that1.FieldH { - return -1 - } - return 1 - } - } else if this.FieldH != nil { - return 1 - } else if that1.FieldH != nil { - return -1 - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - if *this.FieldI < *that1.FieldI { - return -1 - } - return 1 - } - } else if this.FieldI != nil { - return 1 - } else if that1.FieldI != nil { - return -1 - } - if this.FieldJ != nil && that1.FieldJ != nil { - if *this.FieldJ != *that1.FieldJ { - if *this.FieldJ < *that1.FieldJ { - return -1 - } - return 1 - } - } else if this.FieldJ != nil { - return 1 - } else if that1.FieldJ != nil { - return -1 - } - if this.FieldK != nil && that1.FieldK != nil { - if *this.FieldK != *that1.FieldK { - if *this.FieldK < *that1.FieldK { - return -1 - } - return 1 - } - } else if this.FieldK != nil { - return 1 - } else if that1.FieldK != nil { - return -1 - } - if this.FielL != nil && that1.FielL != nil { - if *this.FielL != *that1.FielL { - if *this.FielL < *that1.FielL { - return -1 - } - return 1 - } - } else if this.FielL != nil { - return 1 - } else if that1.FielL != nil { - return -1 - } - if this.FieldM != nil && that1.FieldM != nil { - if *this.FieldM != *that1.FieldM { - if !*this.FieldM { - return -1 - } - return 1 - } - } else if this.FieldM != nil { - return 1 - } else if that1.FieldM != nil { - return -1 - } - if this.FieldN != nil && that1.FieldN != nil { - if *this.FieldN != *that1.FieldN { - if *this.FieldN < *that1.FieldN { - return -1 - } - return 1 - } - } else if this.FieldN != nil { - return 1 - } else if that1.FieldN != nil { - return -1 - } - if c := bytes.Compare(this.FieldO, that1.FieldO); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinRepNative) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.FieldA) != len(that1.FieldA) { - if len(this.FieldA) < len(that1.FieldA) { - return -1 - } - return 1 - } - for i := range this.FieldA { - if this.FieldA[i] != that1.FieldA[i] { - if this.FieldA[i] < that1.FieldA[i] { - return -1 - } - return 1 - } - } - if len(this.FieldB) != len(that1.FieldB) { - if len(this.FieldB) < len(that1.FieldB) { - return -1 - } - return 1 - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - if this.FieldB[i] < that1.FieldB[i] { - return -1 - } - return 1 - } - } - if len(this.FieldC) != len(that1.FieldC) { - if len(this.FieldC) < len(that1.FieldC) { - return -1 - } - return 1 - } - for i := range this.FieldC { - if this.FieldC[i] != that1.FieldC[i] { - if this.FieldC[i] < that1.FieldC[i] { - return -1 - } - return 1 - } - } - if len(this.FieldD) != len(that1.FieldD) { - if len(this.FieldD) < len(that1.FieldD) { - return -1 - } - return 1 - } - for i := range this.FieldD { - if this.FieldD[i] != that1.FieldD[i] { - if this.FieldD[i] < that1.FieldD[i] { - return -1 - } - return 1 - } - } - if len(this.FieldE) != len(that1.FieldE) { - if len(this.FieldE) < len(that1.FieldE) { - return -1 - } - return 1 - } - for i := range this.FieldE { - if this.FieldE[i] != that1.FieldE[i] { - if this.FieldE[i] < that1.FieldE[i] { - return -1 - } - return 1 - } - } - if len(this.FieldF) != len(that1.FieldF) { - if len(this.FieldF) < len(that1.FieldF) { - return -1 - } - return 1 - } - for i := range this.FieldF { - if this.FieldF[i] != that1.FieldF[i] { - if this.FieldF[i] < that1.FieldF[i] { - return -1 - } - return 1 - } - } - if len(this.FieldG) != len(that1.FieldG) { - if len(this.FieldG) < len(that1.FieldG) { - return -1 - } - return 1 - } - for i := range this.FieldG { - if this.FieldG[i] != that1.FieldG[i] { - if this.FieldG[i] < that1.FieldG[i] { - return -1 - } - return 1 - } - } - if len(this.FieldH) != len(that1.FieldH) { - if len(this.FieldH) < len(that1.FieldH) { - return -1 - } - return 1 - } - for i := range this.FieldH { - if this.FieldH[i] != that1.FieldH[i] { - if this.FieldH[i] < that1.FieldH[i] { - return -1 - } - return 1 - } - } - if len(this.FieldI) != len(that1.FieldI) { - if len(this.FieldI) < len(that1.FieldI) { - return -1 - } - return 1 - } - for i := range this.FieldI { - if this.FieldI[i] != that1.FieldI[i] { - if this.FieldI[i] < that1.FieldI[i] { - return -1 - } - return 1 - } - } - if len(this.FieldJ) != len(that1.FieldJ) { - if len(this.FieldJ) < len(that1.FieldJ) { - return -1 - } - return 1 - } - for i := range this.FieldJ { - if this.FieldJ[i] != that1.FieldJ[i] { - if this.FieldJ[i] < that1.FieldJ[i] { - return -1 - } - return 1 - } - } - if len(this.FieldK) != len(that1.FieldK) { - if len(this.FieldK) < len(that1.FieldK) { - return -1 - } - return 1 - } - for i := range this.FieldK { - if this.FieldK[i] != that1.FieldK[i] { - if this.FieldK[i] < that1.FieldK[i] { - return -1 - } - return 1 - } - } - if len(this.FieldL) != len(that1.FieldL) { - if len(this.FieldL) < len(that1.FieldL) { - return -1 - } - return 1 - } - for i := range this.FieldL { - if this.FieldL[i] != that1.FieldL[i] { - if this.FieldL[i] < that1.FieldL[i] { - return -1 - } - return 1 - } - } - if len(this.FieldM) != len(that1.FieldM) { - if len(this.FieldM) < len(that1.FieldM) { - return -1 - } - return 1 - } - for i := range this.FieldM { - if this.FieldM[i] != that1.FieldM[i] { - if !this.FieldM[i] { - return -1 - } - return 1 - } - } - if len(this.FieldN) != len(that1.FieldN) { - if len(this.FieldN) < len(that1.FieldN) { - return -1 - } - return 1 - } - for i := range this.FieldN { - if this.FieldN[i] != that1.FieldN[i] { - if this.FieldN[i] < that1.FieldN[i] { - return -1 - } - return 1 - } - } - if len(this.FieldO) != len(that1.FieldO) { - if len(this.FieldO) < len(that1.FieldO) { - return -1 - } - return 1 - } - for i := range this.FieldO { - if c := bytes.Compare(this.FieldO[i], that1.FieldO[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinStruct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - if *this.FieldA < *that1.FieldA { - return -1 - } - return 1 - } - } else if this.FieldA != nil { - return 1 - } else if that1.FieldA != nil { - return -1 - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - if *this.FieldB < *that1.FieldB { - return -1 - } - return 1 - } - } else if this.FieldB != nil { - return 1 - } else if that1.FieldB != nil { - return -1 - } - if c := this.FieldC.Compare(that1.FieldC); c != 0 { - return c - } - if len(this.FieldD) != len(that1.FieldD) { - if len(this.FieldD) < len(that1.FieldD) { - return -1 - } - return 1 - } - for i := range this.FieldD { - if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { - return c - } - } - if this.FieldE != nil && that1.FieldE != nil { - if *this.FieldE != *that1.FieldE { - if *this.FieldE < *that1.FieldE { - return -1 - } - return 1 - } - } else if this.FieldE != nil { - return 1 - } else if that1.FieldE != nil { - return -1 - } - if this.FieldF != nil && that1.FieldF != nil { - if *this.FieldF != *that1.FieldF { - if *this.FieldF < *that1.FieldF { - return -1 - } - return 1 - } - } else if this.FieldF != nil { - return 1 - } else if that1.FieldF != nil { - return -1 - } - if c := this.FieldG.Compare(that1.FieldG); c != 0 { - return c - } - if this.FieldH != nil && that1.FieldH != nil { - if *this.FieldH != *that1.FieldH { - if !*this.FieldH { - return -1 - } - return 1 - } - } else if this.FieldH != nil { - return 1 - } else if that1.FieldH != nil { - return -1 - } - if this.FieldI != nil && that1.FieldI != nil { - if *this.FieldI != *that1.FieldI { - if *this.FieldI < *that1.FieldI { - return -1 - } - return 1 - } - } else if this.FieldI != nil { - return 1 - } else if that1.FieldI != nil { - return -1 - } - if c := bytes.Compare(this.FieldJ, that1.FieldJ); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.FieldA == nil { - if this.FieldA != nil { - return 1 - } - } else if this.FieldA == nil { - return -1 - } else if c := this.FieldA.Compare(*that1.FieldA); c != 0 { - return c - } - if that1.FieldB == nil { - if this.FieldB != nil { - return 1 - } - } else if this.FieldB == nil { - return -1 - } else if c := this.FieldB.Compare(*that1.FieldB); c != 0 { - return c - } - if len(this.FieldC) != len(that1.FieldC) { - if len(this.FieldC) < len(that1.FieldC) { - return -1 - } - return 1 - } - for i := range this.FieldC { - if c := this.FieldC[i].Compare(that1.FieldC[i]); c != 0 { - return c - } - } - if len(this.FieldD) != len(that1.FieldD) { - if len(this.FieldD) < len(that1.FieldD) { - return -1 - } - return 1 - } - for i := range this.FieldD { - if c := this.FieldD[i].Compare(that1.FieldD[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameNinEmbeddedStructUnion) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NidOptNative.Compare(that1.NidOptNative); c != 0 { - return c - } - if c := this.FieldA.Compare(that1.FieldA); c != 0 { - return c - } - if this.FieldB != nil && that1.FieldB != nil { - if *this.FieldB != *that1.FieldB { - if !*this.FieldB { - return -1 - } - return 1 - } - } else if this.FieldB != nil { - return 1 - } else if that1.FieldB != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *CustomNameEnum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FieldA != nil && that1.FieldA != nil { - if *this.FieldA != *that1.FieldA { - if *this.FieldA < *that1.FieldA { - return -1 - } - return 1 - } - } else if this.FieldA != nil { - return 1 - } else if that1.FieldA != nil { - return -1 - } - if len(this.FieldB) != len(that1.FieldB) { - if len(this.FieldB) < len(that1.FieldB) { - return -1 - } - return 1 - } - for i := range this.FieldB { - if this.FieldB[i] != that1.FieldB[i] { - if this.FieldB[i] < that1.FieldB[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NoExtensionsMap) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_extensions, that1.XXX_extensions); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Unrecognized) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - return 0 -} -func (this *UnrecognizedWithInner) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Embedded) != len(that1.Embedded) { - if len(this.Embedded) < len(that1.Embedded) { - return -1 - } - return 1 - } - for i := range this.Embedded { - if c := this.Embedded[i].Compare(that1.Embedded[i]); c != 0 { - return c - } - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *UnrecognizedWithInner_Inner) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - return 0 -} -func (this *UnrecognizedWithEmbed) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.UnrecognizedWithEmbed_Embedded.Compare(&that1.UnrecognizedWithEmbed_Embedded); c != 0 { - return c - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *UnrecognizedWithEmbed_Embedded) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field1 != nil && that1.Field1 != nil { - if *this.Field1 != *that1.Field1 { - if *this.Field1 < *that1.Field1 { - return -1 - } - return 1 - } - } else if this.Field1 != nil { - return 1 - } else if that1.Field1 != nil { - return -1 - } - return 0 -} -func (this *Node) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Label != nil && that1.Label != nil { - if *this.Label != *that1.Label { - if *this.Label < *that1.Label { - return -1 - } - return 1 - } - } else if this.Label != nil { - return 1 - } else if that1.Label != nil { - return -1 - } - if len(this.Children) != len(that1.Children) { - if len(this.Children) < len(that1.Children) { - return -1 - } - return 1 - } - for i := range this.Children { - if c := this.Children[i].Compare(that1.Children[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NonByteCustomType) - if !ok { - that2, ok := that.(NonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Field1 == nil { - if this.Field1 != nil { - return 1 - } - } else if this.Field1 == nil { - return -1 - } else if c := this.Field1.Compare(*that1.Field1); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidOptNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidOptNonByteCustomType) - if !ok { - that2, ok := that.(NidOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Field1.Compare(that1.Field1); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinOptNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinOptNonByteCustomType) - if !ok { - that2, ok := that.(NinOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Field1 == nil { - if this.Field1 != nil { - return 1 - } - } else if this.Field1 == nil { - return -1 - } else if c := this.Field1.Compare(*that1.Field1); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NidRepNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NidRepNonByteCustomType) - if !ok { - that2, ok := that.(NidRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *NinRepNonByteCustomType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*NinRepNonByteCustomType) - if !ok { - that2, ok := that.(NinRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Field1) != len(that1.Field1) { - if len(this.Field1) < len(that1.Field1) { - return -1 - } - return 1 - } - for i := range this.Field1 { - if c := this.Field1[i].Compare(that1.Field1[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *ProtoType) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ProtoType) - if !ok { - that2, ok := that.(ProtoType) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Field2 != nil && that1.Field2 != nil { - if *this.Field2 != *that1.Field2 { - if *this.Field2 < *that1.Field2 { - return -1 - } - return 1 - } - } else if this.Field2 != nil { - return 1 - } else if that1.Field2 != nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -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 (this *Node) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidOptNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinOptNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NidRepNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *NinRepNonByteCustomType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func (this *ProtoType) Description() (desc *descriptor.FileDescriptorSet) { - return ThetestDescription() -} -func ThetestDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 6619 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x7c, 0x6b, 0x6c, 0x1c, 0xd7, - 0x75, 0x3f, 0x67, 0x67, 0x49, 0x2d, 0x0f, 0x5f, 0xc3, 0xa1, 0x44, 0xad, 0x69, 0x99, 0xa4, 0xd6, - 0xb2, 0x4c, 0x33, 0x36, 0x45, 0x51, 0xd4, 0x6b, 0x15, 0xdb, 0xff, 0x7d, 0x49, 0xa6, 0x42, 0x2e, - 0x99, 0x21, 0x19, 0x5b, 0xc9, 0xff, 0x8f, 0xc5, 0x68, 0xf7, 0x92, 0x5c, 0x7b, 0x77, 0x66, 0xb3, - 0x33, 0xb4, 0x4d, 0xe3, 0x8f, 0xc2, 0x4d, 0xda, 0x34, 0x69, 0xd1, 0x67, 0x5a, 0xe4, 0xd1, 0xc4, - 0x71, 0x5a, 0xa4, 0x71, 0xd2, 0x57, 0xd2, 0xa4, 0x69, 0x1a, 0x14, 0x8d, 0xbf, 0xa4, 0x55, 0xbf, - 0x04, 0x4e, 0x3f, 0x15, 0x41, 0x61, 0x44, 0x72, 0x80, 0xa6, 0xad, 0xdb, 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x09, 0x7a, 0xb7, 0xf0, 0x2c, 0xd3, - 0x89, 0x83, 0xd8, 0x80, 0x62, 0x44, 0x23, 0xf6, 0xbd, 0x41, 0x23, 0xe6, 0x60, 0xc0, 0x42, 0x8e, - 0x8b, 0x6a, 0x34, 0x22, 0xd4, 0x98, 0x31, 0x05, 0x14, 0xd4, 0x19, 0x52, 0xc9, 0x37, 0x14, 0x52, - 0x8f, 0xc1, 0x88, 0xa7, 0x52, 0xa5, 0x6d, 0x5a, 0xdb, 0x3c, 0x36, 0x4f, 0x45, 0x69, 0x32, 0x57, - 0xe2, 0x38, 0x03, 0xc3, 0x8c, 0x61, 0x24, 0x7c, 0xd7, 0x8b, 0x00, 0xb6, 0x85, 0xec, 0xad, 0x4a, - 0x0d, 0x55, 0x1b, 0xe9, 0x54, 0x17, 0x2b, 0xad, 0x62, 0x96, 0x0e, 0x2b, 0xd9, 0x74, 0xb4, 0xda, - 0xd0, 0x2f, 0xfa, 0xa1, 0x76, 0xa8, 0x4b, 0xa4, 0xac, 0xd0, 0x24, 0xeb, 0x88, 0xb6, 0x4d, 0x18, - 0x6e, 0x23, 0x1c, 0xf7, 0xa8, 0xc6, 0x66, 0xd6, 0x4f, 0x94, 0x98, 0x8b, 0x9c, 0x99, 0xc1, 0x60, - 0x74, 0x62, 0x43, 0xed, 0xe0, 0x57, 0xfd, 0x6e, 0xf0, 0x06, 0x2a, 0x24, 0xac, 0x80, 0x54, 0xa1, - 0x41, 0x3e, 0x58, 0x36, 0x9b, 0x68, 0xe2, 0x19, 0x18, 0x16, 0xcd, 0xa3, 0x1f, 0x86, 0x5e, 0xc7, - 0x35, 0xdb, 0x2e, 0x89, 0xc2, 0x5e, 0x83, 0x7e, 0xd1, 0x35, 0x50, 0x91, 0x55, 0x23, 0x55, 0xae, - 0xd7, 0xc0, 0x1f, 0xf5, 0xff, 0xe3, 0x4f, 0x58, 0x25, 0x13, 0x3e, 0xd9, 0xe9, 0x51, 0x41, 0xb2, - 0x3c, 0xef, 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, 0x6f, 0x25, 0x60, 0x58, 0x7c, 0x45, 0xd2, 0xdf, - 0x09, 0x47, 0xf9, 0x7e, 0x86, 0x83, 0xdc, 0xca, 0x53, 0xf5, 0x36, 0x49, 0x99, 0xa6, 0x49, 0x97, - 0x2f, 0xcf, 0x69, 0x87, 0x19, 0xd7, 0x3a, 0x72, 0x1f, 0xad, 0xb7, 0x71, 0x42, 0x34, 0x4d, 0x57, - 0x5f, 0x86, 0x29, 0xcb, 0xae, 0x38, 0xae, 0x69, 0xd5, 0xcc, 0x76, 0xad, 0xe2, 0xef, 0x24, 0x55, - 0xcc, 0x6a, 0x15, 0x39, 0x8e, 0x4d, 0x97, 0x2a, 0x4f, 0xca, 0x31, 0xcb, 0x5e, 0x67, 0xcc, 0x7e, - 0x0d, 0xcf, 0x31, 0x56, 0x29, 0xc0, 0xd4, 0x6e, 0x01, 0x76, 0x27, 0xf4, 0x37, 0xcd, 0x56, 0x05, - 0x59, 0x6e, 0x7b, 0x8f, 0x34, 0xc6, 0x29, 0x23, 0xd5, 0x34, 0x5b, 0x25, 0xfc, 0xfd, 0xed, 0x79, - 0x3f, 0xf9, 0x67, 0x15, 0x06, 0x83, 0xcd, 0x31, 0x7e, 0xd7, 0xa8, 0x92, 0x75, 0x44, 0x21, 0x95, - 0xe6, 0xee, 0x7d, 0x5b, 0xe9, 0xb9, 0x02, 0x5e, 0x60, 0xb2, 0x7d, 0xb4, 0x65, 0x35, 0x28, 0x12, - 0x2f, 0xee, 0xb8, 0xb6, 0x20, 0xda, 0x22, 0xa4, 0x0c, 0xf6, 0x4d, 0xbf, 0x02, 0x7d, 0x8f, 0x3b, - 0x44, 0x76, 0x1f, 0x91, 0x7d, 0x62, 0x7f, 0xd9, 0x57, 0xd7, 0x89, 0xf0, 0xfe, 0xab, 0xeb, 0x95, - 0xf2, 0xaa, 0xb1, 0x92, 0x5b, 0x36, 0x18, 0x5c, 0xbf, 0x03, 0x92, 0x0d, 0xf3, 0x99, 0x3d, 0x71, - 0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c0, 0xd0, 0x41, 0x64, 0xfd, 0x1d, 0x93, 0x35, 0x88, 0x82, 0x42, - 0xae, 0xc0, 0x08, 0x11, 0x52, 0xdd, 0x75, 0x5c, 0xbb, 0x49, 0xea, 0xde, 0xfe, 0x62, 0xfe, 0xfe, - 0xfb, 0x34, 0x57, 0x86, 0x31, 0xac, 0xe0, 0xa1, 0xb2, 0x59, 0x20, 0x47, 0x4e, 0x35, 0x54, 0x6d, - 0x44, 0x48, 0xb8, 0xc1, 0x14, 0xf1, 0xf8, 0xb3, 0xef, 0x81, 0xc3, 0xf8, 0x33, 0x29, 0x4b, 0x41, - 0x4d, 0xa2, 0x37, 0xbc, 0xd2, 0xdf, 0xf9, 0x20, 0x4d, 0xc7, 0x31, 0x4f, 0x40, 0x40, 0xa7, 0x80, - 0x17, 0xb7, 0x91, 0xeb, 0xa2, 0xb6, 0x53, 0x31, 0x1b, 0x61, 0xea, 0x05, 0x76, 0x0c, 0xd2, 0x9f, - 0x78, 0x55, 0xf4, 0xe2, 0x15, 0x8a, 0xcc, 0x35, 0x1a, 0xd9, 0x4d, 0x38, 0x1a, 0x12, 0x15, 0x31, - 0x64, 0x7e, 0x92, 0xc9, 0x3c, 0xdc, 0x11, 0x19, 0x58, 0xec, 0x1a, 0xf0, 0x71, 0xcf, 0x97, 0x31, - 0x64, 0xfe, 0x3e, 0x93, 0xa9, 0x33, 0x2c, 0x77, 0x29, 0x96, 0x78, 0x15, 0x46, 0x9f, 0x44, 0xed, - 0xeb, 0xb6, 0xc3, 0x76, 0x69, 0x62, 0x88, 0xfb, 0x14, 0x13, 0x37, 0xc2, 0x80, 0x64, 0xdb, 0x06, - 0xcb, 0xba, 0x08, 0xa9, 0x2d, 0xb3, 0x8a, 0x62, 0x88, 0xf8, 0x34, 0x13, 0x71, 0x08, 0xf3, 0x63, - 0x68, 0x0e, 0x06, 0xb7, 0x6d, 0xb6, 0x32, 0x45, 0xc3, 0x9f, 0x63, 0xf0, 0x01, 0x8e, 0x61, 0x22, - 0x5a, 0x76, 0x6b, 0xb7, 0x81, 0x97, 0xad, 0x68, 0x11, 0x9f, 0xe1, 0x22, 0x38, 0x86, 0x89, 0x38, - 0x80, 0x59, 0x9f, 0xe7, 0x22, 0x9c, 0x80, 0x3d, 0x1f, 0x86, 0x01, 0xdb, 0x6a, 0xec, 0xd9, 0x56, - 0x1c, 0x25, 0x3e, 0xcb, 0x24, 0x00, 0x83, 0x60, 0x01, 0x97, 0xa0, 0x3f, 0xae, 0x23, 0x3e, 0xf7, - 0x2a, 0x4f, 0x0f, 0xee, 0x81, 0x2b, 0x30, 0xc2, 0x0b, 0x54, 0xdd, 0xb6, 0x62, 0x88, 0xf8, 0x23, - 0x26, 0x62, 0x38, 0x00, 0x63, 0xd3, 0x70, 0x91, 0xe3, 0x6e, 0xa3, 0x38, 0x42, 0x3e, 0xcf, 0xa7, - 0xc1, 0x20, 0xcc, 0x94, 0xd7, 0x91, 0x55, 0xdd, 0x89, 0x27, 0xe1, 0x05, 0x6e, 0x4a, 0x8e, 0xc1, - 0x22, 0x0a, 0x30, 0xd4, 0x34, 0xdb, 0xce, 0x8e, 0xd9, 0x88, 0xe5, 0x8e, 0x2f, 0x30, 0x19, 0x83, - 0x1e, 0x88, 0x59, 0x64, 0xd7, 0x3a, 0x88, 0x98, 0x2f, 0x72, 0x8b, 0x04, 0x60, 0x2c, 0xf5, 0x1c, - 0x97, 0x6c, 0x69, 0x1d, 0x44, 0xda, 0x1f, 0xf3, 0xd4, 0xa3, 0xd8, 0x95, 0xa0, 0xc4, 0x4b, 0xd0, - 0xef, 0xd4, 0x9f, 0x89, 0x25, 0xe6, 0x4f, 0xb8, 0xa7, 0x09, 0x00, 0x83, 0xaf, 0xc1, 0x1d, 0xa1, - 0xcb, 0x44, 0x0c, 0x61, 0x7f, 0xca, 0x84, 0x8d, 0x87, 0x2c, 0x15, 0xac, 0x24, 0x1c, 0x54, 0xe4, - 0x9f, 0xf1, 0x92, 0x80, 0x24, 0x59, 0x6b, 0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2a, - 0x64, 0x01, 0x1e, 0x3f, 0xec, 0x32, 0x52, 0xd8, 0x41, 0x48, 0xc8, 0x65, 0xa4, 0x90, 0x83, 0x90, - 0x70, 0xcb, 0x48, 0xe1, 0x06, 0x21, 0xa1, 0x96, 0x91, 0x42, 0x0d, 0x42, 0xc2, 0x2c, 0x23, 0x85, - 0x19, 0x84, 0x84, 0x58, 0x46, 0x0a, 0x31, 0x08, 0x09, 0xaf, 0x8c, 0x14, 0x5e, 0x10, 0x12, 0x5a, - 0x27, 0xe4, 0xd0, 0x82, 0xb0, 0xb0, 0x3a, 0x21, 0x87, 0x15, 0x84, 0x85, 0xd4, 0xdd, 0x72, 0x48, - 0xf5, 0xdf, 0x7a, 0x79, 0xaa, 0x17, 0x0f, 0x05, 0xa2, 0xe9, 0x84, 0x1c, 0x4d, 0x10, 0x16, 0x49, - 0x27, 0xe4, 0x48, 0x82, 0xb0, 0x28, 0x3a, 0x21, 0x47, 0x11, 0x84, 0x45, 0xd0, 0x8b, 0x72, 0x04, - 0xf9, 0x77, 0x7c, 0x32, 0xd2, 0x91, 0x62, 0x54, 0x04, 0xa9, 0x31, 0x22, 0x48, 0x8d, 0x11, 0x41, - 0x6a, 0x8c, 0x08, 0x52, 0x63, 0x44, 0x90, 0x1a, 0x23, 0x82, 0xd4, 0x18, 0x11, 0xa4, 0xc6, 0x88, - 0x20, 0x35, 0x4e, 0x04, 0xa9, 0xb1, 0x22, 0x48, 0xed, 0x16, 0x41, 0x27, 0xe4, 0x1b, 0x0f, 0x10, - 0x56, 0x90, 0x4e, 0xc8, 0x47, 0x9f, 0xd1, 0x21, 0xa4, 0xc6, 0x0a, 0x21, 0xb5, 0x5b, 0x08, 0x7d, - 0x53, 0x85, 0x31, 0x21, 0x84, 0xd8, 0xf9, 0xd0, 0x9b, 0x55, 0x81, 0xce, 0xc5, 0xb8, 0x60, 0x11, - 0x16, 0x53, 0xe7, 0x62, 0x1c, 0x52, 0xef, 0x17, 0x67, 0x9d, 0x55, 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, 0xe4, - 0xbb, 0x02, 0xba, 0x5b, 0x89, 0x23, 0xb3, 0x8f, 0x30, 0x21, 0x85, 0xae, 0x42, 0x22, 0x4c, 0xc5, - 0xe1, 0xf9, 0x8d, 0x1b, 0x37, 0x27, 0x7b, 0x5e, 0xba, 0x39, 0xd9, 0xf3, 0x4f, 0x37, 0x27, 0x7b, - 0xbe, 0x77, 0x73, 0x52, 0xf9, 0xc1, 0xcd, 0x49, 0xe5, 0x47, 0x37, 0x27, 0x95, 0x9f, 0xdc, 0x9c, - 0x54, 0x9e, 0xbd, 0x35, 0xa9, 0xbc, 0x70, 0x6b, 0x52, 0xf9, 0xd2, 0xad, 0x49, 0xe5, 0xeb, 0xb7, - 0x26, 0x95, 0x17, 0x6f, 0x4d, 0x2a, 0x37, 0x6e, 0x4d, 0xf6, 0xbc, 0x74, 0x6b, 0x52, 0xf9, 0xde, - 0xad, 0x49, 0xe5, 0x07, 0xb7, 0x26, 0x7b, 0x7e, 0x74, 0x6b, 0x52, 0xf9, 0xc9, 0xad, 0xc9, 0x9e, - 0x67, 0x5f, 0x99, 0xec, 0x79, 0xfe, 0x95, 0xc9, 0x9e, 0x17, 0x5e, 0x99, 0x54, 0xfe, 0x37, 0x00, - 0x00, 0xff, 0xff, 0x5b, 0x5a, 0x4e, 0xa3, 0xdd, 0x66, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 YetAnotherTestEnum) String() string { - s, ok := YetAnotherTestEnum_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x YetYetAnotherTestEnum) String() string { - s, ok := YetYetAnotherTestEnum_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 { - return this == nil - } - - that1, ok := that.(*NidOptNative) - if !ok { - that2, ok := that.(NidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptNative) - if !ok { - that2, ok := that.(NinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepNative) - if !ok { - that2, ok := that.(NidRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepNative) - if !ok { - that2, ok := that.(NinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepPackedNative) - if !ok { - that2, ok := that.(NidRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepPackedNative) - if !ok { - that2, ok := that.(NinRepPackedNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidOptStruct) - if !ok { - that2, ok := that.(NidOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptStruct) - if !ok { - that2, ok := that.(NinOptStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepStruct) - if !ok { - that2, ok := that.(NidRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepStruct) - if !ok { - that2, ok := that.(NinRepStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidEmbeddedStruct) - if !ok { - that2, ok := that.(NidEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinEmbeddedStruct) - if !ok { - that2, ok := that.(NinEmbeddedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidNestedStruct) - if !ok { - that2, ok := that.(NidNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinNestedStruct) - if !ok { - that2, ok := that.(NinNestedStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidOptCustom) - if !ok { - that2, ok := that.(NidOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomDash) - if !ok { - that2, ok := that.(CustomDash) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptCustom) - if !ok { - that2, ok := that.(NinOptCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepCustom) - if !ok { - that2, ok := that.(NidRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepCustom) - if !ok { - that2, ok := that.(NinRepCustom) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptNativeUnion) - if !ok { - that2, ok := that.(NinOptNativeUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptStructUnion) - if !ok { - that2, ok := that.(NinOptStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinEmbeddedStructUnion) - if !ok { - that2, ok := that.(NinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinNestedStructUnion) - if !ok { - that2, ok := that.(NinNestedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Tree) - if !ok { - that2, ok := that.(Tree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OrBranch) - if !ok { - that2, ok := that.(OrBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AndBranch) - if !ok { - that2, ok := that.(AndBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Leaf) - if !ok { - that2, ok := that.(Leaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*DeepTree) - if !ok { - that2, ok := that.(DeepTree) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*ADeepBranch) - if !ok { - that2, ok := that.(ADeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AndDeepBranch) - if !ok { - that2, ok := that.(AndDeepBranch) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*DeepLeaf) - if !ok { - that2, ok := that.(DeepLeaf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Nil) - if !ok { - that2, ok := that.(Nil) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*NinOptEnumDefault) - if !ok { - that2, ok := that.(NinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*AnotherNinOptEnum) - if !ok { - that2, ok := that.(AnotherNinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 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 !bytes.Equal(this.XXX_unrecognized, 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 { - return this == nil - } - - that1, ok := that.(*AnotherNinOptEnumDefault) - if !ok { - that2, ok := that.(AnotherNinOptEnumDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !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 { - return this == nil - } - - that1, ok := that.(*Timer) - if !ok { - that2, ok := that.(Timer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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) - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) - } - } else { - return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) - } - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - return fmt.Errorf("XXX_InternalExtensions[%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 { - return this == nil - } - - that1, ok := that.(*MyExtendable) - if !ok { - that2, ok := that.(MyExtendable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range thatmap { - if _, ok := thismap[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) - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return fmt.Errorf("XXX_InternalExtensions this[%v](%v) Not Equal that[%v](%v)", k, thismap[k], k, thatmap[k]) - } - } else { - return fmt.Errorf("XXX_InternalExtensions[%v] Not In that", k) - } - } - for k := range thatmap { - if _, ok := thismap[k]; !ok { - return fmt.Errorf("XXX_InternalExtensions[%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 { - return this == nil - } - - that1, ok := that.(*OtherExtenable) - if !ok { - that2, ok := that.(OtherExtenable) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 - } - thismap := proto.GetUnsafeExtensionsMap(this) - thatmap := proto.GetUnsafeExtensionsMap(that1) - for k, v := range thismap { - if v2, ok := thatmap[k]; ok { - if !v.Equal(&v2) { - return false - } - } else { - return false - } - } - for k := range thatmap { - if _, ok := thismap[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 { - return this == nil - } - - that1, ok := that.(*NestedDefinition) - if !ok { - that2, ok := that.(NestedDefinition) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NestedDefinition_NestedMessage) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NestedDefinition_NestedMessage_NestedNestedMsg) - if !ok { - that2, ok := that.(NestedDefinition_NestedMessage_NestedNestedMsg) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NestedScope) - if !ok { - that2, ok := that.(NestedScope) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptNativeDefault) - if !ok { - that2, ok := that.(NinOptNativeDefault) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomContainer) - if !ok { - that2, ok := that.(CustomContainer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNidOptNative) - if !ok { - that2, ok := that.(CustomNameNidOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinOptNative) - if !ok { - that2, ok := that.(CustomNameNinOptNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinRepNative) - if !ok { - that2, ok := that.(CustomNameNinRepNative) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinStruct) - if !ok { - that2, ok := that.(CustomNameNinStruct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameCustomType) - if !ok { - that2, ok := that.(CustomNameCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameNinEmbeddedStructUnion) - if !ok { - that2, ok := that.(CustomNameNinEmbeddedStructUnion) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomNameEnum) - if !ok { - that2, ok := that.(CustomNameEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NoExtensionsMap) - if !ok { - that2, ok := that.(NoExtensionsMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Unrecognized) - if !ok { - that2, ok := that.(Unrecognized) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithInner) - if !ok { - that2, ok := that.(UnrecognizedWithInner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithInner_Inner) - if !ok { - that2, ok := that.(UnrecognizedWithInner_Inner) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithEmbed) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnrecognizedWithEmbed_Embedded) - if !ok { - that2, ok := that.(UnrecognizedWithEmbed_Embedded) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *Node) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Node") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Node but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Node but is not nil && this == nil") - } - if this.Label != nil && that1.Label != nil { - if *this.Label != *that1.Label { - return fmt.Errorf("Label this(%v) Not Equal that(%v)", *this.Label, *that1.Label) - } - } else if this.Label != nil { - return fmt.Errorf("this.Label == nil && that.Label != nil") - } else if that1.Label != nil { - return fmt.Errorf("Label this(%v) Not Equal that(%v)", this.Label, that1.Label) - } - if len(this.Children) != len(that1.Children) { - return fmt.Errorf("Children this(%v) Not Equal that(%v)", len(this.Children), len(that1.Children)) - } - for i := range this.Children { - if !this.Children[i].Equal(that1.Children[i]) { - return fmt.Errorf("Children this[%v](%v) Not Equal that[%v](%v)", i, this.Children[i], i, that1.Children[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 *Node) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Node) - if !ok { - that2, ok := that.(Node) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Label != nil && that1.Label != nil { - if *this.Label != *that1.Label { - return false - } - } else if this.Label != nil { - return false - } else if that1.Label != nil { - return false - } - if len(this.Children) != len(that1.Children) { - return false - } - for i := range this.Children { - if !this.Children[i].Equal(that1.Children[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NonByteCustomType) - if !ok { - that2, ok := that.(NonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NonByteCustomType but is not nil && this == nil") - } - if that1.Field1 == nil { - if this.Field1 != nil { - return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") - } - } else if !this.Field1.Equal(*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 *NonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NonByteCustomType) - if !ok { - that2, ok := that.(NonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Field1 == nil { - if this.Field1 != nil { - return false - } - } else if !this.Field1.Equal(*that1.Field1) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidOptNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidOptNonByteCustomType) - if !ok { - that2, ok := that.(NidOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidOptNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidOptNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidOptNonByteCustomType 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *NidOptNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NidOptNonByteCustomType) - if !ok { - that2, ok := that.(NidOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Field1.Equal(that1.Field1) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinOptNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinOptNonByteCustomType) - if !ok { - that2, ok := that.(NinOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinOptNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinOptNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinOptNonByteCustomType but is not nil && this == nil") - } - if that1.Field1 == nil { - if this.Field1 != nil { - return fmt.Errorf("this.Field1 != nil && that1.Field1 == nil") - } - } else if !this.Field1.Equal(*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 *NinOptNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NinOptNonByteCustomType) - if !ok { - that2, ok := that.(NinOptNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Field1 == nil { - if this.Field1 != nil { - return false - } - } else if !this.Field1.Equal(*that1.Field1) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NidRepNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NidRepNonByteCustomType) - if !ok { - that2, ok := that.(NidRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NidRepNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NidRepNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NidRepNonByteCustomType 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].Equal(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 *NidRepNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NidRepNonByteCustomType) - if !ok { - that2, ok := that.(NidRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if !this.Field1[i].Equal(that1.Field1[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *NinRepNonByteCustomType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NinRepNonByteCustomType) - if !ok { - that2, ok := that.(NinRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NinRepNonByteCustomType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NinRepNonByteCustomType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NinRepNonByteCustomType 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].Equal(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 *NinRepNonByteCustomType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NinRepNonByteCustomType) - if !ok { - that2, ok := that.(NinRepNonByteCustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Field1) != len(that1.Field1) { - return false - } - for i := range this.Field1 { - if !this.Field1[i].Equal(that1.Field1[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *ProtoType) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ProtoType) - if !ok { - that2, ok := that.(ProtoType) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ProtoType") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ProtoType but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ProtoType 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return fmt.Errorf("XXX_unrecognized this(%v) Not Equal that(%v)", this.XXX_unrecognized, that1.XXX_unrecognized) - } - return nil -} -func (this *ProtoType) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProtoType) - if !ok { - that2, ok := that.(ProtoType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type NidOptNativeFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *NidOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidRepNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinRepNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidRepPackedNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinRepPackedNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidOptStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinOptStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NidRepStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *NinRepStruct) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetField200() NidOptNative - GetField210() bool -} - -func (this *NidEmbeddedStruct) Proto() proto.Message { - return this -} - -func (this *NidEmbeddedStruct) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NidOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStruct) Proto() proto.Message { - return this -} - -func (this *NinEmbeddedStruct) TestProto() 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() proto.Message - GetField1() NidOptStruct - GetField2() []NidRepStruct -} - -func (this *NidNestedStruct) Proto() proto.Message { - return this -} - -func (this *NidNestedStruct) TestProto() 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() proto.Message - GetField1() *NinOptStruct - GetField2() []*NinRepStruct -} - -func (this *NinNestedStruct) Proto() proto.Message { - return this -} - -func (this *NinNestedStruct) TestProto() 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() proto.Message - GetId() Uuid - GetValue() github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidOptCustom) Proto() proto.Message { - return this -} - -func (this *NidOptCustom) TestProto() 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() proto.Message - GetValue() *github_com_gogo_protobuf_test_custom_dash_type.Bytes -} - -func (this *CustomDash) Proto() proto.Message { - return this -} - -func (this *CustomDash) TestProto() 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() proto.Message - GetId() *Uuid - GetValue() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinOptCustom) Proto() proto.Message { - return this -} - -func (this *NinOptCustom) TestProto() 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() proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NidRepCustom) Proto() proto.Message { - return this -} - -func (this *NidRepCustom) TestProto() 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() proto.Message - GetId() []Uuid - GetValue() []github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *NinRepCustom) Proto() proto.Message { - return this -} - -func (this *NinRepCustom) TestProto() 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() proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *int32 - GetField4() *int64 - GetField5() *uint32 - GetField6() *uint64 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptNativeUnion) Proto() proto.Message { - return this -} - -func (this *NinOptNativeUnion) TestProto() 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() proto.Message - GetField1() *float64 - GetField2() *float32 - GetField3() *NidOptNative - GetField4() *NinOptNative - GetField6() *uint64 - GetField7() *int32 - GetField13() *bool - GetField14() *string - GetField15() []byte -} - -func (this *NinOptStructUnion) Proto() proto.Message { - return this -} - -func (this *NinOptStructUnion) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetField200() *NinOptNative - GetField210() *bool -} - -func (this *NinEmbeddedStructUnion) Proto() proto.Message { - return this -} - -func (this *NinEmbeddedStructUnion) TestProto() 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() proto.Message - GetField1() *NinOptNativeUnion - GetField2() *NinOptStructUnion - GetField3() *NinEmbeddedStructUnion -} - -func (this *NinNestedStructUnion) Proto() proto.Message { - return this -} - -func (this *NinNestedStructUnion) TestProto() 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() proto.Message - GetOr() *OrBranch - GetAnd() *AndBranch - GetLeaf() *Leaf -} - -func (this *Tree) Proto() proto.Message { - return this -} - -func (this *Tree) TestProto() 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() proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *OrBranch) Proto() proto.Message { - return this -} - -func (this *OrBranch) TestProto() 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() proto.Message - GetLeft() Tree - GetRight() Tree -} - -func (this *AndBranch) Proto() proto.Message { - return this -} - -func (this *AndBranch) TestProto() 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() proto.Message - GetValue() int64 - GetStrValue() string -} - -func (this *Leaf) Proto() proto.Message { - return this -} - -func (this *Leaf) TestProto() 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() proto.Message - GetDown() *ADeepBranch - GetAnd() *AndDeepBranch - GetLeaf() *DeepLeaf -} - -func (this *DeepTree) Proto() proto.Message { - return this -} - -func (this *DeepTree) TestProto() 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() proto.Message - GetDown() DeepTree -} - -func (this *ADeepBranch) Proto() proto.Message { - return this -} - -func (this *ADeepBranch) TestProto() 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() proto.Message - GetLeft() DeepTree - GetRight() DeepTree -} - -func (this *AndDeepBranch) Proto() proto.Message { - return this -} - -func (this *AndDeepBranch) TestProto() 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() proto.Message - GetTree() Tree -} - -func (this *DeepLeaf) Proto() proto.Message { - return this -} - -func (this *DeepLeaf) TestProto() 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() proto.Message -} - -func (this *Nil) Proto() proto.Message { - return this -} - -func (this *Nil) TestProto() proto.Message { - return NewNilFromFace(this) -} - -func NewNilFromFace(that NilFace) *Nil { - this := &Nil{} - return this -} - -type NidOptEnumFace interface { - Proto() proto.Message - GetField1() TheTestEnum -} - -func (this *NidOptEnum) Proto() proto.Message { - return this -} - -func (this *NidOptEnum) TestProto() 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() proto.Message - GetField1() *TheTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *NinOptEnum) Proto() proto.Message { - return this -} - -func (this *NinOptEnum) TestProto() proto.Message { - return NewNinOptEnumFromFace(this) -} - -func (this *NinOptEnum) GetField1() *TheTestEnum { - return this.Field1 -} - -func (this *NinOptEnum) GetField2() *YetAnotherTestEnum { - return this.Field2 -} - -func (this *NinOptEnum) GetField3() *YetYetAnotherTestEnum { - return this.Field3 -} - -func NewNinOptEnumFromFace(that NinOptEnumFace) *NinOptEnum { - this := &NinOptEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type NidRepEnumFace interface { - Proto() proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NidRepEnum) Proto() proto.Message { - return this -} - -func (this *NidRepEnum) TestProto() proto.Message { - return NewNidRepEnumFromFace(this) -} - -func (this *NidRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (this *NidRepEnum) GetField2() []YetAnotherTestEnum { - return this.Field2 -} - -func (this *NidRepEnum) GetField3() []YetYetAnotherTestEnum { - return this.Field3 -} - -func NewNidRepEnumFromFace(that NidRepEnumFace) *NidRepEnum { - this := &NidRepEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type NinRepEnumFace interface { - Proto() proto.Message - GetField1() []TheTestEnum - GetField2() []YetAnotherTestEnum - GetField3() []YetYetAnotherTestEnum -} - -func (this *NinRepEnum) Proto() proto.Message { - return this -} - -func (this *NinRepEnum) TestProto() proto.Message { - return NewNinRepEnumFromFace(this) -} - -func (this *NinRepEnum) GetField1() []TheTestEnum { - return this.Field1 -} - -func (this *NinRepEnum) GetField2() []YetAnotherTestEnum { - return this.Field2 -} - -func (this *NinRepEnum) GetField3() []YetYetAnotherTestEnum { - return this.Field3 -} - -func NewNinRepEnumFromFace(that NinRepEnumFace) *NinRepEnum { - this := &NinRepEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type AnotherNinOptEnumFace interface { - Proto() proto.Message - GetField1() *AnotherTestEnum - GetField2() *YetAnotherTestEnum - GetField3() *YetYetAnotherTestEnum -} - -func (this *AnotherNinOptEnum) Proto() proto.Message { - return this -} - -func (this *AnotherNinOptEnum) TestProto() proto.Message { - return NewAnotherNinOptEnumFromFace(this) -} - -func (this *AnotherNinOptEnum) GetField1() *AnotherTestEnum { - return this.Field1 -} - -func (this *AnotherNinOptEnum) GetField2() *YetAnotherTestEnum { - return this.Field2 -} - -func (this *AnotherNinOptEnum) GetField3() *YetYetAnotherTestEnum { - return this.Field3 -} - -func NewAnotherNinOptEnumFromFace(that AnotherNinOptEnumFace) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - this.Field1 = that.GetField1() - this.Field2 = that.GetField2() - this.Field3 = that.GetField3() - return this -} - -type TimerFace interface { - Proto() proto.Message - GetTime1() int64 - GetTime2() int64 - GetData() []byte -} - -func (this *Timer) Proto() proto.Message { - return this -} - -func (this *Timer) TestProto() 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() proto.Message - GetField1() *int64 - GetEnumField() *NestedDefinition_NestedEnum - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg - GetNM() *NestedDefinition_NestedMessage -} - -func (this *NestedDefinition) Proto() proto.Message { - return this -} - -func (this *NestedDefinition) TestProto() 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() proto.Message - GetNestedField1() *uint64 - GetNNM() *NestedDefinition_NestedMessage_NestedNestedMsg -} - -func (this *NestedDefinition_NestedMessage) Proto() proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage) TestProto() 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() proto.Message - GetNestedNestedField1() *string -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) Proto() proto.Message { - return this -} - -func (this *NestedDefinition_NestedMessage_NestedNestedMsg) TestProto() 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() proto.Message - GetA() *NestedDefinition_NestedMessage_NestedNestedMsg - GetB() *NestedDefinition_NestedEnum - GetC() *NestedDefinition_NestedMessage -} - -func (this *NestedScope) Proto() proto.Message { - return this -} - -func (this *NestedScope) TestProto() 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() proto.Message - GetCustomStruct() NidOptCustom -} - -func (this *CustomContainer) Proto() proto.Message { - return this -} - -func (this *CustomContainer) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNidOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNinOptNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNinRepNative) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameNinStruct) TestProto() 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() 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() proto.Message { - return this -} - -func (this *CustomNameCustomType) TestProto() 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() proto.Message - GetNidOptNative() *NidOptNative - GetFieldA() *NinOptNative - GetFieldB() *bool -} - -func (this *CustomNameNinEmbeddedStructUnion) Proto() proto.Message { - return this -} - -func (this *CustomNameNinEmbeddedStructUnion) TestProto() 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() proto.Message - GetFieldA() *TheTestEnum - GetFieldB() []TheTestEnum -} - -func (this *CustomNameEnum) Proto() proto.Message { - return this -} - -func (this *CustomNameEnum) TestProto() 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() proto.Message - GetField1() *string -} - -func (this *Unrecognized) Proto() proto.Message { - return this -} - -func (this *Unrecognized) TestProto() 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() proto.Message - GetEmbedded() []*UnrecognizedWithInner_Inner - GetField2() *string -} - -func (this *UnrecognizedWithInner) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithInner) TestProto() 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() proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithInner_Inner) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithInner_Inner) TestProto() 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() proto.Message - GetUnrecognizedWithEmbed_Embedded() UnrecognizedWithEmbed_Embedded - GetField2() *string -} - -func (this *UnrecognizedWithEmbed) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed) TestProto() 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() proto.Message - GetField1() *uint32 -} - -func (this *UnrecognizedWithEmbed_Embedded) Proto() proto.Message { - return this -} - -func (this *UnrecognizedWithEmbed_Embedded) TestProto() 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 -} - -type NodeFace interface { - Proto() proto.Message - GetLabel() *string - GetChildren() []*Node -} - -func (this *Node) Proto() proto.Message { - return this -} - -func (this *Node) TestProto() proto.Message { - return NewNodeFromFace(this) -} - -func (this *Node) GetLabel() *string { - return this.Label -} - -func (this *Node) GetChildren() []*Node { - return this.Children -} - -func NewNodeFromFace(that NodeFace) *Node { - this := &Node{} - this.Label = that.GetLabel() - this.Children = that.GetChildren() - return this -} - -type NonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() *T -} - -func (this *NonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NonByteCustomType) TestProto() proto.Message { - return NewNonByteCustomTypeFromFace(this) -} - -func (this *NonByteCustomType) GetField1() *T { - return this.Field1 -} - -func NewNonByteCustomTypeFromFace(that NonByteCustomTypeFace) *NonByteCustomType { - this := &NonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NidOptNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() T -} - -func (this *NidOptNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NidOptNonByteCustomType) TestProto() proto.Message { - return NewNidOptNonByteCustomTypeFromFace(this) -} - -func (this *NidOptNonByteCustomType) GetField1() T { - return this.Field1 -} - -func NewNidOptNonByteCustomTypeFromFace(that NidOptNonByteCustomTypeFace) *NidOptNonByteCustomType { - this := &NidOptNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NinOptNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() *T -} - -func (this *NinOptNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NinOptNonByteCustomType) TestProto() proto.Message { - return NewNinOptNonByteCustomTypeFromFace(this) -} - -func (this *NinOptNonByteCustomType) GetField1() *T { - return this.Field1 -} - -func NewNinOptNonByteCustomTypeFromFace(that NinOptNonByteCustomTypeFace) *NinOptNonByteCustomType { - this := &NinOptNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NidRepNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() []T -} - -func (this *NidRepNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NidRepNonByteCustomType) TestProto() proto.Message { - return NewNidRepNonByteCustomTypeFromFace(this) -} - -func (this *NidRepNonByteCustomType) GetField1() []T { - return this.Field1 -} - -func NewNidRepNonByteCustomTypeFromFace(that NidRepNonByteCustomTypeFace) *NidRepNonByteCustomType { - this := &NidRepNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type NinRepNonByteCustomTypeFace interface { - Proto() proto.Message - GetField1() []T -} - -func (this *NinRepNonByteCustomType) Proto() proto.Message { - return this -} - -func (this *NinRepNonByteCustomType) TestProto() proto.Message { - return NewNinRepNonByteCustomTypeFromFace(this) -} - -func (this *NinRepNonByteCustomType) GetField1() []T { - return this.Field1 -} - -func NewNinRepNonByteCustomTypeFromFace(that NinRepNonByteCustomTypeFace) *NinRepNonByteCustomType { - this := &NinRepNonByteCustomType{} - this.Field1 = that.GetField1() - return this -} - -type ProtoTypeFace interface { - Proto() proto.Message - GetField2() *string -} - -func (this *ProtoType) Proto() proto.Message { - return this -} - -func (this *ProtoType) TestProto() proto.Message { - return NewProtoTypeFromFace(this) -} - -func (this *ProtoType) GetField2() *string { - return this.Field2 -} - -func NewProtoTypeFromFace(that ProtoTypeFace) *ProtoType { - this := &ProtoType{} - this.Field2 = that.GetField2() - 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 { - vs := make([]*NidOptNative, len(this.Field3)) - for i := range vs { - vs[i] = &this.Field3[i] - } - s = append(s, "Field3: "+fmt.Sprintf("%#v", vs)+",\n") - } - if this.Field4 != nil { - vs := make([]*NinOptNative, len(this.Field4)) - for i := range vs { - vs[i] = &this.Field4[i] - } - s = append(s, "Field4: "+fmt.Sprintf("%#v", vs)+",\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 { - vs := make([]*NidOptNative, len(this.Field8)) - for i := range vs { - vs[i] = &this.Field8[i] - } - s = append(s, "Field8: "+fmt.Sprintf("%#v", vs)+",\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 { - vs := make([]*NidRepStruct, len(this.Field2)) - for i := range vs { - vs[i] = &this.Field2[i] - } - s = append(s, "Field2: "+fmt.Sprintf("%#v", vs)+",\n") - } - if this.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, 7) - s = append(s, "&test.NinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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, 7) - s = append(s, "&test.NidRepEnum{") - 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 *NinRepEnum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinRepEnum{") - 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 *NinOptEnumDefault) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&test.NinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "TheTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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, 7) - s = append(s, "&test.AnotherNinOptEnum{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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, 7) - s = append(s, "&test.AnotherNinOptEnumDefault{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "AnotherTestEnum")+",\n") - } - if this.Field2 != nil { - s = append(s, "Field2: "+valueToGoStringThetest(this.Field2, "YetAnotherTestEnum")+",\n") - } - if this.Field3 != nil { - s = append(s, "Field3: "+valueToGoStringThetest(this.Field3, "YetYetAnotherTestEnum")+",\n") - } - if this.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") - } - s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") - if this.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") - } - s = append(s, "XXX_InternalExtensions: "+extensionToGoStringThetest(this)+",\n") - if this.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, "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, "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, "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 (this *Node) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&test.Node{") - if this.Label != nil { - s = append(s, "Label: "+valueToGoStringThetest(this.Label, "string")+",\n") - } - if this.Children != nil { - s = append(s, "Children: "+fmt.Sprintf("%#v", this.Children)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NonByteCustomType{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidOptNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidOptNonByteCustomType{") - 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 *NinOptNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinOptNonByteCustomType{") - if this.Field1 != nil { - s = append(s, "Field1: "+valueToGoStringThetest(this.Field1, "T")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NidRepNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NidRepNonByteCustomType{") - 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 *NinRepNonByteCustomType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.NinRepNonByteCustomType{") - 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 *ProtoType) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.ProtoType{") - 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 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(m proto.Message) string { - e := proto.GetUnsafeExtensionsMap(m) - if e == nil { - return "nil" - } - s := "proto.NewUnsafeXXX_InternalExtensions(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 = string(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 := string(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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v31 := r.Intn(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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 = string(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 := string(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(10) - 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(10) - 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(5) - 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(5) - 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(10) - 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(10) - 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(5) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v98 := r.Intn(10) - 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(10) - 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(10) - 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(5) - 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(5) - 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(10) - 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(10) - 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(5) - 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(10) - 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] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v109 := r.Intn(10) - 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(5) - 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(5) - 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 := string(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 := string(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 = string(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 r.Intn(10) != 0 { - v153 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v153 - } - if r.Intn(10) != 0 { - v154 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v154 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNidRepEnum(r randyThetest, easy bool) *NidRepEnum { - this := &NidRepEnum{} - if r.Intn(10) != 0 { - v155 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v155) - for i := 0; i < v155; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v156 := r.Intn(10) - this.Field2 = make([]YetAnotherTestEnum, v156) - for i := 0; i < v156; i++ { - this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if r.Intn(10) != 0 { - v157 := r.Intn(10) - this.Field3 = make([]YetYetAnotherTestEnum, v157) - for i := 0; i < v157; i++ { - this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinRepEnum(r randyThetest, easy bool) *NinRepEnum { - this := &NinRepEnum{} - if r.Intn(10) != 0 { - v158 := r.Intn(10) - this.Field1 = make([]TheTestEnum, v158) - for i := 0; i < v158; i++ { - this.Field1[i] = TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v159 := r.Intn(10) - this.Field2 = make([]YetAnotherTestEnum, v159) - for i := 0; i < v159; i++ { - this.Field2[i] = YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if r.Intn(10) != 0 { - v160 := r.Intn(10) - this.Field3 = make([]YetYetAnotherTestEnum, v160) - for i := 0; i < v160; i++ { - this.Field3[i] = YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedNinOptEnumDefault(r randyThetest, easy bool) *NinOptEnumDefault { - this := &NinOptEnumDefault{} - if r.Intn(10) != 0 { - v161 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.Field1 = &v161 - } - if r.Intn(10) != 0 { - v162 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v162 - } - if r.Intn(10) != 0 { - v163 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v163 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedAnotherNinOptEnum(r randyThetest, easy bool) *AnotherNinOptEnum { - this := &AnotherNinOptEnum{} - if r.Intn(10) != 0 { - v164 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v164 - } - if r.Intn(10) != 0 { - v165 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v165 - } - if r.Intn(10) != 0 { - v166 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v166 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - return this -} - -func NewPopulatedAnotherNinOptEnumDefault(r randyThetest, easy bool) *AnotherNinOptEnumDefault { - this := &AnotherNinOptEnumDefault{} - if r.Intn(10) != 0 { - v167 := AnotherTestEnum([]int32{10, 11}[r.Intn(2)]) - this.Field1 = &v167 - } - if r.Intn(10) != 0 { - v168 := YetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field2 = &v168 - } - if r.Intn(10) != 0 { - v169 := YetYetAnotherTestEnum([]int32{0, 1}[r.Intn(2)]) - this.Field3 = &v169 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 4) - } - 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 - } - v170 := r.Intn(100) - this.Data = make([]byte, v170) - for i := 0; i < v170; 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 { - v171 := int64(r.Int63()) - if r.Intn(2) == 0 { - v171 *= -1 - } - this.Field1 = &v171 - } - 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) - 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 { - v172 := int64(r.Int63()) - if r.Intn(2) == 0 { - v172 *= -1 - } - this.Field2 = &v172 - } - if r.Intn(10) != 0 { - v173 := int64(r.Int63()) - if r.Intn(2) == 0 { - v173 *= -1 - } - this.Field13 = &v173 - } - 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) - 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 { - v174 := int64(r.Int63()) - if r.Intn(2) == 0 { - v174 *= -1 - } - this.Field1 = &v174 - } - if r.Intn(10) != 0 { - v175 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.EnumField = &v175 - } - 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 { - v176 := uint64(uint64(r.Uint32())) - this.NestedField1 = &v176 - } - 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 { - v177 := string(randStringThetest(r)) - this.NestedNestedField1 = &v177 - } - 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 { - v178 := NestedDefinition_NestedEnum([]int32{1}[r.Intn(1)]) - this.B = &v178 - } - 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 { - v179 := float64(r.Float64()) - if r.Intn(2) == 0 { - v179 *= -1 - } - this.Field1 = &v179 - } - if r.Intn(10) != 0 { - v180 := float32(r.Float32()) - if r.Intn(2) == 0 { - v180 *= -1 - } - this.Field2 = &v180 - } - if r.Intn(10) != 0 { - v181 := int32(r.Int31()) - if r.Intn(2) == 0 { - v181 *= -1 - } - this.Field3 = &v181 - } - if r.Intn(10) != 0 { - v182 := int64(r.Int63()) - if r.Intn(2) == 0 { - v182 *= -1 - } - this.Field4 = &v182 - } - if r.Intn(10) != 0 { - v183 := uint32(r.Uint32()) - this.Field5 = &v183 - } - if r.Intn(10) != 0 { - v184 := uint64(uint64(r.Uint32())) - this.Field6 = &v184 - } - if r.Intn(10) != 0 { - v185 := int32(r.Int31()) - if r.Intn(2) == 0 { - v185 *= -1 - } - this.Field7 = &v185 - } - if r.Intn(10) != 0 { - v186 := int64(r.Int63()) - if r.Intn(2) == 0 { - v186 *= -1 - } - this.Field8 = &v186 - } - if r.Intn(10) != 0 { - v187 := uint32(r.Uint32()) - this.Field9 = &v187 - } - if r.Intn(10) != 0 { - v188 := int32(r.Int31()) - if r.Intn(2) == 0 { - v188 *= -1 - } - this.Field10 = &v188 - } - if r.Intn(10) != 0 { - v189 := uint64(uint64(r.Uint32())) - this.Field11 = &v189 - } - if r.Intn(10) != 0 { - v190 := int64(r.Int63()) - if r.Intn(2) == 0 { - v190 *= -1 - } - this.Field12 = &v190 - } - if r.Intn(10) != 0 { - v191 := bool(bool(r.Intn(2) == 0)) - this.Field13 = &v191 - } - if r.Intn(10) != 0 { - v192 := string(randStringThetest(r)) - this.Field14 = &v192 - } - if r.Intn(10) != 0 { - v193 := r.Intn(100) - this.Field15 = make([]byte, v193) - for i := 0; i < v193; 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{} - v194 := NewPopulatedNidOptCustom(r, easy) - this.CustomStruct = *v194 - 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 = string(randStringThetest(r)) - v195 := r.Intn(100) - this.FieldO = make([]byte, v195) - for i := 0; i < v195; 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 { - v196 := float64(r.Float64()) - if r.Intn(2) == 0 { - v196 *= -1 - } - this.FieldA = &v196 - } - if r.Intn(10) != 0 { - v197 := float32(r.Float32()) - if r.Intn(2) == 0 { - v197 *= -1 - } - this.FieldB = &v197 - } - if r.Intn(10) != 0 { - v198 := int32(r.Int31()) - if r.Intn(2) == 0 { - v198 *= -1 - } - this.FieldC = &v198 - } - if r.Intn(10) != 0 { - v199 := int64(r.Int63()) - if r.Intn(2) == 0 { - v199 *= -1 - } - this.FieldD = &v199 - } - if r.Intn(10) != 0 { - v200 := uint32(r.Uint32()) - this.FieldE = &v200 - } - if r.Intn(10) != 0 { - v201 := uint64(uint64(r.Uint32())) - this.FieldF = &v201 - } - if r.Intn(10) != 0 { - v202 := int32(r.Int31()) - if r.Intn(2) == 0 { - v202 *= -1 - } - this.FieldG = &v202 - } - if r.Intn(10) != 0 { - v203 := int64(r.Int63()) - if r.Intn(2) == 0 { - v203 *= -1 - } - this.FieldH = &v203 - } - if r.Intn(10) != 0 { - v204 := uint32(r.Uint32()) - this.FieldI = &v204 - } - if r.Intn(10) != 0 { - v205 := int32(r.Int31()) - if r.Intn(2) == 0 { - v205 *= -1 - } - this.FieldJ = &v205 - } - if r.Intn(10) != 0 { - v206 := uint64(uint64(r.Uint32())) - this.FieldK = &v206 - } - if r.Intn(10) != 0 { - v207 := int64(r.Int63()) - if r.Intn(2) == 0 { - v207 *= -1 - } - this.FielL = &v207 - } - if r.Intn(10) != 0 { - v208 := bool(bool(r.Intn(2) == 0)) - this.FieldM = &v208 - } - if r.Intn(10) != 0 { - v209 := string(randStringThetest(r)) - this.FieldN = &v209 - } - if r.Intn(10) != 0 { - v210 := r.Intn(100) - this.FieldO = make([]byte, v210) - for i := 0; i < v210; 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 { - v211 := r.Intn(10) - this.FieldA = make([]float64, v211) - for i := 0; i < v211; i++ { - this.FieldA[i] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.FieldA[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v212 := r.Intn(10) - this.FieldB = make([]float32, v212) - for i := 0; i < v212; i++ { - this.FieldB[i] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.FieldB[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v213 := r.Intn(10) - this.FieldC = make([]int32, v213) - for i := 0; i < v213; i++ { - this.FieldC[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldC[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v214 := r.Intn(10) - this.FieldD = make([]int64, v214) - for i := 0; i < v214; i++ { - this.FieldD[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldD[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v215 := r.Intn(10) - this.FieldE = make([]uint32, v215) - for i := 0; i < v215; i++ { - this.FieldE[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v216 := r.Intn(10) - this.FieldF = make([]uint64, v216) - for i := 0; i < v216; i++ { - this.FieldF[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v217 := r.Intn(10) - this.FieldG = make([]int32, v217) - for i := 0; i < v217; i++ { - this.FieldG[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldG[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v218 := r.Intn(10) - this.FieldH = make([]int64, v218) - for i := 0; i < v218; i++ { - this.FieldH[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldH[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v219 := r.Intn(10) - this.FieldI = make([]uint32, v219) - for i := 0; i < v219; i++ { - this.FieldI[i] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v220 := r.Intn(10) - this.FieldJ = make([]int32, v220) - for i := 0; i < v220; i++ { - this.FieldJ[i] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FieldJ[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v221 := r.Intn(10) - this.FieldK = make([]uint64, v221) - for i := 0; i < v221; i++ { - this.FieldK[i] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v222 := r.Intn(10) - this.FieldL = make([]int64, v222) - for i := 0; i < v222; i++ { - this.FieldL[i] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.FieldL[i] *= -1 - } - } - } - if r.Intn(10) != 0 { - v223 := r.Intn(10) - this.FieldM = make([]bool, v223) - for i := 0; i < v223; i++ { - this.FieldM[i] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v224 := r.Intn(10) - this.FieldN = make([]string, v224) - for i := 0; i < v224; i++ { - this.FieldN[i] = string(randStringThetest(r)) - } - } - if r.Intn(10) != 0 { - v225 := r.Intn(10) - this.FieldO = make([][]byte, v225) - for i := 0; i < v225; i++ { - v226 := r.Intn(100) - this.FieldO[i] = make([]byte, v226) - for j := 0; j < v226; 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 { - v227 := float64(r.Float64()) - if r.Intn(2) == 0 { - v227 *= -1 - } - this.FieldA = &v227 - } - if r.Intn(10) != 0 { - v228 := float32(r.Float32()) - if r.Intn(2) == 0 { - v228 *= -1 - } - this.FieldB = &v228 - } - if r.Intn(10) != 0 { - this.FieldC = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v229 := r.Intn(5) - this.FieldD = make([]*NinOptNative, v229) - for i := 0; i < v229; i++ { - this.FieldD[i] = NewPopulatedNinOptNative(r, easy) - } - } - if r.Intn(10) != 0 { - v230 := uint64(uint64(r.Uint32())) - this.FieldE = &v230 - } - if r.Intn(10) != 0 { - v231 := int32(r.Int31()) - if r.Intn(2) == 0 { - v231 *= -1 - } - this.FieldF = &v231 - } - if r.Intn(10) != 0 { - this.FieldG = NewPopulatedNidOptNative(r, easy) - } - if r.Intn(10) != 0 { - v232 := bool(bool(r.Intn(2) == 0)) - this.FieldH = &v232 - } - if r.Intn(10) != 0 { - v233 := string(randStringThetest(r)) - this.FieldI = &v233 - } - if r.Intn(10) != 0 { - v234 := r.Intn(100) - this.FieldJ = make([]byte, v234) - for i := 0; i < v234; 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 { - v235 := r.Intn(10) - this.FieldC = make([]Uuid, v235) - for i := 0; i < v235; i++ { - v236 := NewPopulatedUuid(r) - this.FieldC[i] = *v236 - } - } - if r.Intn(10) != 0 { - v237 := r.Intn(10) - this.FieldD = make([]github_com_gogo_protobuf_test_custom.Uint128, v237) - for i := 0; i < v237; i++ { - v238 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.FieldD[i] = *v238 - } - } - 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: - v239 := bool(bool(r.Intn(2) == 0)) - this.FieldB = &v239 - } - return this -} - -func NewPopulatedCustomNameEnum(r randyThetest, easy bool) *CustomNameEnum { - this := &CustomNameEnum{} - if r.Intn(10) != 0 { - v240 := TheTestEnum([]int32{0, 1, 2}[r.Intn(3)]) - this.FieldA = &v240 - } - if r.Intn(10) != 0 { - v241 := r.Intn(10) - this.FieldB = make([]TheTestEnum, v241) - for i := 0; i < v241; 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 { - v242 := int64(r.Int63()) - if r.Intn(2) == 0 { - v242 *= -1 - } - this.Field1 = &v242 - } - 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) - 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 { - v243 := string(randStringThetest(r)) - this.Field1 = &v243 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithInner(r randyThetest, easy bool) *UnrecognizedWithInner { - this := &UnrecognizedWithInner{} - if r.Intn(10) != 0 { - v244 := r.Intn(5) - this.Embedded = make([]*UnrecognizedWithInner_Inner, v244) - for i := 0; i < v244; i++ { - this.Embedded[i] = NewPopulatedUnrecognizedWithInner_Inner(r, easy) - } - } - if r.Intn(10) != 0 { - v245 := string(randStringThetest(r)) - this.Field2 = &v245 - } - 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 { - v246 := uint32(r.Uint32()) - this.Field1 = &v246 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUnrecognizedWithEmbed(r randyThetest, easy bool) *UnrecognizedWithEmbed { - this := &UnrecognizedWithEmbed{} - v247 := NewPopulatedUnrecognizedWithEmbed_Embedded(r, easy) - this.UnrecognizedWithEmbed_Embedded = *v247 - if r.Intn(10) != 0 { - v248 := string(randStringThetest(r)) - this.Field2 = &v248 - } - 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 { - v249 := uint32(r.Uint32()) - this.Field1 = &v249 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNode(r randyThetest, easy bool) *Node { - this := &Node{} - if r.Intn(10) != 0 { - v250 := string(randStringThetest(r)) - this.Label = &v250 - } - if r.Intn(10) == 0 { - v251 := r.Intn(5) - this.Children = make([]*Node, v251) - for i := 0; i < v251; i++ { - this.Children[i] = NewPopulatedNode(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 3) - } - return this -} - -func NewPopulatedNonByteCustomType(r randyThetest, easy bool) *NonByteCustomType { - this := &NonByteCustomType{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedT(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidOptNonByteCustomType(r randyThetest, easy bool) *NidOptNonByteCustomType { - this := &NidOptNonByteCustomType{} - v252 := NewPopulatedT(r) - this.Field1 = *v252 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinOptNonByteCustomType(r randyThetest, easy bool) *NinOptNonByteCustomType { - this := &NinOptNonByteCustomType{} - if r.Intn(10) != 0 { - this.Field1 = NewPopulatedT(r) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNidRepNonByteCustomType(r randyThetest, easy bool) *NidRepNonByteCustomType { - this := &NidRepNonByteCustomType{} - if r.Intn(10) != 0 { - v253 := r.Intn(10) - this.Field1 = make([]T, v253) - for i := 0; i < v253; i++ { - v254 := NewPopulatedT(r) - this.Field1[i] = *v254 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedNinRepNonByteCustomType(r randyThetest, easy bool) *NinRepNonByteCustomType { - this := &NinRepNonByteCustomType{} - if r.Intn(10) != 0 { - v255 := r.Intn(10) - this.Field1 = make([]T, v255) - for i := 0; i < v255; i++ { - v256 := NewPopulatedT(r) - this.Field1[i] = *v256 - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - return this -} - -func NewPopulatedProtoType(r randyThetest, easy bool) *ProtoType { - this := &ProtoType{} - if r.Intn(10) != 0 { - v257 := string(randStringThetest(r)) - this.Field2 = &v257 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedThetest(r, 2) - } - 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 { - v258 := r.Intn(100) - tmps := make([]rune, v258) - for i := 0; i < v258; 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)) - v259 := r.Int63() - if r.Intn(2) == 0 { - v259 *= -1 - } - dAtA = encodeVarintPopulateThetest(dAtA, uint64(v259)) - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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 len(m.Field2) > 0 { - for _, e := range m.Field2 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - 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 len(m.Field2) > 0 { - for _, e := range m.Field2 { - n += 1 + sovThetest(uint64(e)) - } - } - if len(m.Field3) > 0 { - for _, e := range m.Field3 { - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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.Field2 != nil { - n += 1 + sovThetest(uint64(*m.Field2)) - } - if m.Field3 != nil { - n += 1 + sovThetest(uint64(*m.Field3)) - } - 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)) - } - n += proto.SizeOfInternalExtension(m) - 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)) - } - n += proto.SizeOfInternalExtension(m) - 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 (m *Node) Size() (n int) { - var l int - _ = l - if m.Label != nil { - l = len(*m.Label) - n += 1 + l + sovThetest(uint64(l)) - } - if len(m.Children) > 0 { - for _, e := range m.Children { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NonByteCustomType) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidOptNonByteCustomType) Size() (n int) { - var l int - _ = l - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinOptNonByteCustomType) Size() (n int) { - var l int - _ = l - if m.Field1 != nil { - l = m.Field1.Size() - n += 1 + l + sovThetest(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NidRepNonByteCustomType) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *NinRepNonByteCustomType) Size() (n int) { - var l int - _ = l - if len(m.Field1) > 0 { - for _, e := range m.Field1 { - l = e.Size() - n += 1 + l + sovThetest(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ProtoType) Size() (n int) { - var l int - _ = 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 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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `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) + `,`, - `Field2:` + fmt.Sprintf("%v", this.Field2) + `,`, - `Field3:` + fmt.Sprintf("%v", this.Field3) + `,`, - `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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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) + `,`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `Field3:` + valueToStringThetest(this.Field3) + `,`, - `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_InternalExtensions:` + proto.StringFromInternalExtension(this) + `,`, - `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_InternalExtensions:` + proto.StringFromInternalExtension(this) + `,`, - `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 (this *Node) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Node{`, - `Label:` + valueToStringThetest(this.Label) + `,`, - `Children:` + strings.Replace(fmt.Sprintf("%v", this.Children), "Node", "Node", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NonByteCustomType{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidOptNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidOptNonByteCustomType{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinOptNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinOptNonByteCustomType{`, - `Field1:` + valueToStringThetest(this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NidRepNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NidRepNonByteCustomType{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *NinRepNonByteCustomType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NinRepNonByteCustomType{`, - `Field1:` + fmt.Sprintf("%v", this.Field1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *ProtoType) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ProtoType{`, - `Field2:` + valueToStringThetest(this.Field2) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Field9 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Field10 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Field11 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - m.Field12 = int64(binary.LittleEndian.Uint64(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 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - 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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 { - 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 { - 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 == 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - 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 { - 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 == 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 { - 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 { - 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 == 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - 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 { - 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 == 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field13", wireType) - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &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 { - 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) - } else 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 0 { - var v YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = append(m.Field2, v) - } else 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 YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = append(m.Field2, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 0 { - var v YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else 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 YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(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) - } - 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 { - 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) - } else 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field1", wireType) - } - case 2: - if wireType == 0 { - var v YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = append(m.Field2, v) - } else 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 YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = append(m.Field2, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - case 3: - if wireType == 0 { - var v YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = append(m.Field3, v) - } else 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 YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(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) - } - 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 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &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 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &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 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - var v YetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field2 = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - var v YetYetAnotherTestEnum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowThetest - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (YetYetAnotherTestEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Field3 = &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 - } - m.Time1 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - m.Time2 = int64(binary.LittleEndian.Uint64(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 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(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - 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 - } - proto.AppendExtension(m, int32(fieldNum), 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 - } - proto.AppendExtension(m, int32(fieldNum), 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 - } - v = uint64(binary.LittleEndian.Uint64(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 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.FieldI = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.FieldJ = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.FieldK = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - m.FieldL = int64(binary.LittleEndian.Uint64(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 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(m.FieldO[:0], dAtA[iNdEx:postIndex]...) - if m.FieldO == nil { - m.FieldO = []byte{} - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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(m.FieldO[:0], dAtA[iNdEx:postIndex]...) - if m.FieldO == nil { - m.FieldO = []byte{} - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.FieldA = append(m.FieldA, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.FieldA = append(m.FieldA, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldA", wireType) - } - case 2: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.FieldB = append(m.FieldB, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.FieldB = append(m.FieldB, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", wireType) - } - case 3: - 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.FieldC = append(m.FieldC, v) - } else 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.FieldC = append(m.FieldC, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldC", wireType) - } - case 4: - 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.FieldD = append(m.FieldD, v) - } else 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.FieldD = append(m.FieldD, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldD", wireType) - } - case 5: - 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.FieldE = append(m.FieldE, v) - } else 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.FieldE = append(m.FieldE, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldE", wireType) - } - case 6: - 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.FieldF = append(m.FieldF, v) - } else 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.FieldF = append(m.FieldF, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldF", wireType) - } - case 7: - 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.FieldG = append(m.FieldG, v) - } else 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.FieldG = append(m.FieldG, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldG", wireType) - } - case 8: - 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.FieldH = append(m.FieldH, int64(v)) - } else 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.FieldH = append(m.FieldH, int64(v)) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldH", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.FieldI = append(m.FieldI, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.FieldI = append(m.FieldI, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldI", wireType) - } - case 10: - if wireType == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.FieldJ = append(m.FieldJ, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.FieldJ = append(m.FieldJ, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldJ", wireType) - } - case 11: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.FieldK = append(m.FieldK, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.FieldK = append(m.FieldK, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldK", wireType) - } - case 12: - if wireType == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.FieldL = append(m.FieldL, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.FieldL = append(m.FieldL, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldL", wireType) - } - case 13: - 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.FieldM = append(m.FieldM, bool(v != 0)) - } else 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.FieldM = append(m.FieldM, bool(v != 0)) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldM", wireType) - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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(m.FieldJ[:0], dAtA[iNdEx:postIndex]...) - if m.FieldJ == nil { - m.FieldJ = []byte{} - } - 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 { - 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) - } else 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field FieldB", 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 *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 - } - proto.AppendExtension(m, int32(fieldNum), 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 (m *Node) Unmarshal(dAtA []byte) 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: Node: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Label", 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.Label = &s - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Children", 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.Children = append(m.Children, &Node{}) - if err := m.Children[len(m.Children)-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 *NonByteCustomType) Unmarshal(dAtA []byte) 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: NonByteCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NonByteCustomType: 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 = &T{} - } - if err := m.Field1.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 *NidOptNonByteCustomType) Unmarshal(dAtA []byte) 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: NidOptNonByteCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidOptNonByteCustomType: 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 - 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 *NinOptNonByteCustomType) Unmarshal(dAtA []byte) 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: NinOptNonByteCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinOptNonByteCustomType: 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 = &T{} - } - if err := m.Field1.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 *NidRepNonByteCustomType) Unmarshal(dAtA []byte) 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: NidRepNonByteCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NidRepNonByteCustomType: 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 - } - m.Field1 = append(m.Field1, T{}) - if err := m.Field1[len(m.Field1)-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 *NinRepNonByteCustomType) Unmarshal(dAtA []byte) 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: NinRepNonByteCustomType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NinRepNonByteCustomType: 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 - } - m.Field1 = append(m.Field1, T{}) - if err := m.Field1[len(m.Field1)-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 *ProtoType) Unmarshal(dAtA []byte) 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: ProtoType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProtoType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - 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 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/thetest.proto", fileDescriptorThetest) } - -var fileDescriptorThetest = []byte{ - // 3088 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x5a, 0x4f, 0x6c, 0x1b, 0xc7, - 0xd5, 0xe7, 0xec, 0x50, 0x0a, 0xf5, 0x24, 0x4b, 0xf4, 0x26, 0x56, 0x16, 0x8c, 0xbe, 0x15, 0xbd, - 0x91, 0xf5, 0x31, 0x44, 0x2c, 0x51, 0x14, 0x25, 0xcb, 0x4c, 0x93, 0x42, 0xfc, 0xe3, 0x46, 0x6e, - 0x44, 0x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x46, 0x19, 0x89, 0x93, 0xe6, 0xa9, 0x74, 0x55, - 0xc1, 0x69, 0x94, 0x19, 0xe3, 0xa4, 0xab, 0x54, 0x5a, 0x50, 0xe2, 0x69, 0x94, 0xc1, 0x9c, 0xb4, - 0x40, 0xa5, 0x6b, 0xca, 0x58, 0x1a, 0x65, 0x2e, 0x71, 0xd2, 0x35, 0x2a, 0x5d, 0x57, 0xc6, 0xd3, - 0x28, 0x13, 0xe7, 0xa4, 0xeb, 0x54, 0x7a, 0x43, 0x79, 0x26, 0x8d, 0x32, 0x97, 0x39, 0xe9, 0x0d, - 0x2a, 0xdd, 0x50, 0x12, 0x69, 0x94, 0x91, 0x39, 0xe9, 0x06, 0x95, 0xde, 0x54, 0x26, 0xd2, 0x28, - 0xf3, 0x0c, 0x27, 0xbd, 0x29, 0xab, 0xf0, 0x8c, 0xf3, 0xe4, 0x39, 0x05, 0xd2, 0x28, 0x33, 0x43, - 0xc4, 0xee, 0xa0, 0x27, 0x5f, 0x51, 0x26, 0xd3, 0x28, 0x33, 0xce, 0xcb, 0x57, 0x3c, 0x79, 0x5e, - 0x99, 0x4a, 0xa3, 0x4c, 0x92, 0x97, 0xe7, 0x3d, 0xf9, 0xaa, 0x72, 0x29, 0x8d, 0x32, 0x09, 0x5e, - 0xbe, 0xea, 0xc9, 0x0b, 0xca, 0x74, 0x1a, 0x65, 0x26, 0x78, 0x79, 0xc1, 0x93, 0xaf, 0x29, 0x33, - 0x69, 0x94, 0x99, 0xe2, 0xe5, 0x6b, 0xda, 0xbb, 0x36, 0xbc, 0x86, 0x07, 0xef, 0x2c, 0x0f, 0x2f, - 0x05, 0x76, 0x96, 0x07, 0x96, 0x42, 0x3a, 0xcb, 0x43, 0x4a, 0xc1, 0x9c, 0xe5, 0xc1, 0xa4, 0x30, - 0xce, 0xf2, 0x30, 0x52, 0x00, 0x67, 0x79, 0x00, 0x29, 0x74, 0xb3, 0x3c, 0x74, 0x14, 0xb4, 0x59, - 0x1e, 0x34, 0x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x9c, 0x00, 0xbb, 0xa1, 0xf6, 0x91, 0x68, 0xff, 0x07, 0xe0, 0xc5, - 0x55, 0x9e, 0x81, 0xc9, 0xdd, 0x7b, 0x77, 0xaa, 0x3f, 0xa8, 0x55, 0xdf, 0xdc, 0xad, 0x56, 0x92, - 0x48, 0xfb, 0x03, 0x82, 0x49, 0xd2, 0xb6, 0xee, 0x75, 0x8e, 0x74, 0xb9, 0x04, 0x68, 0x93, 0xf0, - 0xe1, 0xe9, 0xfc, 0x46, 0x9b, 0xf2, 0x32, 0xa0, 0x52, 0x74, 0xa8, 0x51, 0x49, 0xce, 0x03, 0x2a, - 0x13, 0x80, 0xa3, 0x21, 0x83, 0xca, 0xda, 0xbf, 0x30, 0x3c, 0xcb, 0xb6, 0xd1, 0x6e, 0x3d, 0xb9, - 0xca, 0x7f, 0x37, 0x15, 0x27, 0x56, 0xf2, 0xab, 0x85, 0x25, 0xeb, 0x1f, 0x4a, 0x49, 0x8d, 0xff, - 0x84, 0x2a, 0x02, 0x55, 0x59, 0x09, 0xba, 0x27, 0x52, 0x8c, 0x33, 0x33, 0x0c, 0xdc, 0x13, 0xe1, - 0xa4, 0x03, 0xf7, 0x44, 0x38, 0xe9, 0xc0, 0x3d, 0x11, 0x4e, 0x3a, 0x70, 0x16, 0xc0, 0x49, 0x07, - 0xee, 0x89, 0x70, 0xd2, 0x81, 0x7b, 0x22, 0x9c, 0x74, 0xf0, 0x9e, 0x08, 0x11, 0x07, 0xde, 0x13, - 0xe1, 0xe5, 0x83, 0xf7, 0x44, 0x78, 0xf9, 0xe0, 0x3d, 0x91, 0x62, 0xdc, 0xec, 0x1e, 0xeb, 0xc1, - 0xa7, 0x0e, 0xbc, 0xfd, 0xb0, 0x8f, 0x40, 0xaf, 0x02, 0xef, 0xc0, 0x8c, 0xb3, 0x21, 0x51, 0xee, - 0x18, 0x66, 0xa3, 0x6d, 0xe8, 0x5d, 0xf9, 0x1b, 0x30, 0xe5, 0x0c, 0x39, 0x9f, 0x39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 0xa1, 0x9c, 0x26, 0x50, 0x0e, 0x7c, 0xe8, 0xa6, 0x09, 0x74, 0x03, 0x1f, 0xaa, 0x69, 0x02, - 0xd5, 0xc0, 0x87, 0x66, 0x9a, 0x40, 0x33, 0xf0, 0xa1, 0x98, 0x26, 0x50, 0x0c, 0x7c, 0xe8, 0xa5, - 0x09, 0xf4, 0x02, 0x1f, 0x6a, 0x2d, 0x88, 0xd4, 0x02, 0x3f, 0x5a, 0x2d, 0x88, 0xb4, 0x02, 0x3f, - 0x4a, 0xbd, 0x28, 0x52, 0x6a, 0xa2, 0x7f, 0x3a, 0x3f, 0x66, 0x0d, 0x31, 0x6c, 0x5a, 0x10, 0xd9, - 0x04, 0x7e, 0x4c, 0x5a, 0x10, 0x99, 0x04, 0x7e, 0x2c, 0x5a, 0x10, 0x59, 0x04, 0x7e, 0x0c, 0x7a, - 0x2c, 0x32, 0xc8, 0xbb, 0xe3, 0xa3, 0x09, 0x47, 0x8a, 0x61, 0x0c, 0xc2, 0x11, 0x18, 0x84, 0x23, - 0x30, 0x08, 0x47, 0x60, 0x10, 0x8e, 0xc0, 0x20, 0x1c, 0x81, 0x41, 0x38, 0x02, 0x83, 0x70, 0x04, - 0x06, 0xe1, 0x28, 0x0c, 0xc2, 0x91, 0x18, 0x84, 0x83, 0x18, 0xb4, 0x20, 0xde, 0x78, 0x00, 0xbf, - 0x82, 0xb4, 0x20, 0x1e, 0x7d, 0x86, 0x53, 0x08, 0x47, 0xa2, 0x10, 0x0e, 0xa2, 0xd0, 0x47, 0x18, - 0x9e, 0xe5, 0x28, 0x44, 0xce, 0x87, 0x2e, 0xaa, 0x02, 0xad, 0x47, 0xb8, 0x60, 0xe1, 0xc7, 0xa9, - 0xf5, 0x08, 0x87, 0xd4, 0xc3, 0x78, 0x36, 0x58, 0x85, 0xaa, 0x11, 0xaa, 0xd0, 0x2d, 0xca, 0xa1, - 0xf5, 0x08, 0x17, 0x2f, 0x06, 0xb9, 0xb7, 0x31, 0xac, 0x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, 0xe4, 0x6a, 0x15, 0xcb, 0xc4, - 0xa0, 0x14, 0x68, 0x10, 0x1c, 0x25, 0xd7, 0xb2, 0xf8, 0x3a, 0x99, 0xa4, 0x1c, 0x38, 0x49, 0x48, - 0xa8, 0x5c, 0xf3, 0xd2, 0xee, 0xc9, 0x99, 0x1a, 0x7b, 0x72, 0xa6, 0xc6, 0xfe, 0x71, 0xa6, 0xc6, - 0x3e, 0x39, 0x53, 0xd1, 0x67, 0x67, 0x2a, 0xfa, 0xfc, 0x4c, 0x45, 0x5f, 0x9c, 0xa9, 0xe8, 0x9d, - 0xbe, 0x8a, 0x3e, 0xe8, 0xab, 0xe8, 0xc3, 0xbe, 0x8a, 0xfe, 0xd8, 0x57, 0xd1, 0xe3, 0xbe, 0x8a, - 0x4e, 0xfa, 0x6a, 0xec, 0x49, 0x5f, 0x45, 0x9f, 0xf4, 0x55, 0xf4, 0x59, 0x5f, 0x8d, 0x7d, 0xde, - 0x57, 0xd1, 0x17, 0x7d, 0x35, 0xf6, 0xce, 0xa7, 0x6a, 0xec, 0xd1, 0xa7, 0x6a, 0xec, 0x83, 0x4f, - 0x55, 0xf4, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xf6, 0x66, 0xae, 0x4e, 0x36, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto deleted file mode 100644 index af269a3be..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetest.proto +++ /dev/null @@ -1,649 +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 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.protosizer_all) = false; - -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; - -option (gogoproto.compare_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; -} - -enum AnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - D = 10; - E = 11; -} - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -enum YetAnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = false; - AA = 0; - BB = 1 [(gogoproto.enumvalue_customname) = "BetterYetBB"]; -} - -// YetAnotherTestEnum is used to test cross-package import of custom name -// fields and default resolution. -enum YetYetAnotherTestEnum { - option (gogoproto.goproto_enum_prefix) = true; - CC = 0; - DD = 1 [(gogoproto.enumvalue_customname) = "BetterYetDD"]; -} - -message NidOptEnum { - optional TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; -} - -message NinOptEnum { - optional TheTestEnum Field1 = 1; - optional YetAnotherTestEnum Field2 = 2; - optional YetYetAnotherTestEnum Field3 = 3; -} - -message NidRepEnum { - repeated TheTestEnum Field1 = 1 [(gogoproto.nullable) = false]; - repeated YetAnotherTestEnum Field2 = 2 [(gogoproto.nullable) = false]; - repeated YetYetAnotherTestEnum Field3 = 3 [(gogoproto.nullable) = false]; -} - -message NinRepEnum { - repeated TheTestEnum Field1 = 1; - repeated YetAnotherTestEnum Field2 = 2; - repeated YetYetAnotherTestEnum Field3 = 3; -} - -message NinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional TheTestEnum Field1 = 1 [default=C]; - optional YetAnotherTestEnum Field2 = 2 [default=BB]; - optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; -} - -message AnotherNinOptEnum { - optional AnotherTestEnum Field1 = 1; - optional YetAnotherTestEnum Field2 = 2; - optional YetYetAnotherTestEnum Field3 = 3; -} - -message AnotherNinOptEnumDefault { - option (gogoproto.goproto_getters) = true; - option (gogoproto.face) = false; - optional AnotherTestEnum Field1 = 1 [default=E]; - optional YetAnotherTestEnum Field2 = 2 [default=BB]; - optional YetYetAnotherTestEnum Field3 = 3 [default=CC]; -} - - -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; - repeated int64 FieldD = 104; - repeated NinOptNative FieldE = 105; -} - -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; -} - -message Node { - optional string Label = 1; - repeated Node Children = 2; -} - -message NonByteCustomType { - optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; -} - -message NidOptNonByteCustomType { - optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; -} - -message NinOptNonByteCustomType { - optional ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; -} - -message NidRepNonByteCustomType { - repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T", (gogoproto.nullable) = false]; -} - -message NinRepNonByteCustomType { - repeated ProtoType Field1 = 1 [(gogoproto.customtype) = "T"]; -} - -message ProtoType { - optional string Field2 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go deleted file mode 100644 index d851b45ad..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/thetestpb_test.go +++ /dev/null @@ -1,16045 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/thetest.proto - -/* -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 - Node - NonByteCustomType - NidOptNonByteCustomType - NinOptNonByteCustomType - NidRepNonByteCustomType - NinRepNonByteCustomType - ProtoType -*/ -package test - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNodeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNode(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Node{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkProtoTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomDashCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomDash(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOrBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOrBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestADeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedADeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndDeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndDeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNilCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNil(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTimerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTimer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestMyExtendableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedMyExtendable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOtherExtenableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOtherExtenable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinitionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessageCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedScopeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedScope(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomContainerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomContainer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNoExtensionsMapCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNoExtensionsMap(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognized(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNodeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNode(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestProtoTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNilGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestProtoTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNodeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestProtoTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go b/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go deleted file mode 100644 index ae349da4a..000000000 --- a/vendor/github.com/gogo/protobuf/test/combos/unmarshaler/uuid.go +++ /dev/null @@ -1,133 +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 test - -import ( - "bytes" - "encoding/hex" - "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) { - s := hex.EncodeToString([]byte(uuid)) - return json.Marshal(s) -} - -func (uuid *Uuid) UnmarshalJSON(data []byte) error { - var s string - err := json.Unmarshal(data, &s) - if err != nil { - return err - } - d, err := hex.DecodeString(s) - if err != nil { - return err - } - *uuid = Uuid(d) - return nil -} - -func (uuid Uuid) Equal(other Uuid) bool { - return bytes.Equal(uuid[0:], other[0:]) -} - -func (uuid Uuid) Compare(other Uuid) int { - return bytes.Compare(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/github.com/gogo/protobuf/test/custom/custom_test.go b/vendor/github.com/gogo/protobuf/test/custom/custom_test.go deleted file mode 100644 index d4fe7bd48..000000000 --- a/vendor/github.com/gogo/protobuf/test/custom/custom_test.go +++ /dev/null @@ -1,43 +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 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/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile deleted file mode 100644 index ecb3e74ea..000000000 --- a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go deleted file mode 100644 index 2e29d2a0f..000000000 --- a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/custombytesnonstruct_test.go +++ /dev/null @@ -1,34 +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 custombytesnonstruct - -import testing "testing" - -func TestCustomBytesNonStruct(t *testing.T) { -} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go deleted file mode 100644 index 02d0905b8..000000000 --- a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/customtype.go +++ /dev/null @@ -1,36 +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 custombytesnonstruct - -type CustomType int - -func (c *CustomType) Unmarshal(data []byte) error { - data[0] = 42 - return nil -} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go deleted file mode 100644 index 222849dc1..000000000 --- a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.pb.go +++ /dev/null @@ -1,281 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto.proto - -/* - 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 - -// 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 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 (*Object) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } - -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") -) - -func init() { proto.RegisterFile("proto.proto", fileDescriptorProto) } - -var fileDescriptorProto = []byte{ - // 147 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x03, 0x93, 0x42, 0x22, 0xc9, 0xa5, 0xc5, 0x25, 0xf9, 0xb9, 0x49, 0x95, 0x25, 0xa9, - 0xc5, 0x79, 0xf9, 0x79, 0xc5, 0x25, 0x45, 0xa5, 0xc9, 0x25, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, - 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xc5, 0x49, 0xa5, - 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x0c, 0x51, 0x2a, 0xe0, 0x62, 0xf3, 0x4f, 0xca, 0x4a, - 0x4d, 0x2e, 0x11, 0x32, 0xe2, 0xe2, 0x71, 0x06, 0x1b, 0xe8, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x28, - 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe3, 0xc4, 0x77, 0xeb, 0x9e, 0x3c, 0x17, 0x44, 0x3c, 0xa4, 0xb2, - 0x20, 0x35, 0x08, 0x45, 0x0d, 0x9a, 0x1e, 0x23, 0x09, 0x26, 0x05, 0x66, 0x02, 0x7a, 0x8c, 0x9c, - 0x58, 0x2e, 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xc6, 0xf3, 0xe3, 0xca, - 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto b/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto deleted file mode 100644 index 343b457a7..000000000 --- a/vendor/github.com/gogo/protobuf/test/custombytesnonstruct/proto.proto +++ /dev/null @@ -1,39 +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 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/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto b/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto deleted file mode 100644 index 90efda369..000000000 --- a/vendor/github.com/gogo/protobuf/test/dashfilename/dash-filename.proto +++ /dev/null @@ -1,38 +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 dashfilename; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; - -message test { - -} diff --git a/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go b/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go deleted file mode 100644 index 6266b21bc..000000000 --- a/vendor/github.com/gogo/protobuf/test/dashfilename/df_test.go +++ /dev/null @@ -1,48 +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 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/github.com/gogo/protobuf/test/dashfilename/doc.go b/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go deleted file mode 100644 index b288f33e7..000000000 --- a/vendor/github.com/gogo/protobuf/test/dashfilename/doc.go +++ /dev/null @@ -1 +0,0 @@ -package dashfilename diff --git a/vendor/github.com/gogo/protobuf/test/data/Makefile b/vendor/github.com/gogo/protobuf/test/data/Makefile deleted file mode 100644 index eeb3f5091..000000000 --- a/vendor/github.com/gogo/protobuf/test/data/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2016, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. \ - --proto_path=../../../../../:../../protobuf/:. data.proto diff --git a/vendor/github.com/gogo/protobuf/test/data/data.pb.go b/vendor/github.com/gogo/protobuf/test/data/data.pb.go deleted file mode 100644 index be3c41e12..000000000 --- a/vendor/github.com/gogo/protobuf/test/data/data.pb.go +++ /dev/null @@ -1,466 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: data.proto - -/* -Package data is a generated protocol buffer package. - -It is generated from these files: - data.proto - -It has these top-level messages: - MyMessage -*/ -package data - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -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 - -// 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 MyMessage struct { - MyData uint32 `protobuf:"varint,1,opt,name=my_data,json=myData,proto3" json:"my_data,omitempty"` -} - -func (m *MyMessage) Reset() { *m = MyMessage{} } -func (*MyMessage) ProtoMessage() {} -func (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptorData, []int{0} } - -func (m *MyMessage) GetMyData() uint32 { - if m != nil { - return m.MyData - } - return 0 -} - -func init() { - proto.RegisterType((*MyMessage)(nil), "data.MyMessage") -} -func (this *MyMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MyMessage) - if !ok { - that2, ok := that.(MyMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MyMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MyMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MyMessage but is not nil && this == nil") - } - if this.MyData != that1.MyData { - return fmt.Errorf("MyData this(%v) Not Equal that(%v)", this.MyData, that1.MyData) - } - return nil -} -func (this *MyMessage) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MyMessage) - if !ok { - that2, ok := that.(MyMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MyData != that1.MyData { - return false - } - return true -} -func (this *MyMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&data.MyMessage{") - s = append(s, "MyData: "+fmt.Sprintf("%#v", this.MyData)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringData(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 *MyMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MyMessage) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.MyData != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintData(dAtA, i, uint64(m.MyData)) - } - return i, nil -} - -func encodeVarintData(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 NewPopulatedMyMessage(r randyData, easy bool) *MyMessage { - this := &MyMessage{} - this.MyData = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyData interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneData(r randyData) 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 randStringData(r randyData) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneData(r) - } - return string(tmps) -} -func randUnrecognizedData(r randyData, 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 = randFieldData(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldData(dAtA []byte, r randyData, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateData(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateData(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateData(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 = encodeVarintPopulateData(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateData(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateData(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 encodeVarintPopulateData(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 *MyMessage) Size() (n int) { - var l int - _ = l - if m.MyData != 0 { - n += 1 + sovData(uint64(m.MyData)) - } - return n -} - -func sovData(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozData(x uint64) (n int) { - return sovData(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MyMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MyMessage{`, - `MyData:` + fmt.Sprintf("%v", this.MyData) + `,`, - `}`, - }, "") - return s -} -func valueToStringData(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *MyMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MyMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MyMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MyData", wireType) - } - m.MyData = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowData - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MyData |= (uint32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipData(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthData - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipData(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, ErrIntOverflowData - } - 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, ErrIntOverflowData - } - 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, ErrIntOverflowData - } - 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, ErrInvalidLengthData - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowData - } - 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 := skipData(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 ( - ErrInvalidLengthData = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowData = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("data.proto", fileDescriptorData) } - -var fileDescriptorData = []byte{ - // 160 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4a, 0x49, 0x2c, 0x49, - 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, - 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, - 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0xa9, 0x70, 0x71, 0xfa, 0x56, 0xfa, 0xa6, - 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x0a, 0x89, 0x73, 0xb1, 0xe7, 0x56, 0xc6, 0x83, 0x8c, 0x91, 0x60, - 0x54, 0x60, 0xd4, 0xe0, 0x0d, 0x62, 0xcb, 0xad, 0x74, 0x49, 0x2c, 0x49, 0x74, 0xd2, 0xb9, 0xf1, - 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, - 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x8e, 0x47, 0x72, 0x8c, 0x07, 0x1e, 0xc9, 0x31, - 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x49, 0x6c, 0x60, - 0xa3, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x4f, 0xfb, 0xa7, 0x9d, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/data/data.proto b/vendor/github.com/gogo/protobuf/test/data/data.proto deleted file mode 100644 index ff6dcd30b..000000000 --- a/vendor/github.com/gogo/protobuf/test/data/data.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package data; - -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 MyMessage { - uint32 my_data = 1; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/data/datapb_test.go b/vendor/github.com/gogo/protobuf/test/data/datapb_test.go deleted file mode 100644 index d9f656a39..000000000 --- a/vendor/github.com/gogo/protobuf/test/data/datapb_test.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: data.proto - -/* -Package data is a generated protocol buffer package. - -It is generated from these files: - data.proto - -It has these top-level messages: - MyMessage -*/ -package data - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestMyMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMyMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyMessage(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMyMessageProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MyMessage, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMyMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMyMessageProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMyMessage(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MyMessage{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyMessage{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMyMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MyMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MyMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMyMessageVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMyMessageGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMyMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMyMessageSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MyMessage, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMyMessage(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMyMessageStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyMessage(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/github.com/gogo/protobuf/test/defaultconflict/df.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto deleted file mode 100644 index 9ec763d32..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/df.proto +++ /dev/null @@ -1,40 +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 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/github.com/gogo/protobuf/test/defaultconflict/dg.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto deleted file mode 100644 index 2d251e278..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/dg.proto +++ /dev/null @@ -1,39 +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 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/github.com/gogo/protobuf/test/defaultconflict/doc.go b/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go deleted file mode 100644 index 9762d2038..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/doc.go +++ /dev/null @@ -1 +0,0 @@ -package defaultcheck diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto deleted file mode 100644 index 6bddd0794..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc.proto +++ /dev/null @@ -1,37 +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 defaultcheck; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -message A { - optional int64 Field1 = 1 [default = 1234, (gogoproto.nullable) = false];; -} - diff --git a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go b/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go deleted file mode 100644 index 522ce9c1c..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/nc_test.go +++ /dev/null @@ -1,68 +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 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/github.com/gogo/protobuf/test/defaultconflict/ne.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto deleted file mode 100644 index c5664d7a1..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/ne.proto +++ /dev/null @@ -1,42 +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 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/github.com/gogo/protobuf/test/defaultconflict/nx.proto b/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto deleted file mode 100644 index 1f074e337..000000000 --- a/vendor/github.com/gogo/protobuf/test/defaultconflict/nx.proto +++ /dev/null @@ -1,41 +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 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/github.com/gogo/protobuf/test/embedconflict/.gitignore b/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore deleted file mode 100644 index c61a5e8b0..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pb.go diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go b/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go deleted file mode 100644 index 484e94831..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/doc.go +++ /dev/null @@ -1 +0,0 @@ -package embedconflict diff --git a/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto deleted file mode 100644 index 80bedac67..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/eb.proto +++ /dev/null @@ -1,38 +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 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/github.com/gogo/protobuf/test/embedconflict/ec.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto deleted file mode 100644 index cbf0cd4cf..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/ec.proto +++ /dev/null @@ -1,40 +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 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/github.com/gogo/protobuf/test/embedconflict/ec_test.go b/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go deleted file mode 100644 index 94e0e2573..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/ec_test.go +++ /dev/null @@ -1,119 +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 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/github.com/gogo/protobuf/test/embedconflict/ee.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto deleted file mode 100644 index 9f5bc38cb..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/ee.proto +++ /dev/null @@ -1,41 +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 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/github.com/gogo/protobuf/test/embedconflict/em.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto deleted file mode 100644 index f03c1dcd5..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/em.proto +++ /dev/null @@ -1,42 +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 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/github.com/gogo/protobuf/test/embedconflict/en.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto deleted file mode 100644 index c11bfd629..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/en.proto +++ /dev/null @@ -1,40 +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 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/github.com/gogo/protobuf/test/embedconflict/er.proto b/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto deleted file mode 100644 index da89a622b..000000000 --- a/vendor/github.com/gogo/protobuf/test/embedconflict/er.proto +++ /dev/null @@ -1,41 +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 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/github.com/gogo/protobuf/test/empty-issue70/Makefile b/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile deleted file mode 100644 index 770f107ce..000000000 --- a/vendor/github.com/gogo/protobuf/test/empty-issue70/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. empty.proto) diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go deleted file mode 100644 index 1f6919aa5..000000000 --- a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.pb.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: empty.proto - -/* -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 - -// 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 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 (*TestRequest) Descriptor() ([]byte, []int) { return fileDescriptorEmpty, []int{0} } - -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") -) - -func init() { proto.RegisterFile("empty.proto", fileDescriptorEmpty) } - -var fileDescriptorEmpty = []byte{ - // 92 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28, - 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, - 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, - 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xf1, 0x72, 0x71, 0x87, 0xa4, 0x16, - 0x97, 0x04, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x38, 0xb1, 0x5c, 0x78, 0x24, 0xc7, 0x08, 0x08, - 0x00, 0x00, 0xff, 0xff, 0x0e, 0xe3, 0x23, 0x3d, 0x58, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto deleted file mode 100644 index eacfded1f..000000000 --- a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty.proto +++ /dev/null @@ -1,39 +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 empty; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.unmarshaler_all) = true; - -message TestRequest { - -} diff --git a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go b/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go deleted file mode 100644 index 19e12c215..000000000 --- a/vendor/github.com/gogo/protobuf/test/empty-issue70/empty_test.go +++ /dev/null @@ -1,37 +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 empty - -import ( - "testing" -) - -func TestEmpty(t *testing.T) { - -} diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile b/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile deleted file mode 100644 index b5da30775..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumcustomname/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumcustomname.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go deleted file mode 100644 index a5afb52f8..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.pb.go +++ /dev/null @@ -1,312 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumcustomname.proto - -/* - Package enumcustomname is a generated protocol buffer package. - - Package enumcustomname tests the behavior of enum_customname and - enumvalue_customname extensions. - - It is generated from these files: - enumcustomname.proto - - It has these top-level messages: - OnlyEnums -*/ -package enumcustomname - -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" - -import strconv "strconv" - -// 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 MyCustomEnum int32 - -const ( - // The following field will take on the custom name and the prefix, joined - // by an underscore. - MyCustomEnum_MyBetterNameA MyCustomEnum = 0 - MyCustomEnum_B MyCustomEnum = 1 -) - -var MyCustomEnum_name = map[int32]string{ - 0: "A", - 1: "B", -} -var MyCustomEnum_value = map[string]int32{ - "A": 0, - "B": 1, -} - -func (x MyCustomEnum) Enum() *MyCustomEnum { - p := new(MyCustomEnum) - *p = x - return p -} -func (x MyCustomEnum) String() string { - return proto.EnumName(MyCustomEnum_name, int32(x)) -} -func (x *MyCustomEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyCustomEnum_value, data, "MyCustomEnum") - if err != nil { - return err - } - *x = MyCustomEnum(value) - return nil -} -func (MyCustomEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumcustomname, []int{0} } - -type MyCustomUnprefixedEnum int32 - -const ( - MyBetterNameUnprefixedA MyCustomUnprefixedEnum = 0 - UNPREFIXED_B MyCustomUnprefixedEnum = 1 -) - -var MyCustomUnprefixedEnum_name = map[int32]string{ - 0: "UNPREFIXED_A", - 1: "UNPREFIXED_B", -} -var MyCustomUnprefixedEnum_value = map[string]int32{ - "UNPREFIXED_A": 0, - "UNPREFIXED_B": 1, -} - -func (x MyCustomUnprefixedEnum) Enum() *MyCustomUnprefixedEnum { - p := new(MyCustomUnprefixedEnum) - *p = x - return p -} -func (x MyCustomUnprefixedEnum) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MyCustomUnprefixedEnum_name, int32(x)) -} -func (x *MyCustomUnprefixedEnum) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyCustomUnprefixedEnum_value, data, "MyCustomUnprefixedEnum") - if err != nil { - return err - } - *x = MyCustomUnprefixedEnum(value) - return nil -} -func (MyCustomUnprefixedEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptorEnumcustomname, []int{1} -} - -type MyEnumWithEnumStringer int32 - -const ( - MyEnumWithEnumStringer_EnumValueStringerA MyEnumWithEnumStringer = 0 - MyEnumWithEnumStringer_STRINGER_B MyEnumWithEnumStringer = 1 -) - -var MyEnumWithEnumStringer_name = map[int32]string{ - 0: "STRINGER_A", - 1: "STRINGER_B", -} -var MyEnumWithEnumStringer_value = map[string]int32{ - "STRINGER_A": 0, - "STRINGER_B": 1, -} - -func (x MyEnumWithEnumStringer) Enum() *MyEnumWithEnumStringer { - p := new(MyEnumWithEnumStringer) - *p = x - return p -} -func (x MyEnumWithEnumStringer) MarshalJSON() ([]byte, error) { - return proto.MarshalJSONEnum(MyEnumWithEnumStringer_name, int32(x)) -} -func (x *MyEnumWithEnumStringer) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(MyEnumWithEnumStringer_value, data, "MyEnumWithEnumStringer") - if err != nil { - return err - } - *x = MyEnumWithEnumStringer(value) - return nil -} -func (MyEnumWithEnumStringer) EnumDescriptor() ([]byte, []int) { - return fileDescriptorEnumcustomname, []int{2} -} - -type OnlyEnums struct { - MyEnum *MyCustomEnum `protobuf:"varint,1,opt,name=my_enum,json=myEnum,enum=enumcustomname.MyCustomEnum" json:"my_enum,omitempty"` - MyEnumDefaultA *MyCustomEnum `protobuf:"varint,2,opt,name=my_enum_default_a,json=myEnumDefaultA,enum=enumcustomname.MyCustomEnum,def=0" json:"my_enum_default_a,omitempty"` - MyEnumDefaultB *MyCustomEnum `protobuf:"varint,3,opt,name=my_enum_default_b,json=myEnumDefaultB,enum=enumcustomname.MyCustomEnum,def=1" json:"my_enum_default_b,omitempty"` - MyUnprefixedEnum *MyCustomUnprefixedEnum `protobuf:"varint,4,opt,name=my_unprefixed_enum,json=myUnprefixedEnum,enum=enumcustomname.MyCustomUnprefixedEnum" json:"my_unprefixed_enum,omitempty"` - MyUnprefixedEnumDefaultA *MyCustomUnprefixedEnum `protobuf:"varint,5,opt,name=my_unprefixed_enum_default_a,json=myUnprefixedEnumDefaultA,enum=enumcustomname.MyCustomUnprefixedEnum,def=0" json:"my_unprefixed_enum_default_a,omitempty"` - MyUnprefixedEnumDefaultB *MyCustomUnprefixedEnum `protobuf:"varint,6,opt,name=my_unprefixed_enum_default_b,json=myUnprefixedEnumDefaultB,enum=enumcustomname.MyCustomUnprefixedEnum,def=1" json:"my_unprefixed_enum_default_b,omitempty"` - YetAnotherTestEnum *test.YetAnotherTestEnum `protobuf:"varint,7,opt,name=yet_another_test_enum,json=yetAnotherTestEnum,enum=test.YetAnotherTestEnum" json:"yet_another_test_enum,omitempty"` - YetAnotherTestEnumDefaultAa *test.YetAnotherTestEnum `protobuf:"varint,8,opt,name=yet_another_test_enum_default_aa,json=yetAnotherTestEnumDefaultAa,enum=test.YetAnotherTestEnum,def=0" json:"yet_another_test_enum_default_aa,omitempty"` - YetAnotherTestEnumDefaultBb *test.YetAnotherTestEnum `protobuf:"varint,9,opt,name=yet_another_test_enum_default_bb,json=yetAnotherTestEnumDefaultBb,enum=test.YetAnotherTestEnum,def=1" json:"yet_another_test_enum_default_bb,omitempty"` - YetYetAnotherTestEnum *test.YetYetAnotherTestEnum `protobuf:"varint,10,opt,name=yet_yet_another_test_enum,json=yetYetAnotherTestEnum,enum=test.YetYetAnotherTestEnum" json:"yet_yet_another_test_enum,omitempty"` - YetYetAnotherTestEnumDefaultCc *test.YetYetAnotherTestEnum `protobuf:"varint,11,opt,name=yet_yet_another_test_enum_default_cc,json=yetYetAnotherTestEnumDefaultCc,enum=test.YetYetAnotherTestEnum,def=0" json:"yet_yet_another_test_enum_default_cc,omitempty"` - YetYetAnotherTestEnumDefaultDd *test.YetYetAnotherTestEnum `protobuf:"varint,12,opt,name=yet_yet_another_test_enum_default_dd,json=yetYetAnotherTestEnumDefaultDd,enum=test.YetYetAnotherTestEnum,def=1" json:"yet_yet_another_test_enum_default_dd,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OnlyEnums) Reset() { *m = OnlyEnums{} } -func (m *OnlyEnums) String() string { return proto.CompactTextString(m) } -func (*OnlyEnums) ProtoMessage() {} -func (*OnlyEnums) Descriptor() ([]byte, []int) { return fileDescriptorEnumcustomname, []int{0} } - -const Default_OnlyEnums_MyEnumDefaultA MyCustomEnum = MyCustomEnum_MyBetterNameA -const Default_OnlyEnums_MyEnumDefaultB MyCustomEnum = MyCustomEnum_B -const Default_OnlyEnums_MyUnprefixedEnumDefaultA MyCustomUnprefixedEnum = MyBetterNameUnprefixedA -const Default_OnlyEnums_MyUnprefixedEnumDefaultB MyCustomUnprefixedEnum = UNPREFIXED_B -const Default_OnlyEnums_YetAnotherTestEnumDefaultAa test.YetAnotherTestEnum = test.AA -const Default_OnlyEnums_YetAnotherTestEnumDefaultBb test.YetAnotherTestEnum = test.BetterYetBB -const Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_CC -const Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd test.YetYetAnotherTestEnum = test.YetYetAnotherTestEnum_BetterYetDD - -func (m *OnlyEnums) GetMyEnum() MyCustomEnum { - if m != nil && m.MyEnum != nil { - return *m.MyEnum - } - return MyCustomEnum_MyBetterNameA -} - -func (m *OnlyEnums) GetMyEnumDefaultA() MyCustomEnum { - if m != nil && m.MyEnumDefaultA != nil { - return *m.MyEnumDefaultA - } - return Default_OnlyEnums_MyEnumDefaultA -} - -func (m *OnlyEnums) GetMyEnumDefaultB() MyCustomEnum { - if m != nil && m.MyEnumDefaultB != nil { - return *m.MyEnumDefaultB - } - return Default_OnlyEnums_MyEnumDefaultB -} - -func (m *OnlyEnums) GetMyUnprefixedEnum() MyCustomUnprefixedEnum { - if m != nil && m.MyUnprefixedEnum != nil { - return *m.MyUnprefixedEnum - } - return MyBetterNameUnprefixedA -} - -func (m *OnlyEnums) GetMyUnprefixedEnumDefaultA() MyCustomUnprefixedEnum { - if m != nil && m.MyUnprefixedEnumDefaultA != nil { - return *m.MyUnprefixedEnumDefaultA - } - return Default_OnlyEnums_MyUnprefixedEnumDefaultA -} - -func (m *OnlyEnums) GetMyUnprefixedEnumDefaultB() MyCustomUnprefixedEnum { - if m != nil && m.MyUnprefixedEnumDefaultB != nil { - return *m.MyUnprefixedEnumDefaultB - } - return Default_OnlyEnums_MyUnprefixedEnumDefaultB -} - -func (m *OnlyEnums) GetYetAnotherTestEnum() test.YetAnotherTestEnum { - if m != nil && m.YetAnotherTestEnum != nil { - return *m.YetAnotherTestEnum - } - return test.AA -} - -func (m *OnlyEnums) GetYetAnotherTestEnumDefaultAa() test.YetAnotherTestEnum { - if m != nil && m.YetAnotherTestEnumDefaultAa != nil { - return *m.YetAnotherTestEnumDefaultAa - } - return Default_OnlyEnums_YetAnotherTestEnumDefaultAa -} - -func (m *OnlyEnums) GetYetAnotherTestEnumDefaultBb() test.YetAnotherTestEnum { - if m != nil && m.YetAnotherTestEnumDefaultBb != nil { - return *m.YetAnotherTestEnumDefaultBb - } - return Default_OnlyEnums_YetAnotherTestEnumDefaultBb -} - -func (m *OnlyEnums) GetYetYetAnotherTestEnum() test.YetYetAnotherTestEnum { - if m != nil && m.YetYetAnotherTestEnum != nil { - return *m.YetYetAnotherTestEnum - } - return test.YetYetAnotherTestEnum_CC -} - -func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultCc() test.YetYetAnotherTestEnum { - if m != nil && m.YetYetAnotherTestEnumDefaultCc != nil { - return *m.YetYetAnotherTestEnumDefaultCc - } - return Default_OnlyEnums_YetYetAnotherTestEnumDefaultCc -} - -func (m *OnlyEnums) GetYetYetAnotherTestEnumDefaultDd() test.YetYetAnotherTestEnum { - if m != nil && m.YetYetAnotherTestEnumDefaultDd != nil { - return *m.YetYetAnotherTestEnumDefaultDd - } - return Default_OnlyEnums_YetYetAnotherTestEnumDefaultDd -} - -func init() { - proto.RegisterType((*OnlyEnums)(nil), "enumcustomname.OnlyEnums") - proto.RegisterEnum("enumcustomname.MyCustomEnum", MyCustomEnum_name, MyCustomEnum_value) - proto.RegisterEnum("enumcustomname.MyCustomUnprefixedEnum", MyCustomUnprefixedEnum_name, MyCustomUnprefixedEnum_value) - proto.RegisterEnum("enumcustomname.MyEnumWithEnumStringer", MyEnumWithEnumStringer_name, MyEnumWithEnumStringer_value) -} -func (x MyEnumWithEnumStringer) String() string { - s, ok := MyEnumWithEnumStringer_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} - -func init() { proto.RegisterFile("enumcustomname.proto", fileDescriptorEnumcustomname) } - -var fileDescriptorEnumcustomname = []byte{ - // 551 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x4f, 0x8f, 0xd2, 0x40, - 0x18, 0xc6, 0x29, 0xba, 0x2c, 0x3b, 0x22, 0xe9, 0x4e, 0x14, 0x47, 0x30, 0x4d, 0xb3, 0x31, 0xc6, - 0x60, 0x16, 0x12, 0x8f, 0x78, 0x9a, 0x52, 0x34, 0x1b, 0x03, 0x9a, 0xee, 0xe2, 0xbf, 0x4b, 0xd3, - 0x96, 0xe1, 0x4f, 0xc2, 0xb4, 0x9b, 0x32, 0x8d, 0xf6, 0x1b, 0x18, 0xbe, 0x03, 0x27, 0x39, 0x78, - 0xf4, 0xbc, 0x67, 0x3f, 0x98, 0x99, 0xe9, 0xc2, 0x42, 0x5b, 0x0a, 0xf1, 0x34, 0xed, 0x9b, 0xe7, - 0x7d, 0x7e, 0xf3, 0x3e, 0x79, 0x07, 0x3c, 0x22, 0x6e, 0x40, 0x9d, 0x60, 0xc6, 0x3c, 0xea, 0x5a, - 0x94, 0x34, 0xae, 0x7d, 0x8f, 0x79, 0xb0, 0xbc, 0x5d, 0xad, 0x9e, 0x8f, 0x26, 0x6c, 0x1c, 0xd8, - 0x0d, 0xc7, 0xa3, 0xcd, 0x91, 0x37, 0xf2, 0x9a, 0x42, 0x66, 0x07, 0x43, 0xf1, 0x27, 0x7e, 0xc4, - 0x57, 0xd4, 0x5e, 0x7d, 0xb5, 0x53, 0xce, 0xc8, 0x8c, 0x35, 0xd9, 0x98, 0xf0, 0x33, 0x12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6, 0x45, 0xef, 0x5d, 0xc7, - 0x10, 0xf0, 0xca, 0x7c, 0xa1, 0x42, 0xae, 0xf8, 0x64, 0x4d, 0x03, 0xb2, 0x92, 0x61, 0x58, 0xde, - 0xd0, 0x71, 0x6a, 0x91, 0x13, 0xff, 0x2c, 0x15, 0xe9, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, - 0x65, 0x55, 0xe7, 0xdb, 0x05, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto b/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto deleted file mode 100644 index 0230ddbad..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumcustomname/enumcustomname.proto +++ /dev/null @@ -1,75 +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 enumcustomname tests the behavior of enum_customname and -// enumvalue_customname extensions. -package enumcustomname; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/gogo/protobuf/test/thetest.proto"; - -enum MyEnum { - option (gogoproto.enum_customname) = "MyCustomEnum"; - - // The following field will take on the custom name and the prefix, joined - // by an underscore. - A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameA"]; - B = 1; // Should be MyCustomEnum_B -} - -enum MyUnprefixedEnum { - option (gogoproto.goproto_enum_prefix) = false; - option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. - option (gogoproto.enum_customname) = "MyCustomUnprefixedEnum"; // no prefix added but type gets name - UNPREFIXED_A = 0 [(gogoproto.enumvalue_customname) = "MyBetterNameUnprefixedA"]; - UNPREFIXED_B = 1 ; // Should not pick up prefix above -} - -enum MyEnumWithEnumStringer { - option (gogoproto.goproto_enum_stringer) = false; // ensure it behaves correctly without stringer. - option (gogoproto.enum_stringer) = true; // ensure it behaves correctly without stringer. - STRINGER_A = 0 [(gogoproto.enumvalue_customname) = "EnumValueStringerA"]; - STRINGER_B = 1; -} - -message OnlyEnums { - optional MyEnum my_enum = 1; - optional MyEnum my_enum_default_a = 2 [default=A]; - optional MyEnum my_enum_default_b = 3 [default=B]; - optional MyUnprefixedEnum my_unprefixed_enum = 4; - optional MyUnprefixedEnum my_unprefixed_enum_default_a = 5 [default=UNPREFIXED_A]; - optional MyUnprefixedEnum my_unprefixed_enum_default_b = 6 [default=UNPREFIXED_B]; - optional test.YetAnotherTestEnum yet_another_test_enum = 7; - optional test.YetAnotherTestEnum yet_another_test_enum_default_aa = 8 [default=AA]; - optional test.YetAnotherTestEnum yet_another_test_enum_default_bb = 9 [default=BB]; - optional test.YetYetAnotherTestEnum yet_yet_another_test_enum = 10; - optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_cc = 11 [default=CC]; - optional test.YetYetAnotherTestEnum yet_yet_another_test_enum_default_dd = 12 [default=DD]; -} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/Makefile b/vendor/github.com/gogo/protobuf/test/enumdecl/Makefile deleted file mode 100644 index 75d9417ab..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. enumdecl.proto diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go deleted file mode 100644 index 55fb7c014..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.pb.go +++ /dev/null @@ -1,446 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumdecl.proto - -/* -Package enumdecl is a generated protocol buffer package. - -It is generated from these files: - enumdecl.proto - -It has these top-level messages: - Message -*/ -package enumdecl - -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 - -// 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 MyEnum_name = map[int32]string{ - 0: "A", - 1: "B", -} -var MyEnum_value = map[string]int32{ - "A": 0, - "B": 1, -} - -func (x MyEnum) String() string { - return proto.EnumName(MyEnum_name, int32(x)) -} -func (MyEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumdecl, []int{0} } - -type Message struct { - EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdecl.MyEnum" json:"enumerated_field,omitempty"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorEnumdecl, []int{0} } - -func (m *Message) GetEnumeratedField() MyEnum { - if m != nil { - return m.EnumeratedField - } - return A -} - -func init() { - proto.RegisterType((*Message)(nil), "enumdecl.Message") - proto.RegisterEnum("enumdecl.MyEnum", MyEnum_name, MyEnum_value) -} -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.EnumeratedField != that1.EnumeratedField { - return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField) - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.EnumeratedField != that1.EnumeratedField { - return false - } - return true -} -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.EnumeratedField != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintEnumdecl(dAtA, i, uint64(m.EnumeratedField)) - } - return i, nil -} - -func encodeVarintEnumdecl(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 randyEnumdecl, easy bool) *Message { - this := &Message{} - this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyEnumdecl interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEnumdecl(r randyEnumdecl) 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 randStringEnumdecl(r randyEnumdecl) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneEnumdecl(r) - } - return string(tmps) -} -func randUnrecognizedEnumdecl(r randyEnumdecl, 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 = randFieldEnumdecl(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEnumdecl(dAtA []byte, r randyEnumdecl, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateEnumdecl(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 = encodeVarintPopulateEnumdecl(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEnumdecl(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEnumdecl(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 encodeVarintPopulateEnumdecl(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 - if m.EnumeratedField != 0 { - n += 1 + sovEnumdecl(uint64(m.EnumeratedField)) - } - return n -} - -func sovEnumdecl(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozEnumdecl(x uint64) (n int) { - return sovEnumdecl(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 ErrIntOverflowEnumdecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 EnumeratedField", wireType) - } - m.EnumeratedField = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEnumdecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEnumdecl(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEnumdecl - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEnumdecl(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, ErrIntOverflowEnumdecl - } - 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, ErrIntOverflowEnumdecl - } - 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, ErrIntOverflowEnumdecl - } - 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, ErrInvalidLengthEnumdecl - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEnumdecl - } - 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 := skipEnumdecl(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 ( - ErrInvalidLengthEnumdecl = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEnumdecl = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("enumdecl.proto", fileDescriptorEnumdecl) } - -var fileDescriptorEnumdecl = []byte{ - // 205 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0xcd, 0x2b, 0xcd, - 0x4d, 0x49, 0x4d, 0xce, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x72, 0xe3, 0x62, - 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0xb2, 0xe6, 0x12, 0x00, 0x99, 0x92, 0x5a, 0x94, - 0x58, 0x92, 0x9a, 0x12, 0x9f, 0x96, 0x99, 0x9a, 0x93, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x67, - 0x24, 0xa0, 0x07, 0xb7, 0xce, 0xb7, 0xd2, 0x35, 0xaf, 0x34, 0x37, 0x88, 0x1f, 0xa1, 0xd2, 0x0d, - 0xa4, 0x50, 0x4b, 0x81, 0x8b, 0x0d, 0x22, 0x25, 0xc4, 0xca, 0xc5, 0xe8, 0x28, 0xc0, 0x00, 0xa2, - 0x9c, 0x04, 0x18, 0xa5, 0x38, 0x3a, 0x16, 0xcb, 0x31, 0x1c, 0x58, 0x22, 0xc7, 0xe0, 0xa4, 0xf1, - 0xe0, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, - 0x78, 0xe0, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, - 0xc7, 0xf8, 0xe3, 0x91, 0x1c, 0x43, 0xc3, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0xd3, 0x8c, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x76, 0x04, 0x55, 0xb7, 0xe5, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto deleted file mode 100644 index 54be1b0ee..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdecl.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; - -package enumdecl; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -enum MyEnum { - option (gogoproto.enumdecl) = false; - option (gogoproto.goproto_enum_prefix) = false; - A = 0; - B = 1; -} - -message Message { - MyEnum enumerated_field = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go b/vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go deleted file mode 100644 index ac51724ec..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl/enumdeclpb_test.go +++ /dev/null @@ -1,237 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumdecl.proto - -/* -Package enumdecl is a generated protocol buffer package. - -It is generated from these files: - enumdecl.proto - -It has these top-level messages: - Message -*/ -package enumdecl - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl/models.go b/vendor/github.com/gogo/protobuf/test/enumdecl/models.go deleted file mode 100644 index cd95bdcb5..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl/models.go +++ /dev/null @@ -1,8 +0,0 @@ -package enumdecl - -type MyEnum int32 - -const ( - A MyEnum = iota - B MyEnum = iota -) diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile b/vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile deleted file mode 100644 index 56316b509..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl_all/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. enumdeclall.proto diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go deleted file mode 100644 index 14032ffd0..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.pb.go +++ /dev/null @@ -1,514 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumdeclall.proto - -/* - Package enumdeclall is a generated protocol buffer package. - - It is generated from these files: - enumdeclall.proto - - It has these top-level messages: - Message -*/ -package enumdeclall - -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 - -// 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 MyEnum_name = map[int32]string{ - 0: "A", - 1: "B", -} -var MyEnum_value = map[string]int32{ - "A": 0, - "B": 1, -} - -func (x MyEnum) String() string { - return proto.EnumName(MyEnum_name, int32(x)) -} -func (MyEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumdeclall, []int{0} } - -type MyOtherEnum int32 - -const ( - C MyOtherEnum = 0 - D MyOtherEnum = 1 -) - -var MyOtherEnum_name = map[int32]string{ - 0: "C", - 1: "D", -} -var MyOtherEnum_value = map[string]int32{ - "C": 0, - "D": 1, -} - -func (x MyOtherEnum) String() string { - return proto.EnumName(MyOtherEnum_name, int32(x)) -} -func (MyOtherEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumdeclall, []int{1} } - -type Message struct { - EnumeratedField MyEnum `protobuf:"varint,1,opt,name=enumerated_field,json=enumeratedField,proto3,enum=enumdeclall.MyEnum" json:"enumerated_field,omitempty"` - OtherenumeratedField MyOtherEnum `protobuf:"varint,2,opt,name=otherenumerated_field,json=otherenumeratedField,proto3,enum=enumdeclall.MyOtherEnum" json:"otherenumerated_field,omitempty"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorEnumdeclall, []int{0} } - -func (m *Message) GetEnumeratedField() MyEnum { - if m != nil { - return m.EnumeratedField - } - return A -} - -func (m *Message) GetOtherenumeratedField() MyOtherEnum { - if m != nil { - return m.OtherenumeratedField - } - return C -} - -func init() { - proto.RegisterType((*Message)(nil), "enumdeclall.Message") - proto.RegisterEnum("enumdeclall.MyEnum", MyEnum_name, MyEnum_value) - proto.RegisterEnum("enumdeclall.MyOtherEnum", MyOtherEnum_name, MyOtherEnum_value) -} -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.EnumeratedField != that1.EnumeratedField { - return fmt.Errorf("EnumeratedField this(%v) Not Equal that(%v)", this.EnumeratedField, that1.EnumeratedField) - } - if this.OtherenumeratedField != that1.OtherenumeratedField { - return fmt.Errorf("OtherenumeratedField this(%v) Not Equal that(%v)", this.OtherenumeratedField, that1.OtherenumeratedField) - } - return nil -} -func (this *Message) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.EnumeratedField != that1.EnumeratedField { - return false - } - if this.OtherenumeratedField != that1.OtherenumeratedField { - return false - } - return true -} -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.EnumeratedField != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintEnumdeclall(dAtA, i, uint64(m.EnumeratedField)) - } - if m.OtherenumeratedField != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintEnumdeclall(dAtA, i, uint64(m.OtherenumeratedField)) - } - return i, nil -} - -func encodeVarintEnumdeclall(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 randyEnumdeclall, easy bool) *Message { - this := &Message{} - this.EnumeratedField = MyEnum([]int32{0, 1}[r.Intn(2)]) - this.OtherenumeratedField = MyOtherEnum([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyEnumdeclall interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEnumdeclall(r randyEnumdeclall) 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 randStringEnumdeclall(r randyEnumdeclall) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneEnumdeclall(r) - } - return string(tmps) -} -func randUnrecognizedEnumdeclall(r randyEnumdeclall, 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 = randFieldEnumdeclall(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEnumdeclall(dAtA []byte, r randyEnumdeclall, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateEnumdeclall(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 = encodeVarintPopulateEnumdeclall(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEnumdeclall(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEnumdeclall(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 encodeVarintPopulateEnumdeclall(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 - if m.EnumeratedField != 0 { - n += 1 + sovEnumdeclall(uint64(m.EnumeratedField)) - } - if m.OtherenumeratedField != 0 { - n += 1 + sovEnumdeclall(uint64(m.OtherenumeratedField)) - } - return n -} - -func sovEnumdeclall(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozEnumdeclall(x uint64) (n int) { - return sovEnumdeclall(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 ErrIntOverflowEnumdeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 EnumeratedField", wireType) - } - m.EnumeratedField = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEnumdeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.EnumeratedField |= (MyEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OtherenumeratedField", wireType) - } - m.OtherenumeratedField = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEnumdeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OtherenumeratedField |= (MyOtherEnum(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEnumdeclall(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthEnumdeclall - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEnumdeclall(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, ErrIntOverflowEnumdeclall - } - 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, ErrIntOverflowEnumdeclall - } - 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, ErrIntOverflowEnumdeclall - } - 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, ErrInvalidLengthEnumdeclall - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEnumdeclall - } - 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 := skipEnumdeclall(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 ( - ErrInvalidLengthEnumdeclall = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEnumdeclall = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("enumdeclall.proto", fileDescriptorEnumdeclall) } - -var fileDescriptorEnumdeclall = []byte{ - // 260 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0xcd, 0x2b, 0xcd, - 0x4d, 0x49, 0x4d, 0xce, 0x49, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, - 0x12, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, - 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x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3, 0x8e, 0xc7, 0x72, - 0x0c, 0x49, 0x6c, 0xe0, 0x40, 0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x91, 0xd9, 0xaf, - 0x65, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto deleted file mode 100644 index 38b16b6e6..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclall.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package enumdeclall; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; -option (gogoproto.enumdecl_all) = false; - -enum MyEnum { - option (gogoproto.goproto_enum_prefix) = false; - A = 0; - B = 1; -} - -enum MyOtherEnum { - option (gogoproto.enumdecl) = true; - option (gogoproto.goproto_enum_prefix) = false; - C = 0; - D = 1; -} - -message Message { - MyEnum enumerated_field = 1; - MyOtherEnum otherenumerated_field = 2; -} diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go b/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go deleted file mode 100644 index 0b1b5b46e..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl_all/enumdeclallpb_test.go +++ /dev/null @@ -1,237 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumdeclall.proto - -/* -Package enumdeclall is a generated protocol buffer package. - -It is generated from these files: - enumdeclall.proto - -It has these top-level messages: - Message -*/ -package enumdeclall - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 TestMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMessageVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go b/vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go deleted file mode 100644 index bb1aee665..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumdecl_all/models.go +++ /dev/null @@ -1,8 +0,0 @@ -package enumdeclall - -type MyEnum int32 - -const ( - A MyEnum = iota - B MyEnum = iota -) diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile b/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile deleted file mode 100644 index fbb7b0301..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumprefix/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumprefix.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go deleted file mode 100644 index 47d4307ab..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.pb.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumprefix.proto - -/* - 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 - -// 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 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 (*MyMessage) Descriptor() ([]byte, []int) { return fileDescriptorEnumprefix, []int{0} } - -func (m *MyMessage) GetTheField() test.TheTestEnum { - if m != nil { - return m.TheField - } - return test.A -} - -func init() { - proto.RegisterType((*MyMessage)(nil), "enumprefix.MyMessage") -} - -func init() { proto.RegisterFile("enumprefix.proto", fileDescriptorEnumprefix) } - -var fileDescriptorEnumprefix = []byte{ - // 149 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcd, 0x2b, 0xcd, - 0x2d, 0x28, 0x4a, 0x4d, 0xcb, 0xac, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88, - 0x48, 0x69, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xa7, - 0xe7, 0xeb, 0x83, 0x95, 0x24, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, 0x97, 0xe8, 0x97, 0x64, 0xa4, - 0x82, 0x68, 0x88, 0x46, 0x29, 0x5d, 0x9c, 0x8a, 0x41, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x28, 0x57, - 0x72, 0xe0, 0xe2, 0xf4, 0xad, 0xf4, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x32, 0xe6, 0xe2, - 0x08, 0xc9, 0x48, 0x75, 0xcb, 0x4c, 0xcd, 0x49, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x33, 0x12, - 0xd4, 0x03, 0x1b, 0x1d, 0x92, 0x91, 0x1a, 0x92, 0x5a, 0x5c, 0xe2, 0x9a, 0x57, 0x9a, 0xeb, 0xc4, - 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0x5c, 0x21, 0x20, 0x00, 0x00, 0xff, 0xff, 0xda, 0xd1, 0x3c, - 0x03, 0xbc, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto b/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto deleted file mode 100644 index 67f779f9b..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumprefix/enumprefix.proto +++ /dev/null @@ -1,37 +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 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/github.com/gogo/protobuf/test/enumstringer/Makefile b/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile deleted file mode 100644 index 67b569859..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. enumstringer.proto) diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go deleted file mode 100644 index 806157b80..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.pb.go +++ /dev/null @@ -1,561 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumstringer.proto - -/* -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 - -// 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 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 -} -func (TheTestEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{0} } - -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 (*NidOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{0} } - -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 (*NinOptEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{1} } - -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 (*NidRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{2} } - -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 (*NinRepEnum) Descriptor() ([]byte, []int) { return fileDescriptorEnumstringer, []int{3} } - -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 { - return this == nil - } - - that1, ok := that.(*NidOptEnum) - if !ok { - that2, ok := that.(NidOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinOptEnum) - if !ok { - that2, ok := that.(NinOptEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NidRepEnum) - if !ok { - that2, ok := that.(NidRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*NinRepEnum) - if !ok { - that2, ok := that.(NinRepEnum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 -} - -func init() { proto.RegisterFile("enumstringer.proto", fileDescriptorEnumstringer) } - -var fileDescriptorEnumstringer = []byte{ - // 208 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0xcd, 0x2b, 0xcd, - 0x2d, 0x2e, 0x29, 0xca, 0xcc, 0x4b, 0x4f, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, - 0x41, 0x16, 0x93, 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, 0x95, 0x8b, 0xcb, 0x2f, 0x33, 0xc5, 0xbf, 0xa0, 0xc4, 0x35, 0xaf, 0x34, 0x57, 0xc8, - 0x9c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, 0xcf, 0x48, - 0x52, 0x0f, 0xc5, 0xbe, 0x90, 0x8c, 0xd4, 0x90, 0xd4, 0x62, 0xb0, 0x52, 0x27, 0x96, 0x13, 0xf7, - 0xe4, 0x19, 0x82, 0xa0, 0xca, 0x95, 0xec, 0x41, 0xc6, 0xe4, 0xc1, 0x8c, 0x31, 0x24, 0xda, 0x18, - 0xb8, 0x01, 0x10, 0x77, 0x04, 0xa5, 0x16, 0x60, 0xb8, 0x83, 0x99, 0x74, 0x77, 0xc0, 0x8c, 0x31, - 0x24, 0xda, 0x18, 0x98, 0x01, 0x5a, 0x4a, 0x5c, 0xdc, 0x48, 0xc2, 0x42, 0xac, 0x5c, 0x8c, 0x8e, - 0x02, 0x0c, 0x20, 0xca, 0x49, 0x80, 0x11, 0x44, 0x39, 0x0b, 0x30, 0x39, 0x89, 0x3c, 0x78, 0x28, - 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0xbe, 0x78, - 0x24, 0xc7, 0x00, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xb2, 0x8f, 0xc2, 0x9b, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto deleted file mode 100644 index 7147ccfb6..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringer.proto +++ /dev/null @@ -1,62 +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 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/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go b/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go deleted file mode 100644 index c370ae4da..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/enumstringerpb_test.go +++ /dev/null @@ -1,449 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: enumstringer.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinOptEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNinRepEnumProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNidOptEnumJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.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/github.com/gogo/protobuf/test/enumstringer/string.go b/vendor/github.com/gogo/protobuf/test/enumstringer/string.go deleted file mode 100644 index 3d9ef7000..000000000 --- a/vendor/github.com/gogo/protobuf/test/enumstringer/string.go +++ /dev/null @@ -1,41 +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 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/github.com/gogo/protobuf/test/example/example_test.go b/vendor/github.com/gogo/protobuf/test/example/example_test.go deleted file mode 100644 index 34f4c4367..000000000 --- a/vendor/github.com/gogo/protobuf/test/example/example_test.go +++ /dev/null @@ -1,35 +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 test - -import "testing" - -func TestGetterExists(t *testing.T) { - _ = (&CastType{}).GetInt32() -} diff --git a/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go b/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go deleted file mode 100644 index 068231783..000000000 --- a/vendor/github.com/gogo/protobuf/test/example/examplepb_test.go +++ /dev/null @@ -1,1670 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: example.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedE(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedR(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCastTypeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &E{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &R{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CastType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &A{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - dAtA := proto.CompactTextString(p) - msg := &A{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &B{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - dAtA := proto.CompactTextString(p) - msg := &B{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &C{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - dAtA := proto.CompactTextString(p) - msg := &C{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &U{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - dAtA := proto.CompactTextString(p) - msg := &U{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &E{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - dAtA := proto.CompactTextString(p) - msg := &E{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &R{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - dAtA := proto.CompactTextString(p) - msg := &R{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CastType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CastType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &C{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &U{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedE(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &E{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedR(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &R{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCastType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CastType{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestEGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestRGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCastTypeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedE(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedR(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCastType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/extension_test.go b/vendor/github.com/gogo/protobuf/test/extension_test.go deleted file mode 100644 index 54046d4dc..000000000 --- a/vendor/github.com/gogo/protobuf/test/extension_test.go +++ /dev/null @@ -1,164 +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 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/github.com/gogo/protobuf/test/filedotname/Makefile b/vendor/github.com/gogo/protobuf/test/filedotname/Makefile deleted file mode 100644 index 2833183ce..000000000 --- a/vendor/github.com/gogo/protobuf/test/filedotname/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2016, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc --gogo_out=. --proto_path=../../../../../:../../protobuf/:. file.dot.proto diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go deleted file mode 100644 index e98e4623e..000000000 --- a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.pb.go +++ /dev/null @@ -1,574 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: file.dot.proto - -/* -Package filedotname is a generated protocol buffer package. - -It is generated from these files: - file.dot.proto - -It has these top-level messages: - M -*/ -package filedotname - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -// 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 M struct { - A *string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *M) Reset() { *m = M{} } -func (*M) ProtoMessage() {} -func (*M) Descriptor() ([]byte, []int) { return fileDescriptorFileDot, []int{0} } - -func init() { - proto.RegisterType((*M)(nil), "filedotname.M") -} -func (this *M) Description() (desc *descriptor.FileDescriptorSet) { - return FileDotDescription() -} -func FileDotDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3767 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0xb9, 0xa4, 0x25, 0x88, 0x8e, 0x21, 0x89, 0xb6, - 0x23, 0xda, 0x6e, 0xa8, 0x8c, 0x6c, 0xc9, 0x16, 0xd4, 0xc4, 0x05, 0x41, 0x88, 0x81, 0x4a, 0x12, - 0xc8, 0x82, 0x8c, 0x7f, 0x32, 0x9d, 0x9d, 0xe5, 0xee, 0x05, 0xb8, 0xd2, 0x62, 0x77, 0xb3, 0xbb, - 0x90, 0x4c, 0x4d, 0x1f, 0xd4, 0x71, 0x7f, 0x26, 0xd3, 0xe9, 0x7f, 0x67, 0x92, 0xb8, 0x8e, 0xfb, - 0x33, 0xd3, 0x3a, 0x4d, 0x9b, 0x36, 0x69, 0xda, 0x34, 0xed, 0x53, 0x5e, 0xd2, 0xfa, 0xa9, 0x93, - 0xbc, 0xf5, 0xa1, 0x0f, 0x16, 0xe3, 0x99, 0xba, 0xad, 0xdb, 0xb8, 0xad, 0x1f, 0x3c, 0xa3, 0x97, - 0xcc, 0xfd, 0x5b, 0xec, 0x02, 0xa0, 0x76, 0x99, 0x19, 0xdb, 0x4f, 0xe4, 0x9e, 0x7b, 0xbe, 0x6f, - 0xcf, 0x3d, 0xf7, 0xdc, 0x73, 0xce, 0xbd, 0x0b, 0xf8, 0xf1, 0x65, 0x38, 0xd3, 0xb3, 0xed, 0x9e, - 0x89, 0xce, 0x3b, 0xae, 0xed, 0xdb, 0x7b, 0x83, 0xee, 0x79, 0x1d, 0x79, 0x9a, 0x6b, 0x38, 0xbe, - 0xed, 0xae, 0x12, 0x99, 0x34, 0x47, 0x35, 0x56, 0xb9, 0xc6, 0xf2, 0x16, 0xcc, 0x5f, 0x35, 0x4c, - 0xb4, 0x1e, 0x28, 0x76, 0x90, 0x2f, 0x3d, 0x03, 0x99, 0xae, 0x61, 0xa2, 0xb2, 0x70, 0x26, 0xbd, - 0x52, 0xb8, 0xf0, 0xc8, 0xea, 0x08, 0x68, 0x35, 0x8a, 0x68, 0x63, 0xb1, 0x4c, 0x10, 0xcb, 0x6f, - 0x65, 0x60, 0x61, 0xc2, 0xa8, 0x24, 0x41, 0xc6, 0x52, 0xfb, 0x98, 0x51, 0x58, 0xc9, 0xcb, 0xe4, - 0x7f, 0xa9, 0x0c, 0x33, 0x8e, 0xaa, 0xdd, 0x50, 0x7b, 0xa8, 0x9c, 0x22, 0x62, 0xfe, 0x28, 0x55, - 0x00, 0x74, 0xe4, 0x20, 0x4b, 0x47, 0x96, 0x76, 0x50, 0x4e, 0x9f, 0x49, 0xaf, 0xe4, 0xe5, 0x90, - 0x44, 0x7a, 0x02, 0xe6, 0x9d, 0xc1, 0x9e, 0x69, 0x68, 0x4a, 0x48, 0x0d, 0xce, 0xa4, 0x57, 0xb2, - 0xb2, 0x48, 0x07, 0xd6, 0x87, 0xca, 0xe7, 0x60, 0xee, 0x16, 0x52, 0x6f, 0x84, 0x55, 0x0b, 0x44, - 0xb5, 0x84, 0xc5, 0x21, 0xc5, 0x3a, 0x14, 0xfb, 0xc8, 0xf3, 0xd4, 0x1e, 0x52, 0xfc, 0x03, 0x07, - 0x95, 0x33, 0x64, 0xf6, 0x67, 0xc6, 0x66, 0x3f, 0x3a, 0xf3, 0x02, 0x43, 0xed, 0x1c, 0x38, 0x48, - 0xaa, 0x41, 0x1e, 0x59, 0x83, 0x3e, 0x65, 0xc8, 0x1e, 0xe1, 0xbf, 0x86, 0x35, 0xe8, 0x8f, 0xb2, - 0xe4, 0x30, 0x8c, 0x51, 0xcc, 0x78, 0xc8, 0xbd, 0x69, 0x68, 0xa8, 0x3c, 0x4d, 0x08, 0xce, 0x8d, - 0x11, 0x74, 0xe8, 0xf8, 0x28, 0x07, 0xc7, 0x49, 0x75, 0xc8, 0xa3, 0x97, 0x7c, 0x64, 0x79, 0x86, - 0x6d, 0x95, 0x67, 0x08, 0xc9, 0xa3, 0x13, 0x56, 0x11, 0x99, 0xfa, 0x28, 0xc5, 0x10, 0x27, 0x5d, - 0x82, 0x19, 0xdb, 0xf1, 0x0d, 0xdb, 0xf2, 0xca, 0xb9, 0x33, 0xc2, 0x4a, 0xe1, 0xc2, 0xc7, 0x26, - 0x06, 0x42, 0x8b, 0xea, 0xc8, 0x5c, 0x59, 0x6a, 0x82, 0xe8, 0xd9, 0x03, 0x57, 0x43, 0x8a, 0x66, - 0xeb, 0x48, 0x31, 0xac, 0xae, 0x5d, 0xce, 0x13, 0x82, 0xd3, 0xe3, 0x13, 0x21, 0x8a, 0x75, 0x5b, - 0x47, 0x4d, 0xab, 0x6b, 0xcb, 0x25, 0x2f, 0xf2, 0x2c, 0x9d, 0x80, 0x69, 0xef, 0xc0, 0xf2, 0xd5, - 0x97, 0xca, 0x45, 0x12, 0x21, 0xec, 0x69, 0xf9, 0x1f, 0xa6, 0x61, 0x2e, 0x49, 0x88, 0x5d, 0x81, - 0x6c, 0x17, 0xcf, 0xb2, 0x9c, 0x3a, 0x8e, 0x0f, 0x28, 0x26, 0xea, 0xc4, 0xe9, 0x9f, 0xd2, 0x89, - 0x35, 0x28, 0x58, 0xc8, 0xf3, 0x91, 0x4e, 0x23, 0x22, 0x9d, 0x30, 0xa6, 0x80, 0x82, 0xc6, 0x43, - 0x2a, 0xf3, 0x53, 0x85, 0xd4, 0xf3, 0x30, 0x17, 0x98, 0xa4, 0xb8, 0xaa, 0xd5, 0xe3, 0xb1, 0x79, - 0x3e, 0xce, 0x92, 0xd5, 0x06, 0xc7, 0xc9, 0x18, 0x26, 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, 0xeb, 0x60, 0xc3, 0xde, 0xb0, 0xe9, 0x4d, 0xdd, - 0x8b, 0xcb, 0xf1, 0x57, 0x6e, 0xf0, 0x0d, 0x01, 0x4a, 0x5d, 0xc3, 0x44, 0xab, 0xba, 0xed, 0xb3, - 0xab, 0xb7, 0x02, 0x7e, 0xd6, 0x6d, 0x1f, 0xc7, 0xc4, 0xd2, 0xf1, 0xae, 0xed, 0x96, 0xe7, 0x41, - 0xd8, 0x92, 0x8a, 0x20, 0xa8, 0xec, 0xc7, 0x2f, 0x82, 0xba, 0xb6, 0xf9, 0xc6, 0xdd, 0xca, 0xd4, - 0x0f, 0xee, 0x56, 0xa6, 0xfe, 0xf5, 0x6e, 0x65, 0xea, 0xcd, 0xbb, 0x15, 0xe1, 0xed, 0xbb, 0x15, - 0xe1, 0xdd, 0xbb, 0x15, 0xe1, 0xfd, 0xbb, 0x15, 0xe1, 0xce, 0x61, 0x45, 0xf8, 0xda, 0x61, 0x45, - 0xf8, 0xe6, 0x61, 0x45, 0xf8, 0xee, 0x61, 0x45, 0xf8, 0xde, 0x61, 0x45, 0x78, 0xe3, 0xb0, 0x32, - 0xf5, 0x83, 0xc3, 0xca, 0xd4, 0x9b, 0x87, 0x15, 0xe1, 0xed, 0xc3, 0xca, 0xd4, 0xbb, 0x87, 0x15, - 0xe1, 0xfd, 0xc3, 0xca, 0xd4, 0x9d, 0x1f, 0x55, 0xa6, 0x7e, 0x12, 0x00, 0x00, 0xff, 0xff, 0x5a, - 0x46, 0xcb, 0x7d, 0x3c, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 this.A != nil && that1.A != nil { - if *this.A != *that1.A { - return fmt.Errorf("A this(%v) Not Equal that(%v)", *this.A, *that1.A) - } - } else if this.A != nil { - return fmt.Errorf("this.A == nil && that.A != nil") - } else if that1.A != nil { - 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 *M) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*M) - if !ok { - that2, ok := that.(M) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.A != nil && that1.A != nil { - if *this.A != *that1.A { - return false - } - } else if this.A != nil { - return false - } else if that1.A != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} - -type MFace interface { - Proto() proto.Message - GetA() *string -} - -func (this *M) Proto() proto.Message { - return this -} - -func (this *M) TestProto() proto.Message { - return NewMFromFace(this) -} - -func (this *M) GetA() *string { - return this.A -} - -func NewMFromFace(that MFace) *M { - this := &M{} - this.A = that.GetA() - return this -} - -func (this *M) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&filedotname.M{") - if this.A != nil { - s = append(s, "A: "+valueToGoStringFileDot(this.A, "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 valueToGoStringFileDot(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 NewPopulatedM(r randyFileDot, easy bool) *M { - this := &M{} - if r.Intn(10) != 0 { - v1 := string(randStringFileDot(r)) - this.A = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedFileDot(r, 2) - } - return this -} - -type randyFileDot interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneFileDot(r randyFileDot) 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 randStringFileDot(r randyFileDot) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneFileDot(r) - } - return string(tmps) -} -func randUnrecognizedFileDot(r randyFileDot, 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 = randFieldFileDot(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldFileDot(dAtA []byte, r randyFileDot, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateFileDot(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateFileDot(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateFileDot(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 = encodeVarintPopulateFileDot(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateFileDot(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateFileDot(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 encodeVarintPopulateFileDot(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 m.A != nil { - l = len(*m.A) - n += 1 + l + sovFileDot(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFileDot(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozFileDot(x uint64) (n int) { - return sovFileDot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *M) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&M{`, - `A:` + valueToStringFileDot(this.A) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringFileDot(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("file.dot.proto", fileDescriptorFileDot) } - -var fileDescriptorFileDot = []byte{ - // 179 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x24, 0xcb, 0xaf, 0x6e, 0xc2, 0x50, - 0x1c, 0xc5, 0xf1, 0xdf, 0x91, 0xeb, 0x96, 0x25, 0xab, 0x5a, 0x26, 0x4e, 0x96, 0xa9, 0x99, 0xb5, - 0xef, 0x30, 0x0d, 0x86, 0x37, 0x68, 0xe9, 0x1f, 0x9a, 0x50, 0x2e, 0x21, 0xb7, 0xbe, 0x8f, 0x83, - 0x44, 0x22, 0x91, 0x95, 0x95, 0xc8, 0xde, 0x1f, 0xa6, 0xb2, 0xb2, 0x92, 0x70, 0x71, 0xe7, 0x93, - 0x9c, 0x6f, 0xf0, 0x5e, 0x54, 0xdb, 0x3c, 0xca, 0x8c, 0x8d, 0xf6, 0x07, 0x63, 0x4d, 0xf8, 0xfa, - 0x70, 0x66, 0xec, 0x2e, 0xa9, 0xf3, 0xaf, 0xbf, 0xb2, 0xb2, 0x9b, 0x26, 0x8d, 0xd6, 0xa6, 0x8e, - 0x4b, 0x53, 0x9a, 0xd8, 0x7f, 0xd2, 0xa6, 0xf0, 0xf2, 0xf0, 0xeb, 0xd9, 0xfe, 0x7c, 0x04, 0x58, - 0x86, 0x6f, 0x01, 0x92, 0x4f, 0x7c, 0xe3, 0xf7, 0x65, 0x85, 0xe4, 0x7f, 0xd1, 0x39, 0x4a, 0xef, - 0x28, 0x57, 0x47, 0x19, 0x1c, 0x31, 0x3a, 0x62, 0x72, 0xc4, 0xec, 0x88, 0x56, 0x89, 0xa3, 0x12, - 0x27, 0x25, 0xce, 0x4a, 0x5c, 0x94, 0xe8, 0x94, 0xd2, 0x2b, 0x65, 0x50, 0x62, 0x54, 0xca, 0xa4, - 0xc4, 0xac, 0x94, 0xf6, 0x46, 0xb9, 0x07, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x59, 0x32, 0x8a, 0xad, - 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto b/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto deleted file mode 100644 index e1a047c48..000000000 --- a/vendor/github.com/gogo/protobuf/test/filedotname/file.dot.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 filedotname; - -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 M { - optional string a = 1; -} - diff --git a/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go b/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go deleted file mode 100644 index 063602822..000000000 --- a/vendor/github.com/gogo/protobuf/test/filedotname/file.dotpb_test.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: file.dot.proto - -/* -Package filedotname is a generated protocol buffer package. - -It is generated from these files: - file.dot.proto - -It has these top-level messages: - M -*/ -package filedotname - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*M, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedM(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedM(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &M{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &M{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &M{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - dAtA := proto.CompactTextString(p) - msg := &M{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFileDotDescription(t *testing.T) { - FileDotDescription() -} -func TestMVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &M{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedM(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*M, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedM(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedM(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/github.com/gogo/protobuf/test/fuzztests/Makefile b/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile deleted file mode 100644 index aa82b00fc..000000000 --- a/vendor/github.com/gogo/protobuf/test/fuzztests/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2015, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogofast - protoc --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. fuzz.proto diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go deleted file mode 100644 index dbf8dc240..000000000 --- a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.pb.go +++ /dev/null @@ -1,2747 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: fuzz.proto - -/* - 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 reflect "reflect" - -import binary "encoding/binary" - -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 Nil struct { - XXX_unrecognized []byte `json:"-"` -} - -func (m *Nil) Reset() { *m = Nil{} } -func (m *Nil) String() string { return proto.CompactTextString(m) } -func (*Nil) ProtoMessage() {} -func (*Nil) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{0} } - -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 (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{1} } - -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 (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{2} } - -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 (*NinOptStruct) Descriptor() ([]byte, []int) { return fileDescriptorFuzz, []int{3} } - -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 (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(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - i += 8 - } - } - 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(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f2)) - i += 4 - } - } - 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 { - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.Field10) > 0 { - dAtA[i] = 0x52 - i++ - i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field10)*4)) - for _, num := range m.Field10 { - binary.LittleEndian.PutUint32(dAtA[i:], uint32(num)) - i += 4 - } - } - if len(m.Field11) > 0 { - dAtA[i] = 0x5a - i++ - i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field11)*8)) - for _, num := range m.Field11 { - binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } - if len(m.Field12) > 0 { - dAtA[i] = 0x62 - i++ - i = encodeVarintFuzz(dAtA, i, uint64(len(m.Field12)*8)) - for _, num := range m.Field12 { - binary.LittleEndian.PutUint64(dAtA[i:], uint64(num)) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) - i += 4 - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) - i += 4 - } - if m.Field10 != nil { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) - i += 4 - } - if m.Field11 != nil { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) - i += 8 - } - if m.Field12 != nil { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*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 = 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 != nil { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) - i += 4 - } - 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 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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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") -) - -func init() { proto.RegisterFile("fuzz.proto", fileDescriptorFuzz) } - -var fileDescriptorFuzz = []byte{ - // 445 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x6e, 0x1a, 0x41, - 0x10, 0xc7, 0x71, 0xcd, 0x0d, 0x7f, 0xd7, 0x10, 0xf0, 0x15, 0x9b, 0x91, 0x15, 0xa1, 0x15, 0xd5, - 0x34, 0xe1, 0xc2, 0x71, 0xd8, 0xb8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, 0x7b, 0x21, 0xdb, 0x7b, 0x9e, 0x64, 0x67, 0x9e, 0x67, 0xbf, 0x60, 0xf6, 0x7f, 0x8b, 0x9e, - 0xf5, 0xff, 0xfc, 0x1e, 0xc0, 0xf7, 0xcd, 0x00, 0x7e, 0x6e, 0x06, 0xf0, 0x6b, 0x33, 0x80, 0xbf, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xc0, 0x67, 0xe2, 0xa2, 0xc1, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto deleted file mode 100644 index eb01e63c7..000000000 --- a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz.proto +++ /dev/null @@ -1,86 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go b/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go deleted file mode 100644 index 81c8793e8..000000000 --- a/vendor/github.com/gogo/protobuf/test/fuzztests/fuzz_test.go +++ /dev/null @@ -1,136 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/group/Makefile b/vendor/github.com/gogo/protobuf/test/group/Makefile deleted file mode 100644 index ebbbbd2c2..000000000 --- a/vendor/github.com/gogo/protobuf/test/group/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. group.proto) diff --git a/vendor/github.com/gogo/protobuf/test/group/group.pb.go b/vendor/github.com/gogo/protobuf/test/group/group.pb.go deleted file mode 100644 index 95fa97323..000000000 --- a/vendor/github.com/gogo/protobuf/test/group/group.pb.go +++ /dev/null @@ -1,952 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: group.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -// 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 Groups1 struct { - G []*Groups1_G `protobuf:"group,1,rep,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Groups1) Reset() { *m = Groups1{} } -func (*Groups1) ProtoMessage() {} -func (*Groups1) Descriptor() ([]byte, []int) { return fileDescriptorGroup, []int{0} } - -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() {} -func (*Groups1_G) Descriptor() ([]byte, []int) { return fileDescriptorGroup, []int{0, 0} } - -type Groups2 struct { - G *Groups2_G `protobuf:"group,1,opt,name=G,json=g" json:"g,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Groups2) Reset() { *m = Groups2{} } -func (*Groups2) ProtoMessage() {} -func (*Groups2) Descriptor() ([]byte, []int) { return fileDescriptorGroup, []int{1} } - -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 (*Groups2_G) Descriptor() ([]byte, []int) { return fileDescriptorGroup, []int{1, 0} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3788 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xe6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0x79, 0x49, 0x53, 0x10, 0x1d, 0x53, 0x12, 0x6d, - 0x47, 0xb4, 0xdd, 0x50, 0x09, 0x2d, 0xc9, 0x16, 0xd4, 0xc4, 0x05, 0x41, 0x08, 0x81, 0x4a, 0x12, - 0xc8, 0x82, 0x8c, 0x7f, 0x32, 0xed, 0xce, 0x72, 0x71, 0x01, 0xae, 0xb4, 0xd8, 0xdd, 0xec, 0x2e, - 0x24, 0x53, 0xd3, 0x07, 0x75, 0xdc, 0x9f, 0xc9, 0x74, 0xfa, 0xdf, 0x99, 0x24, 0xae, 0xe3, 0xfe, - 0xcc, 0xb4, 0x4e, 0xd3, 0xbf, 0xa4, 0x69, 0xd3, 0xa4, 0x4f, 0x7d, 0x49, 0xeb, 0xa7, 0x4e, 0xf2, - 0xd6, 0x87, 0x3e, 0x58, 0xaa, 0x67, 0xfa, 0xe7, 0x36, 0x69, 0xeb, 0x87, 0xcc, 0xf8, 0x25, 0x73, - 0xff, 0x16, 0xbb, 0x00, 0xa8, 0x05, 0x33, 0x63, 0xe7, 0x89, 0xd8, 0x73, 0xcf, 0xf7, 0xed, 0xb9, - 0xe7, 0x9e, 0x7b, 0xce, 0xb9, 0x77, 0x09, 0xdf, 0xbb, 0x02, 0x67, 0xbb, 0xb6, 0xdd, 0x35, 0xf1, - 0x05, 0xc7, 0xb5, 0x7d, 0xfb, 0xa0, 0xdf, 0xb9, 0xd0, 0xc6, 0x9e, 0xee, 0x1a, 0x8e, 0x6f, 0xbb, - 0xeb, 0x54, 0x86, 0xe6, 0x98, 0xc6, 0xba, 0xd0, 0x58, 0xdd, 0x81, 0xf9, 0x6b, 0x86, 0x89, 0xb7,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0x4b, 0xe9, - 0x56, 0xb3, 0x5a, 0xdd, 0x52, 0x72, 0x82, 0xe5, 0x9a, 0xed, 0x92, 0x80, 0xea, 0xda, 0x81, 0x83, - 0x73, 0x2c, 0xa0, 0xba, 0xb6, 0x70, 0xef, 0x25, 0x58, 0xd0, 0x75, 0x36, 0x67, 0x43, 0x57, 0xf9, - 0x19, 0xcb, 0x2b, 0xca, 0x11, 0x67, 0xe9, 0x7a, 0x8d, 0x29, 0xf0, 0x18, 0xf7, 0xd0, 0x15, 0x78, - 0x68, 0xe0, 0xac, 0x30, 0x70, 0x7e, 0x64, 0x96, 0xc3, 0xd0, 0x4b, 0xb0, 0xe0, 0x1c, 0x8d, 0x02, - 0x51, 0xe4, 0x8d, 0xce, 0xd1, 0x30, 0xec, 0x19, 0x58, 0x74, 0x0e, 0x9d, 0x51, 0xdc, 0x93, 0x61, - 0x1c, 0x72, 0x0e, 0x9d, 0x61, 0xe0, 0xe3, 0xf4, 0xc0, 0xed, 0x62, 0x5d, 0xf3, 0x71, 0xbb, 0x78, - 0x2a, 0xac, 0x1e, 0x1a, 0x40, 0x17, 0x40, 0xd6, 0x75, 0x15, 0x5b, 0xda, 0x81, 0x89, 0x55, 0xcd, - 0xc5, 0x96, 0xe6, 0x15, 0xcf, 0x84, 0x95, 0x0b, 0xba, 0x5e, 0xa5, 0xa3, 0x65, 0x3a, 0x88, 0x9e, - 0x84, 0x79, 0xfb, 0xe0, 0x86, 0xce, 0x42, 0x52, 0x75, 0x5c, 0xdc, 0x31, 0x5e, 0x2e, 0x3e, 0x46, - 0xfd, 0x3b, 0x47, 0x06, 0x68, 0x40, 0x36, 0xa9, 0x18, 0x3d, 0x01, 0xb2, 0xee, 0x1d, 0x6a, 0xae, - 0x43, 0x73, 0xb2, 0xe7, 0x68, 0x3a, 0x2e, 0x3e, 0xce, 0x54, 0x99, 0x7c, 0x57, 0x88, 0xc9, 0x96, - 0xf0, 0x6e, 0x1b, 0x1d, 0x5f, 0x30, 0x9e, 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, 0x92, 0x84, - 0x7c, 0xb8, 0x39, 0x26, 0x67, 0x0d, 0x9d, 0xd6, 0x11, 0x89, 0x66, 0x9a, 0x47, 0x1f, 0xd8, 0x4a, - 0xaf, 0x57, 0x48, 0x81, 0x29, 0x4d, 0xb3, 0x96, 0x55, 0x61, 0x48, 0x52, 0xdc, 0x49, 0x6e, 0xc1, - 0xac, 0x45, 0xc8, 0x28, 0xfc, 0x09, 0xd5, 0x60, 0xfa, 0x86, 0x47, 0xb9, 0xa7, 0x29, 0xf7, 0x63, - 0x0f, 0xe6, 0xbe, 0xde, 0xa2, 0xe4, 0xd9, 0xeb, 0x2d, 0x75, 0xb7, 0xa1, 0xec, 0x94, 0xb7, 0x15, - 0x0e, 0x47, 0xa7, 0x21, 0x65, 0x6a, 0x77, 0x8e, 0xa2, 0xa5, 0x88, 0x8a, 0x26, 0x75, 0xfc, 0x69, - 0x48, 0xdd, 0xc6, 0xda, 0xcd, 0x68, 0x01, 0xa0, 0xa2, 0xf7, 0x31, 0xf4, 0x2f, 0x40, 0x9a, 0xfa, - 0x0b, 0x01, 0x70, 0x8f, 0xc9, 0x53, 0x28, 0x03, 0xa9, 0x4a, 0x43, 0x21, 0xe1, 0x2f, 0x43, 0x9e, - 0x49, 0xd5, 0x66, 0xbd, 0x5a, 0xa9, 0xca, 0x89, 0xd5, 0x4b, 0x30, 0xcd, 0x9c, 0x40, 0xb6, 0x46, - 0xe0, 0x06, 0x79, 0x8a, 0x3f, 0x72, 0x0e, 0x49, 0x8c, 0xee, 0xef, 0x6c, 0x56, 0x15, 0x39, 0x11, - 0x5e, 0x5e, 0x0f, 0xf2, 0xe1, 0xbe, 0xf8, 0x83, 0x89, 0xa9, 0xbf, 0x93, 0x20, 0x17, 0xea, 0x73, - 0x49, 0x83, 0xa2, 0x99, 0xa6, 0x7d, 0x5b, 0xd5, 0x4c, 0x43, 0xf3, 0x78, 0x50, 0x00, 0x15, 0x95, - 0x89, 0x64, 0xd2, 0x45, 0xfb, 0x40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 0x1f, 0xe8, 0x2f, 0xfe, 0xf9, 0x33, 0x1b, 0x48, 0x97, - 0x63, 0xbf, 0x95, 0x96, 0x76, 0x61, 0x81, 0x2b, 0xab, 0xf4, 0xfb, 0x0b, 0x3b, 0x45, 0xa0, 0x07, - 0xde, 0x61, 0x15, 0xbf, 0xf6, 0x36, 0x2d, 0xd7, 0xca, 0x3c, 0x87, 0x92, 0x31, 0x76, 0xd0, 0x28, - 0x29, 0xf0, 0x50, 0x84, 0x8f, 0x6d, 0x4d, 0xec, 0xc6, 0x30, 0x7e, 0x9b, 0x33, 0x2e, 0x84, 0x18, - 0x5b, 0x1c, 0x5a, 0xaa, 0xc0, 0xec, 0x49, 0xb8, 0xfe, 0x81, 0x73, 0xe5, 0x71, 0x98, 0xa4, 0x06, - 0x73, 0x94, 0x44, 0xef, 0x7b, 0xbe, 0xdd, 0xa3, 0x79, 0xef, 0xc1, 0x34, 0xff, 0xf8, 0x36, 0xdb, - 0x2b, 0x05, 0x02, 0xab, 0x04, 0xa8, 0x52, 0x09, 0xe8, 0x27, 0xa7, 0x36, 0xd6, 0xcd, 0x18, 0x86, - 0x37, 0xb9, 0x21, 0x81, 0x7e, 0xe9, 0xd3, 0xb0, 0x48, 0x7e, 0xd3, 0xb4, 0x14, 0xb6, 0x24, 0xfe, - 0xc2, 0xab, 0xf8, 0xdd, 0x57, 0xd8, 0x76, 0x5c, 0x08, 0x08, 0x42, 0x36, 0x85, 0x56, 0xb1, 0x8b, - 0x7d, 0x1f, 0xbb, 0x9e, 0xaa, 0x99, 0xe3, 0xcc, 0x0b, 0xdd, 0x18, 0x14, 0xbf, 0xf8, 0x4e, 0x74, - 0x15, 0x6b, 0x0c, 0x59, 0x36, 0xcd, 0xd2, 0x3e, 0x9c, 0x1a, 0x13, 0x15, 0x13, 0x70, 0xbe, 0xca, - 0x39, 0x17, 0x47, 0x22, 0x83, 0xd0, 0x36, 0x41, 0xc8, 0x83, 0xb5, 0x9c, 0x80, 0xf3, 0x77, 0x39, - 0x27, 0xe2, 0x58, 0xb1, 0xa4, 0x84, 0xf1, 0x3a, 0xcc, 0xdf, 0xc2, 0xee, 0x81, 0xed, 0xf1, 0x5b, - 0x9a, 0x09, 0xe8, 0x5e, 0xe3, 0x74, 0x73, 0x1c, 0x48, 0xaf, 0x6d, 0x08, 0xd7, 0x15, 0xc8, 0x74, - 0x34, 0x1d, 0x4f, 0x40, 0xf1, 0x25, 0x4e, 0x31, 0x43, 0xf4, 0x09, 0xb4, 0x0c, 0xf9, 0xae, 0xcd, - 0x2b, 0x53, 0x3c, 0xfc, 0x75, 0x0e, 0xcf, 0x09, 0x0c, 0xa7, 0x70, 0x6c, 0xa7, 0x6f, 0x92, 0xb2, - 0x15, 0x4f, 0xf1, 0x7b, 0x82, 0x42, 0x60, 0x38, 0xc5, 0x09, 0xdc, 0xfa, 0xfb, 0x82, 0xc2, 0x0b, - 0xf9, 0xf3, 0x39, 0xc8, 0xd9, 0x96, 0x79, 0x64, 0x5b, 0x93, 0x18, 0xf1, 0x07, 0x9c, 0x01, 0x38, - 0x84, 0x10, 0x5c, 0x85, 0xec, 0xa4, 0x0b, 0xf1, 0x47, 0xef, 0x88, 0xed, 0x21, 0x56, 0xa0, 0x06, - 0x73, 0x22, 0x41, 0x19, 0xb6, 0x35, 0x01, 0xc5, 0x1f, 0x73, 0x8a, 0x42, 0x08, 0xc6, 0xa7, 0xe1, - 0x63, 0xcf, 0xef, 0xe2, 0x49, 0x48, 0xde, 0x10, 0xd3, 0xe0, 0x10, 0xee, 0xca, 0x03, 0x6c, 0xe9, - 0x87, 0x93, 0x31, 0x7c, 0x59, 0xb8, 0x52, 0x60, 0x08, 0x45, 0x05, 0x66, 0x7b, 0x9a, 0xeb, 0x1d, - 0x6a, 0xe6, 0x44, 0xcb, 0xf1, 0x27, 0x9c, 0x23, 0x1f, 0x80, 0xb8, 0x47, 0xfa, 0xd6, 0x49, 0x68, - 0xbe, 0x22, 0x3c, 0x12, 0x82, 0xf1, 0xad, 0x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 0x75, 0xab, 0x3f, 0x0b, 0x33, 0x35, 0x82, 0xf3, 0x3e, 0x86, 0x56, 0x40, 0xea, 0xd2, - 0x5b, 0x4a, 0xd8, 0x90, 0xd7, 0x19, 0x33, 0x1f, 0x5a, 0xaf, 0x29, 0x52, 0x77, 0xf9, 0x69, 0x90, - 0x6a, 0x68, 0x09, 0xa6, 0xe9, 0x0c, 0x3f, 0x46, 0xbf, 0x48, 0x25, 0x15, 0xfe, 0x14, 0xc8, 0x37, - 0xe8, 0x45, 0xa6, 0xc4, 0xe5, 0x1b, 0x03, 0xfe, 0x0d, 0xc1, 0x2f, 0x8d, 0xf0, 0x6f, 0x9c, 0x90, - 0x3f, 0x39, 0xe0, 0xdf, 0xbc, 0xf8, 0xe6, 0xbd, 0x95, 0xa9, 0xef, 0xdc, 0x5b, 0x99, 0xfa, 0xe7, - 0x7b, 0x2b, 0x53, 0x6f, 0xdd, 0x5b, 0x91, 0xbe, 0x7f, 0x6f, 0x45, 0xfa, 0xc1, 0xbd, 0x15, 0xe9, - 0xee, 0xfd, 0x15, 0xe9, 0xcb, 0xf7, 0x57, 0xa4, 0xaf, 0xde, 0x5f, 0x91, 0xbe, 0x79, 0x7f, 0x45, - 0x7a, 0xf3, 0xfe, 0xca, 0xd4, 0x77, 0xee, 0xaf, 0x4c, 0xbd, 0x75, 0x7f, 0x65, 0xea, 0x87, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x58, 0x09, 0xc3, 0x38, 0xc8, 0x31, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Groups1) - if !ok { - that2, ok := that.(Groups1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Groups1_G) - if !ok { - that2, ok := that.(Groups1_G) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Groups2) - if !ok { - that2, ok := that.(Groups2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Groups2_G) - if !ok { - that2, ok := that.(Groups2_G) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 NewPopulatedGroups1(r randyGroup, easy bool) *Groups1 { - this := &Groups1{} - if r.Intn(10) != 0 { - v1 := r.Intn(5) - 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(10) - 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) -} - -func init() { proto.RegisterFile("group.proto", fileDescriptorGroup) } - -var fileDescriptorGroup = []byte{ - // 211 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0x2f, 0xca, 0x2f, - 0x2d, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x73, 0xa4, 0x74, 0xd3, 0x33, 0x4b, - 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0xb2, 0x49, - 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x74, 0x29, 0xc5, 0x71, 0xb1, 0xbb, 0x83, 0xf4, - 0x15, 0x1b, 0x0a, 0xc9, 0x71, 0x31, 0xa6, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x19, 0x09, 0xe8, - 0x41, 0x4c, 0x86, 0x4a, 0xe9, 0xb9, 0x07, 0x31, 0xa6, 0x4b, 0x19, 0x73, 0x31, 0xba, 0x0b, 0x89, - 0x71, 0xb1, 0xb9, 0x65, 0xa6, 0xe6, 0xa4, 0x18, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x41, - 0x79, 0x70, 0x71, 0x23, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x46, 0xa8, 0xb8, 0x11, 0xc2, 0x7c, 0x23, - 0x98, 0xf9, 0x8c, 0x18, 0xe6, 0x1b, 0x91, 0x68, 0x3e, 0x33, 0xc2, 0x7c, 0x27, 0x93, 0x13, 0x0f, - 0xe5, 0x18, 0x2e, 0x3c, 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xe1, 0xc1, 0x43, 0x39, 0xc6, 0x0f, - 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x6c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, - 0x86, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x70, 0xe1, 0x91, 0x1c, - 0xc3, 0x83, 0x47, 0x72, 0x0c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3c, 0xd8, 0xef, 0x2c, 0x39, - 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/group/group.proto b/vendor/github.com/gogo/protobuf/test/group/group.proto deleted file mode 100644 index 0dad6569a..000000000 --- a/vendor/github.com/gogo/protobuf/test/group/group.proto +++ /dev/null @@ -1,65 +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 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/github.com/gogo/protobuf/test/group/grouppb_test.go b/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go deleted file mode 100644 index 0ca768486..000000000 --- a/vendor/github.com/gogo/protobuf/test/group/grouppb_test.go +++ /dev/null @@ -1,539 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: group.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups1_GProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1_G{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups2Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups2_GProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2_G{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGroups1JSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups1_G{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Groups2_G{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Groups1{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Groups1{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Groups1_G{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups1_G(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Groups1_G{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Groups2{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Groups2{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Groups2_G{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedGroups2_G(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Groups2_G{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups1{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups1_G(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups1_G{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups2{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGroups2_G(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Groups2_G{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGroups1_GGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGroups2GoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGroups2_GGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGroups1Stringer(t *testing.T) { - popr := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/importdedup/Makefile b/vendor/github.com/gogo/protobuf/test/importdedup/Makefile deleted file mode 100644 index 21d823a67..000000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/Makefile +++ /dev/null @@ -1,31 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. subpkg/subproto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go b/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go deleted file mode 100644 index 8bdcc6238..000000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/importdedup_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 importdedup - -import testing "testing" - -func TestImportDedup(t *testing.T) { -} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go b/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go deleted file mode 100644 index 78d8f4e68..000000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/proto.pb.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto.proto - -/* -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 - -// 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 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 (*Object) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } - -func (m *Object) GetSubObject() *subpkg.SubObject { - if m != nil { - return m.SubObject - } - return nil -} - -func init() { - proto.RegisterType((*Object)(nil), "importdedup.Object") -} - -func init() { proto.RegisterFile("proto.proto", fileDescriptorProto) } - -var fileDescriptorProto = []byte{ - // 175 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xdc, 0x99, 0xb9, 0x05, 0xf9, 0x45, 0x25, 0x29, 0xa9, 0x29, 0xa5, - 0x05, 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, - 0xe9, 0xf9, 0xfa, 0x60, 0x35, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x4a, - 0xd9, 0xe3, 0x54, 0x5e, 0x92, 0x5a, 0x5c, 0xa2, 0x8f, 0x64, 0xb2, 0x7e, 0x71, 0x69, 0x52, 0x41, - 0x76, 0x3a, 0x98, 0x42, 0x58, 0xae, 0x34, 0x87, 0x91, 0x8b, 0xcd, 0x3f, 0x29, 0x2b, 0x35, 0xb9, - 0x44, 0x28, 0x91, 0x8b, 0xdb, 0xb9, 0xb4, 0xb8, 0x24, 0x3f, 0xd7, 0x2d, 0x33, 0x35, 0x27, 0x45, - 0x82, 0x51, 0x81, 0x51, 0x83, 0xc7, 0xc9, 0xfe, 0xd6, 0x3d, 0x79, 0x6b, 0x52, 0x2d, 0xd1, 0x83, - 0x98, 0x13, 0x52, 0x59, 0x90, 0x1a, 0x84, 0x6c, 0xa6, 0x90, 0x3e, 0x17, 0x67, 0x70, 0x69, 0x12, - 0xc4, 0x3e, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x41, 0x3d, 0xa8, 0x1e, 0xb8, 0x44, 0x10, - 0x42, 0x0d, 0x20, 0x00, 0x00, 0xff, 0xff, 0x21, 0x11, 0x7d, 0xc2, 0x29, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto b/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto deleted file mode 100644 index 5d9c9c827..000000000 --- a/vendor/github.com/gogo/protobuf/test/importdedup/proto.proto +++ /dev/null @@ -1,40 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/importduplicate/Makefile b/vendor/github.com/gogo/protobuf/test/importduplicate/Makefile deleted file mode 100644 index efd3ea248..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/Makefile +++ /dev/null @@ -1,40 +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. - -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=:. \ - --proto_path=../../../../../:../../protobuf/:. importduplicate.proto - protoc-min-version --version="3.0.0" --gogo_out=:. \ - --proto_path=../../../../../:../../protobuf/:. sortkeys/sortable.proto - protoc-min-version --version="3.0.0" --gogo_out=:. \ - --proto_path=../../../../../:../../protobuf/:. proto/proto.proto - -test: - go test diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go deleted file mode 100644 index 3ac7b3afd..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.pb.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: importduplicate.proto - -/* -Package importduplicate is a generated protocol buffer package. - -It is generated from these files: - importduplicate.proto - -It has these top-level messages: - MapAndSortKeys -*/ -package importduplicate - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import sortkeys "github.com/gogo/protobuf/test/importduplicate/sortkeys" -import proto1 "github.com/gogo/protobuf/test/importduplicate/proto" - -import strings "strings" -import reflect "reflect" -import sortkeys1 "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 - -// 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 MapAndSortKeys struct { - Key *sortkeys.Object `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - KeyValue map[int32]string `protobuf:"bytes,2,rep,name=keyValue" json:"keyValue,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Value *proto1.Subject `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` -} - -func (m *MapAndSortKeys) Reset() { *m = MapAndSortKeys{} } -func (m *MapAndSortKeys) String() string { return proto.CompactTextString(m) } -func (*MapAndSortKeys) ProtoMessage() {} -func (*MapAndSortKeys) Descriptor() ([]byte, []int) { return fileDescriptorImportduplicate, []int{0} } - -func (m *MapAndSortKeys) GetKey() *sortkeys.Object { - if m != nil { - return m.Key - } - return nil -} - -func (m *MapAndSortKeys) GetKeyValue() map[int32]string { - if m != nil { - return m.KeyValue - } - return nil -} - -func (m *MapAndSortKeys) GetValue() *proto1.Subject { - if m != nil { - return m.Value - } - return nil -} - -func init() { - proto.RegisterType((*MapAndSortKeys)(nil), "importduplicate.MapAndSortKeys") -} -func (this *MapAndSortKeys) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapAndSortKeys) - if !ok { - that2, ok := that.(MapAndSortKeys) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Key.Equal(that1.Key) { - return false - } - if len(this.KeyValue) != len(that1.KeyValue) { - return false - } - for i := range this.KeyValue { - if this.KeyValue[i] != that1.KeyValue[i] { - return false - } - } - if !this.Value.Equal(that1.Value) { - return false - } - return true -} -func (this *MapAndSortKeys) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&importduplicate.MapAndSortKeys{") - if this.Key != nil { - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - } - keysForKeyValue := make([]int32, 0, len(this.KeyValue)) - for k := range this.KeyValue { - keysForKeyValue = append(keysForKeyValue, k) - } - sortkeys1.Int32s(keysForKeyValue) - mapStringForKeyValue := "map[int32]string{" - for _, k := range keysForKeyValue { - mapStringForKeyValue += fmt.Sprintf("%#v: %#v,", k, this.KeyValue[k]) - } - mapStringForKeyValue += "}" - if this.KeyValue != nil { - s = append(s, "KeyValue: "+mapStringForKeyValue+",\n") - } - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringImportduplicate(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 NewPopulatedMapAndSortKeys(r randyImportduplicate, easy bool) *MapAndSortKeys { - this := &MapAndSortKeys{} - if r.Intn(10) != 0 { - this.Key = sortkeys.NewPopulatedObject(r, easy) - } - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.KeyValue = make(map[int32]string) - for i := 0; i < v1; i++ { - this.KeyValue[int32(r.Int31())] = randStringImportduplicate(r) - } - } - if r.Intn(10) != 0 { - this.Value = proto1.NewPopulatedSubject(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyImportduplicate interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneImportduplicate(r randyImportduplicate) 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 randStringImportduplicate(r randyImportduplicate) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneImportduplicate(r) - } - return string(tmps) -} -func randUnrecognizedImportduplicate(r randyImportduplicate, 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 = randFieldImportduplicate(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldImportduplicate(dAtA []byte, r randyImportduplicate, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateImportduplicate(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 = encodeVarintPopulateImportduplicate(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateImportduplicate(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateImportduplicate(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 encodeVarintPopulateImportduplicate(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 init() { proto.RegisterFile("importduplicate.proto", fileDescriptorImportduplicate) } - -var fileDescriptorImportduplicate = []byte{ - // 277 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8, - 0x2f, 0x2a, 0x49, 0x29, 0x2d, 0xc8, 0xc9, 0x4c, 0x4e, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0xe2, 0x47, 0x13, 0x96, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, - 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, - 0x30, 0x0b, 0xa2, 0x5f, 0xca, 0x15, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x34, 0xd3, 0xf5, - 0x8b, 0xf3, 0x8b, 0x4a, 0xb2, 0x53, 0x2b, 0x8b, 0xc1, 0x8c, 0xc4, 0xa4, 0x1c, 0xa8, 0x33, 0xa4, - 0xec, 0x49, 0x33, 0x06, 0xe2, 0x0c, 0x30, 0x09, 0x31, 0x40, 0xe9, 0x11, 0x23, 0x17, 0x9f, 0x6f, - 0x62, 0x81, 0x63, 0x5e, 0x4a, 0x70, 0x7e, 0x51, 0x89, 0x77, 0x6a, 0x65, 0xb1, 0x90, 0x12, 0x17, - 0x73, 0x76, 0x6a, 0xa5, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x80, 0x1e, 0xcc, 0x6a, 0x3d, - 0xff, 0xa4, 0xac, 0xd4, 0xe4, 0x92, 0x20, 0x90, 0xa4, 0x90, 0x27, 0x17, 0x47, 0x76, 0x6a, 0x65, - 0x58, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0x93, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xae, 0x1e, 0x7a, 0x40, - 0xa1, 0x1a, 0xab, 0xe7, 0x0d, 0x55, 0xef, 0x9a, 0x57, 0x52, 0x54, 0x19, 0x04, 0xd7, 0x2e, 0xa4, - 0xc2, 0xc5, 0x5a, 0x06, 0x36, 0x87, 0x19, 0x6c, 0x21, 0x1f, 0xc4, 0x61, 0x7a, 0xc1, 0xa5, 0x10, - 0xeb, 0x20, 0x92, 0x52, 0xd6, 0x5c, 0xbc, 0x28, 0x06, 0x08, 0x09, 0x20, 0x5c, 0xc9, 0x0a, 0x71, - 0x93, 0x08, 0xcc, 0x20, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0xa8, 0x46, 0x2b, 0x26, 0x0b, 0x46, 0x27, - 0x81, 0x0f, 0x0f, 0xe5, 0x18, 0x7f, 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23, - 0x39, 0xc6, 0x24, 0x36, 0xb0, 0x25, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x50, 0xcc, 0xec, - 0x38, 0xde, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto deleted file mode 100644 index 024cc6ecb..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate.proto +++ /dev/null @@ -1,45 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 = "proto3"; -package importduplicate; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/gogo/protobuf/test/importduplicate/sortkeys/sortable.proto"; -import "github.com/gogo/protobuf/test/importduplicate/proto/proto.proto"; - -option (gogoproto.testgen_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.gostring_all) = true; - -message MapAndSortKeys { - sortkeys.Object key = 1; - map keyValue = 2; - proto.Subject value = 3; -} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go deleted file mode 100644 index be385489c..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicate_test.go +++ /dev/null @@ -1,34 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 importduplicate - -import testing "testing" - -func TestImportDuplicate(t *testing.T) { -} diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go deleted file mode 100644 index 03f354114..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/importduplicatepb_test.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: importduplicate.proto - -/* -Package importduplicate is a generated protocol buffer package. - -It is generated from these files: - importduplicate.proto - -It has these top-level messages: - MapAndSortKeys -*/ -package importduplicate - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/test/importduplicate/sortkeys" -import _ "github.com/gogo/protobuf/test/importduplicate/proto" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestMapAndSortKeysProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapAndSortKeys(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapAndSortKeys{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapAndSortKeysJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapAndSortKeys(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapAndSortKeys{} - err = 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 TestMapAndSortKeysProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapAndSortKeys(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapAndSortKeys{} - if err := 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 TestMapAndSortKeysProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapAndSortKeys(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapAndSortKeys{} - if err := 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 TestMapAndSortKeysGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapAndSortKeys(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go deleted file mode 100644 index 4a7f0c8e0..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/proto/protopb_test.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto/proto.proto - -/* -Package proto is a generated protocol buffer package. - -It is generated from these files: - proto/proto.proto - -It has these top-level messages: - Subject -*/ -package proto - -import testing "testing" -import rand "math/rand" -import time "time" -import proto1 "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestSubjectProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubject(popr, false) - dAtA, err := proto1.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subject{} - if err := proto1.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto1.Unmarshal(littlefuzz, msg) - } -} - -func TestSubjectJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subject{} - err = 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 TestSubjectProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - dAtA := proto1.MarshalTextString(p) - msg := &Subject{} - if err := proto1.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 TestSubjectProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubject(popr, true) - dAtA := proto1.CompactTextString(p) - msg := &Subject{} - if err := proto1.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 TestSubjectGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubject(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go b/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go deleted file mode 100644 index f039061f2..000000000 --- a/vendor/github.com/gogo/protobuf/test/importduplicate/sortkeys/sortablepb_test.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: sortkeys/sortable.proto - -/* -Package sortkeys is a generated protocol buffer package. - -It is generated from these files: - sortkeys/sortable.proto - -It has these top-level messages: - Object -*/ -package sortkeys - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestObjectProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestObjectJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - err = 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 TestObjectProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Object{} - if err := 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 TestObjectProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Object{} - if err := 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 TestObjectGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedObject(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile deleted file mode 100644 index 0a2f73ac4..000000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/Makefile +++ /dev/null @@ -1,31 +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. - -regenerate: - (cd index && protoc --proto_path=../../../../../../:../../../protobuf/:. --gogo_out=. index.proto) - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. indeximport.proto) diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go deleted file mode 100644 index 57d4d9a37..000000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/index/indexpb_test.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: index.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIndexQueryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQuery{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &IndexQuery{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - dAtA := proto.CompactTextString(p) - msg := &IndexQuery{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQuery(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go deleted file mode 100644 index bad14ebcf..000000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.pb.go +++ /dev/null @@ -1,447 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: indeximport.proto - -/* - 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 - -// 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 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 (*IndexQueries) Descriptor() ([]byte, []int) { return fileDescriptorIndeximport, []int{0} } - -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 { - return this == nil - } - - that1, ok := that.(*IndexQueries) - if !ok { - that2, ok := that.(IndexQueries) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 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(5) - 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") -) - -func init() { proto.RegisterFile("indeximport.proto", fileDescriptorIndeximport) } - -var fileDescriptorIndeximport = []byte{ - // 168 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0xcc, 0x4b, 0x49, - 0xad, 0xc8, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, - 0x12, 0x92, 0x72, 0x4e, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, - 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0xd3, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x47, 0x52, - 0xaa, 0x9b, 0x59, 0x5c, 0x5c, 0x9a, 0x6a, 0x6e, 0x04, 0x11, 0x83, 0x90, 0x10, 0x13, 0xa5, 0x74, - 0x71, 0x1a, 0x02, 0xe2, 0x81, 0x39, 0x60, 0x16, 0x44, 0xb9, 0x92, 0x35, 0x17, 0x8f, 0x27, 0x48, - 0x77, 0x60, 0x69, 0x6a, 0x51, 0x66, 0x6a, 0xb1, 0x90, 0x36, 0x17, 0x3b, 0x94, 0x29, 0xc1, 0xa8, - 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa8, 0x07, 0x31, 0x1d, 0xae, 0xaa, 0x32, 0x08, 0xa6, 0xc2, 0x49, - 0xe2, 0xc7, 0x43, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, - 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xd4, 0x50, 0x15, 0x6f, 0xeb, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto deleted file mode 100644 index 6358b0bf9..000000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximport.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go b/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go deleted file mode 100644 index 62712a79f..000000000 --- a/vendor/github.com/gogo/protobuf/test/indeximport-issue72/indeximportpb_test.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: indeximport.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIndexQueriesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IndexQueries{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &IndexQueries{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - dAtA := proto.CompactTextString(p) - msg := &IndexQueries{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIndexQueries(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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/github.com/gogo/protobuf/test/int64support/Makefile b/vendor/github.com/gogo/protobuf/test/int64support/Makefile deleted file mode 100644 index 356ac1214..000000000 --- a/vendor/github.com/gogo/protobuf/test/int64support/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc -I=. -I=../../../../../ -I=../../protobuf/ --gogo_out=. object.proto) diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object.pb.go b/vendor/github.com/gogo/protobuf/test/int64support/object.pb.go deleted file mode 100644 index f3a314c75..000000000 --- a/vendor/github.com/gogo/protobuf/test/int64support/object.pb.go +++ /dev/null @@ -1,489 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: object.proto - -/* -Package int64support is a generated protocol buffer package. - -It is generated from these files: - object.proto - -It has these top-level messages: - Object -*/ -package int64support - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import strings "strings" -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 - -// 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 Object struct { - OptionalNumber *int64 `protobuf:"varint,1,opt,name=optional_number,json=optionalNumber" json:"optional_number,omitempty"` -} - -func (m *Object) Reset() { *m = Object{} } -func (*Object) ProtoMessage() {} -func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorObject, []int{0} } - -func (m *Object) GetOptionalNumber() int64 { - if m != nil && m.OptionalNumber != nil { - return *m.OptionalNumber - } - return 0 -} - -func init() { - proto.RegisterType((*Object)(nil), "int64support.Object") -} -func (this *Object) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Object) - if !ok { - that2, ok := that.(Object) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Object") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Object but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Object but is not nil && this == nil") - } - if this.OptionalNumber != nil && that1.OptionalNumber != nil { - if *this.OptionalNumber != *that1.OptionalNumber { - return fmt.Errorf("OptionalNumber this(%v) Not Equal that(%v)", *this.OptionalNumber, *that1.OptionalNumber) - } - } else if this.OptionalNumber != nil { - return fmt.Errorf("this.OptionalNumber == nil && that.OptionalNumber != nil") - } else if that1.OptionalNumber != nil { - return fmt.Errorf("OptionalNumber this(%v) Not Equal that(%v)", this.OptionalNumber, that1.OptionalNumber) - } - return nil -} -func (this *Object) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Object) - if !ok { - that2, ok := that.(Object) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.OptionalNumber != nil && that1.OptionalNumber != nil { - if *this.OptionalNumber != *that1.OptionalNumber { - return false - } - } else if this.OptionalNumber != nil { - return false - } else if that1.OptionalNumber != nil { - return false - } - return true -} -func (this *Object) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&int64support.Object{") - if this.OptionalNumber != nil { - s = append(s, "OptionalNumber: "+valueToGoStringObject(this.OptionalNumber, "int64")+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringObject(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 *Object) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Object) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.OptionalNumber != nil { - dAtA[i] = 0x8 - i++ - i = encodeVarintObject(dAtA, i, uint64(*m.OptionalNumber)) - } - return i, nil -} - -func encodeVarintObject(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 NewPopulatedObject(r randyObject, easy bool) *Object { - this := &Object{} - if r.Intn(10) != 0 { - v1 := int64(r.Int63()) - if r.Intn(2) == 0 { - v1 *= -1 - } - this.OptionalNumber = &v1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyObject interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneObject(r randyObject) 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 randStringObject(r randyObject) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneObject(r) - } - return string(tmps) -} -func randUnrecognizedObject(r randyObject, 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 = randFieldObject(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldObject(dAtA []byte, r randyObject, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateObject(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateObject(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateObject(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 = encodeVarintPopulateObject(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateObject(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateObject(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 encodeVarintPopulateObject(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 *Object) Size() (n int) { - var l int - _ = l - if m.OptionalNumber != nil { - n += 1 + sovObject(uint64(*m.OptionalNumber)) - } - return n -} - -func sovObject(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozObject(x uint64) (n int) { - return sovObject(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Object) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Object{`, - `OptionalNumber:` + valueToStringObject(this.OptionalNumber) + `,`, - `}`, - }, "") - return s -} -func valueToStringObject(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -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 ErrIntOverflowObject - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalNumber", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowObject - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.OptionalNumber = &v - default: - iNdEx = preIndex - skippy, err := skipObject(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthObject - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipObject(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, ErrIntOverflowObject - } - 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, ErrIntOverflowObject - } - 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, ErrIntOverflowObject - } - 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, ErrInvalidLengthObject - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowObject - } - 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 := skipObject(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 ( - ErrInvalidLengthObject = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowObject = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("object.proto", fileDescriptorObject) } - -var fileDescriptorObject = []byte{ - // 190 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x4f, 0xca, 0x4a, - 0x4d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0xcc, 0x2b, 0x31, 0x33, 0x29, - 0x2e, 0x2d, 0x28, 0xc8, 0x2f, 0x2a, 0x91, 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, 0x90, 0x8b, 0xcd, 0x1f, 0x6c, 0x98, 0x90, 0x3a, 0x17, 0x7f, - 0x7e, 0x41, 0x49, 0x66, 0x7e, 0x5e, 0x62, 0x4e, 0x7c, 0x5e, 0x69, 0x6e, 0x52, 0x6a, 0x91, 0x04, - 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x1f, 0x4c, 0xd8, 0x0f, 0x2c, 0xea, 0xe4, 0x75, 0xe1, 0xa1, - 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0f, 0x1e, 0xca, 0x31, 0x7e, 0x78, 0x28, 0xc7, 0xf8, 0xe3, - 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x3c, - 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, - 0x7c, 0xf1, 0x48, 0x8e, 0xe1, 0xc3, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0xa2, 0x50, 0x5c, - 0x0b, 0x08, 0x00, 0x00, 0xff, 0xff, 0x73, 0x60, 0x3c, 0xd6, 0xca, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object.proto b/vendor/github.com/gogo/protobuf/test/int64support/object.proto deleted file mode 100644 index 68e256a0c..000000000 --- a/vendor/github.com/gogo/protobuf/test/int64support/object.proto +++ /dev/null @@ -1,24 +0,0 @@ -package int64support; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option go_package = "int64support"; -option (gogoproto.benchgen_all) = true; -option (gogoproto.enum_stringer_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.goproto_enum_prefix_all) = false; -option (gogoproto.goproto_enum_stringer_all) = false; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_unrecognized_all) = false; -option (gogoproto.gostring_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.stringer_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.verbose_equal_all) = true; - -message Object { - optional int64 optional_number = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object_js.go b/vendor/github.com/gogo/protobuf/test/int64support/object_js.go deleted file mode 100644 index 3fb7ea9d8..000000000 --- a/vendor/github.com/gogo/protobuf/test/int64support/object_js.go +++ /dev/null @@ -1,63 +0,0 @@ -package int64support - -import ( - "bytes" - "encoding/json" - "fmt" - "strconv" -) - -var ( - _ = json.Marshaler(new(Object)) - _ = json.Unmarshaler(new(Object)) -) - -func (o *Object) MarshalJSON() ([]byte, error) { - if o.OptionalNumber == nil { - return ([]byte)("{}"), nil - } - return ([]byte)(fmt.Sprintf("{\"optional_number\": %d}", *o.OptionalNumber)), nil -} - -func (o *Object) UnmarshalJSON(b []byte) error { - var ( - trim = func(v []byte) []byte { return bytes.Trim(v, " \n\r\t") } - strip = func(v []byte, first, last byte) ([]byte, error) { - x := len(v) - if x < 2 || v[0] != first || v[x-1] != last { - return nil, fmt.Errorf("failed to strip %q and %q from byte sequence", first, last) - } - return v[1 : x-1], nil - } - ) - b, err := strip(trim(b), '{', '}') - if err != nil { - return err - } - // poor man parser: assume the only commas appear between JSON key-value pairs, - // and that object hierarchy is flat - for xf, f := range bytes.Split(b, ([]byte)(",")) { - parts := bytes.SplitN(f, ([]byte)(":"), 2) - if x := len(parts); x != 2 { - if xf == 0 && (x == 0 || (x == 1 && len(trim(parts[0])) == 0)) { - return nil // empty object - } - return fmt.Errorf("failed to parse field-value seperator char ':'") - } - fieldName, err := strip(trim(parts[0]), '"', '"') - if err != nil { - return err - } - if string(fieldName) != "optional_number" { - continue // ignore unknown field - } - fieldValue := trim(parts[1]) - v, err := strconv.ParseInt(string(fieldValue), 10, 64) - if err != nil { - return err - } - o.OptionalNumber = &v - break - } - return nil -} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go b/vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go deleted file mode 100644 index d769a2841..000000000 --- a/vendor/github.com/gogo/protobuf/test/int64support/object_js_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package int64support - -import ( - "encoding/json" - "testing" -) - -func TestMarshaler(t *testing.T) { - n := int64(1) - b, err := json.Marshal(&Object{&n}) - if err != nil { - t.Fatal(err) - } - const expected = "{\"optional_number\":1}" - if string(b) != expected { - t.Fatalf("expected '%s' instead of '%s'", expected, string(b)) - } - - b, err = json.Marshal(new(Object)) - if err != nil { - t.Fatal(err) - } - const expected2 = "{}" - if string(b) != expected2 { - t.Fatalf("expected '%s' instead of '%s'", expected2, string(b)) - } -} - -func TestUnmarshaler(t *testing.T) { - o := new(Object) - err := json.Unmarshal(([]byte)("{\"optional_number\": 1}"), o) - if err != nil { - t.Fatal(err) - } - if n := o.GetOptionalNumber(); n != 1 { - t.Fatalf("expected 1 instead of %d", n) - } - - o = new(Object) - err = json.Unmarshal(([]byte)("{}"), o) - if err != nil { - t.Fatal(err) - } - if o.OptionalNumber != nil { - t.Fatalf("expected nil OptionalNumber instead of %d", *o.OptionalNumber) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go b/vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go deleted file mode 100644 index ae7afd07d..000000000 --- a/vendor/github.com/gogo/protobuf/test/int64support/objectpb_test.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: object.proto - -/* -Package int64support is a generated protocol buffer package. - -It is generated from these files: - object.proto - -It has these top-level messages: - Object -*/ -package int64support - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestObjectProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestObjectMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkObjectProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Object, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedObject(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkObjectProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedObject(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Object{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestObjectJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestObjectProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Object{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestObjectProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Object{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestObjectVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedObject(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Object{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestObjectGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedObject(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestObjectSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkObjectSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Object, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedObject(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestObjectStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedObject(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/github.com/gogo/protobuf/test/issue260/Makefile b/vendor/github.com/gogo/protobuf/test/issue260/Makefile deleted file mode 100644 index a0f5e5294..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue260/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. --proto_path=../../../../../:../../protobuf/:. issue260.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue260/README.md b/vendor/github.com/gogo/protobuf/test/issue260/README.md deleted file mode 100644 index d25084786..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue260/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# The Bug - -If in a message the following options are set: - -* `typedecl` `false` -* `go_getters` `false` -* `marshaller` `true` - -And one of the fields is using the `stdtime` and `nullable` `false` extension (to -use `time.Time` instead of the protobuf type), then an import to the _time_ package -is added even if it is not needed. diff --git a/vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go b/vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go deleted file mode 100644 index 41dccbbcd..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue260/issue260.pb.go +++ /dev/null @@ -1,991 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue260.proto - -/* - Package issue260 is a generated protocol buffer package. - - It is generated from these files: - issue260.proto - - It has these top-level messages: - Dropped - DroppedWithoutGetters - Kept -*/ -package issue260 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" - -import time "time" - -import types "github.com/gogo/protobuf/types" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 - -func (m *Dropped) Reset() { *m = Dropped{} } -func (m *Dropped) String() string { return proto.CompactTextString(m) } -func (*Dropped) ProtoMessage() {} -func (*Dropped) Descriptor() ([]byte, []int) { return fileDescriptorIssue260, []int{0} } - -func (m *Dropped) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Dropped) GetAge() int32 { - if m != nil { - return m.Age - } - return 0 -} - -func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } -func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } -func (*DroppedWithoutGetters) ProtoMessage() {} -func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { return fileDescriptorIssue260, []int{1} } - -type Kept struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` -} - -func (m *Kept) Reset() { *m = Kept{} } -func (m *Kept) String() string { return proto.CompactTextString(m) } -func (*Kept) ProtoMessage() {} -func (*Kept) Descriptor() ([]byte, []int) { return fileDescriptorIssue260, []int{2} } - -func (m *Kept) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Kept) GetAge() int32 { - if m != nil { - return m.Age - } - return 0 -} - -func init() { - proto.RegisterType((*Dropped)(nil), "issue260.Dropped") - proto.RegisterType((*DroppedWithoutGetters)(nil), "issue260.DroppedWithoutGetters") - proto.RegisterType((*Kept)(nil), "issue260.Kept") -} -func (this *Dropped) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Dropped) - if !ok { - that2, ok := that.(Dropped) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Dropped") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Dropped but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Dropped 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.Age != that1.Age { - return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) - } - return nil -} -func (this *Dropped) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Dropped) - if !ok { - that2, ok := that.(Dropped) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Age != that1.Age { - return false - } - return true -} -func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DroppedWithoutGetters) - if !ok { - that2, ok := that.(DroppedWithoutGetters) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DroppedWithoutGetters") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") - } - if this.Height != that1.Height { - return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) - } - if this.Width != that1.Width { - return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *DroppedWithoutGetters) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DroppedWithoutGetters) - if !ok { - that2, ok := that.(DroppedWithoutGetters) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Height != that1.Height { - return false - } - if this.Width != that1.Width { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - return true -} -func (this *Kept) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Kept) - if !ok { - that2, ok := that.(Kept) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Kept") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Kept but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Kept 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.Age != that1.Age { - return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) - } - return nil -} -func (this *Kept) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Kept) - if !ok { - that2, ok := that.(Kept) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Age != that1.Age { - return false - } - return true -} -func (m *Dropped) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Dropped) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Age != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) - } - return i, nil -} - -func (m *DroppedWithoutGetters) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintIssue260(dAtA, i, uint64(m.Height)) - } - if m.Width != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintIssue260(dAtA, i, uint64(m.Width)) - } - dAtA[i] = 0x1a - i++ - i = encodeVarintIssue260(dAtA, i, uint64(types.SizeOfStdTime(m.Timestamp))) - n1, err := types.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - return i, nil -} - -func (m *Kept) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Kept) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintIssue260(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Age != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintIssue260(dAtA, i, uint64(m.Age)) - } - return i, nil -} - -func encodeVarintIssue260(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 NewPopulatedDropped(r randyIssue260, easy bool) *Dropped { - this := &Dropped{} - this.Name = string(randStringIssue260(r)) - this.Age = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Age *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDroppedWithoutGetters(r randyIssue260, easy bool) *DroppedWithoutGetters { - this := &DroppedWithoutGetters{} - this.Height = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Height *= -1 - } - this.Width = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Width *= -1 - } - v1 := types.NewPopulatedStdTime(r, easy) - this.Timestamp = *v1 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedKept(r randyIssue260, easy bool) *Kept { - this := &Kept{} - this.Name = string(randStringIssue260(r)) - this.Age = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Age *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyIssue260 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIssue260(r randyIssue260) 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 randStringIssue260(r randyIssue260) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneIssue260(r) - } - return string(tmps) -} -func randUnrecognizedIssue260(r randyIssue260, 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 = randFieldIssue260(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldIssue260(dAtA []byte, r randyIssue260, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateIssue260(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateIssue260(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateIssue260(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 = encodeVarintPopulateIssue260(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateIssue260(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateIssue260(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 encodeVarintPopulateIssue260(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 *Dropped) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovIssue260(uint64(l)) - } - if m.Age != 0 { - n += 1 + sovIssue260(uint64(m.Age)) - } - return n -} - -func (m *DroppedWithoutGetters) Size() (n int) { - var l int - _ = l - if m.Height != 0 { - n += 1 + sovIssue260(uint64(m.Height)) - } - if m.Width != 0 { - n += 1 + sovIssue260(uint64(m.Width)) - } - l = types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovIssue260(uint64(l)) - return n -} - -func (m *Kept) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovIssue260(uint64(l)) - } - if m.Age != 0 { - n += 1 + sovIssue260(uint64(m.Age)) - } - return n -} - -func sovIssue260(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIssue260(x uint64) (n int) { - return sovIssue260(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Dropped) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Dropped: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowIssue260 - } - 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 ErrInvalidLengthIssue260 - } - 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 Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIssue260(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue260 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DroppedWithoutGetters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) - } - m.Width = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Width |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIssue260 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIssue260(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue260 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Kept) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Kept: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Kept: 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 ErrIntOverflowIssue260 - } - 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 ErrInvalidLengthIssue260 - } - 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 Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue260 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIssue260(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue260 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIssue260(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, ErrIntOverflowIssue260 - } - 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, ErrIntOverflowIssue260 - } - 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, ErrIntOverflowIssue260 - } - 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, ErrInvalidLengthIssue260 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue260 - } - 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 := skipIssue260(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 ( - ErrInvalidLengthIssue260 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIssue260 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("issue260.proto", fileDescriptorIssue260) } - -var fileDescriptorIssue260 = []byte{ - // 302 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0x31, 0x4b, 0xc3, 0x40, - 0x18, 0x86, 0xf3, 0x99, 0xb6, 0xb6, 0x27, 0x88, 0x1c, 0x2a, 0x25, 0xc3, 0x25, 0x74, 0xca, 0xa0, - 0xa9, 0x54, 0x74, 0xe8, 0x18, 0x04, 0x07, 0xb7, 0x20, 0x38, 0x27, 0xf6, 0xbc, 0x1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0x46, 0xd8, 0x9d, 0x7e, 0xb8, 0xd6, 0xc3, 0xa7, 0x0b, 0xd1, 0x6a, 0x36, - 0xee, 0xde, 0x3f, 0xb9, 0x96, 0xb1, 0xda, 0x23, 0xad, 0x33, 0x9e, 0xe3, 0xff, 0x3e, 0x09, 0xfd, - 0xd9, 0x9c, 0xc1, 0x62, 0xce, 0xe0, 0x45, 0x33, 0x78, 0xd5, 0x0c, 0xde, 0x34, 0x83, 0xa9, 0x66, - 0xf0, 0xae, 0x19, 0xcc, 0x34, 0x83, 0x85, 0x66, 0xd6, 0xdd, 0x17, 0xb3, 0x92, 0x8e, 0x51, 0x39, - 0xfc, 0x09, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x67, 0x75, 0x8b, 0x97, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue260/issue260.proto b/vendor/github.com/gogo/protobuf/test/issue260/issue260.proto deleted file mode 100644 index bd44c1cfb..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue260/issue260.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package issue260; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Dropped { - option (gogoproto.typedecl) = false; - string name = 1; - int32 age = 2; -} - -message DroppedWithoutGetters { - option (gogoproto.typedecl) = false; - option (gogoproto.goproto_getters) = false; - int64 height = 1; - int64 width = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -message Kept { - string name = 1; - int32 age = 2; -} diff --git a/vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go b/vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go deleted file mode 100644 index cb45d7ee2..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue260/issue260pb_test.go +++ /dev/null @@ -1,656 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue260.proto - -/* -Package issue260 is a generated protocol buffer package. - -It is generated from these files: - issue260.proto - -It has these top-level messages: - Dropped - DroppedWithoutGetters - Kept -*/ -package issue260 - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestDroppedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDroppedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDroppedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Dropped, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDropped(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDroppedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedDropped(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Dropped{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedWithoutGettersProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDroppedWithoutGettersMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*DroppedWithoutGetters, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &DroppedWithoutGetters{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKeptProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKeptMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkKeptProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Kept, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKept(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKeptProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKept(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Kept{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDroppedWithoutGettersJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKeptJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDroppedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Dropped{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Dropped{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedWithoutGettersProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DroppedWithoutGetters{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DroppedWithoutGetters{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeptProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Kept{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeptProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Kept{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDropped(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDroppedWithoutGetters(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKeptVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKept(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDroppedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDroppedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Dropped, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDropped(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedWithoutGettersSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDroppedWithoutGettersSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*DroppedWithoutGetters, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestKeptSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKeptSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Kept, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKept(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue260/models.go b/vendor/github.com/gogo/protobuf/test/issue260/models.go deleted file mode 100644 index 6ef03fc92..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue260/models.go +++ /dev/null @@ -1,40 +0,0 @@ -package issue260 - -import ( - "encoding/json" - "time" - - "github.com/gogo/protobuf/jsonpb" -) - -type Dropped struct { - Name string - Age int32 -} - -func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { - return json.Unmarshal(b, d) -} - -func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { - return json.Marshal(d) -} - -func (d *Dropped) Drop() bool { - return true -} - -type DroppedWithoutGetters struct { - Width int64 - Height int64 - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` - NullableTimestamp *time.Time `protobuf:"bytes,4,opt,name=nullable_timestamp,json=nullableTimestamp,stdtime" json:"nullable_timestamp,omitempty"` -} - -func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { - return json.Unmarshal(b, d) -} - -func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { - return json.Marshal(d) -} diff --git a/vendor/github.com/gogo/protobuf/test/issue261/Makefile b/vendor/github.com/gogo/protobuf/test/issue261/Makefile deleted file mode 100644 index 8e2d9a597..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue261/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - go install github.com/gogo/protobuf/protoc-gen-gogoslick - protoc-min-version --version="3.0.0" --gogoslick_out=\ - Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ - :. \ - --proto_path=../../../../../:../../protobuf/:. issue261.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go b/vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go deleted file mode 100644 index 03bf43840..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue261/issue261.pb.go +++ /dev/null @@ -1,521 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue261.proto - -/* - Package issue261 is a generated protocol buffer package. - - It is generated from these files: - issue261.proto - - It has these top-level messages: - MapStdTypes -*/ -package issue261 - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" - -import time "time" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import types "github.com/gogo/protobuf/types" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 MapStdTypes struct { - NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } -func (*MapStdTypes) ProtoMessage() {} -func (*MapStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorIssue261, []int{0} } - -func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func init() { - proto.RegisterType((*MapStdTypes)(nil), "issue261.MapStdTypes") -} -func (this *MapStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - return true -} -func (this *MapStdTypes) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&issue261.MapStdTypes{") - keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) - for k := range this.NullableDuration { - keysForNullableDuration = append(keysForNullableDuration, k) - } - sortkeys.Int32s(keysForNullableDuration) - mapStringForNullableDuration := "map[int32]*time.Duration{" - for _, k := range keysForNullableDuration { - mapStringForNullableDuration += fmt.Sprintf("%#v: %#v,", k, this.NullableDuration[k]) - } - mapStringForNullableDuration += "}" - if this.NullableDuration != nil { - s = append(s, "NullableDuration: "+mapStringForNullableDuration+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringIssue261(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 *MapStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableDuration) > 0 { - for k := range m.NullableDuration { - dAtA[i] = 0x1a - i++ - v := m.NullableDuration[k] - msgSize := 0 - if v != nil { - msgSize = types.SizeOfStdDuration(*v) - msgSize += 1 + sovIssue261(uint64(msgSize)) - } - mapSize := 1 + sovIssue261(uint64(k)) + msgSize - i = encodeVarintIssue261(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintIssue261(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintIssue261(dAtA, i, uint64(types.SizeOfStdDuration(*v))) - n1, err := types.StdDurationMarshalTo(*v, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - } - } - return i, nil -} - -func encodeVarintIssue261(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 *MapStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = types.SizeOfStdDuration(*v) - l += 1 + sovIssue261(uint64(l)) - } - mapEntrySize := 1 + sovIssue261(uint64(k)) + l - n += mapEntrySize + 1 + sovIssue261(uint64(mapEntrySize)) - } - } - return n -} - -func sovIssue261(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIssue261(x uint64) (n int) { - return sovIssue261(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MapStdTypes) String() string { - if this == nil { - return "nil" - } - keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) - for k := range this.NullableDuration { - keysForNullableDuration = append(keysForNullableDuration, k) - } - sortkeys.Int32s(keysForNullableDuration) - mapStringForNullableDuration := "map[int32]*time.Duration{" - for _, k := range keysForNullableDuration { - mapStringForNullableDuration += fmt.Sprintf("%v: %v,", k, this.NullableDuration[k]) - } - mapStringForNullableDuration += "}" - s := strings.Join([]string{`&MapStdTypes{`, - `NullableDuration:` + mapStringForNullableDuration + `,`, - `}`, - }, "") - return s -} -func valueToStringIssue261(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *MapStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue261 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue261 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthIssue261 - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = make(map[int32]*time.Duration) - } - var mapkey int32 - mapvalue := new(time.Duration) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue261 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue261 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue261 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthIssue261 - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthIssue261 - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipIssue261(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue261 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableDuration[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipIssue261(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue261 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIssue261(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, ErrIntOverflowIssue261 - } - 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, ErrIntOverflowIssue261 - } - 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, ErrIntOverflowIssue261 - } - 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, ErrInvalidLengthIssue261 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue261 - } - 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 := skipIssue261(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 ( - ErrInvalidLengthIssue261 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIssue261 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("issue261.proto", fileDescriptorIssue261) } - -var fileDescriptorIssue261 = []byte{ - // 266 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, - 0x4d, 0x35, 0x32, 0x33, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4b, 0xcf, - 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x4a, 0x29, 0x2d, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0xc8, - 0x2b, 0x9d, 0x61, 0xe4, 0xe2, 0xf6, 0x4d, 0x2c, 0x08, 0x2e, 0x49, 0x09, 0xa9, 0x2c, 0x48, 0x2d, - 0x16, 0x8a, 0xe5, 0x12, 0xc8, 0x2b, 0xcd, 0xc9, 0x49, 0x4c, 0xca, 0x49, 0x75, 0x81, 0xaa, 0x94, - 0x60, 0x56, 0x60, 0xd6, 0xe0, 0x36, 0xd2, 0xd6, 0x83, 0xbb, 0x09, 0x49, 0x83, 0x9e, 0x1f, 0x9a, - 0x6a, 0xd7, 0xbc, 0x92, 0xa2, 0x4a, 0x27, 0x96, 0x19, 0xf7, 0xe5, 0x19, 0x83, 0x30, 0x8c, 0x92, - 0x8a, 0xe3, 0x12, 0xc5, 0xaa, 0x41, 0x48, 0x80, 0x8b, 0x39, 0x3b, 0xb5, 0x52, 0x82, 0x51, 0x81, - 0x51, 0x83, 0x35, 0x08, 0xc4, 0x14, 0xd2, 0xe7, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, - 0x52, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd4, 0x83, 0xf8, 0x44, 0x0f, 0xe6, 0x13, 0x3d, 0x98, 0x01, - 0x41, 0x10, 0x75, 0x56, 0x4c, 0x16, 0x8c, 0x4e, 0x3a, 0x17, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, - 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, - 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, - 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0x21, 0x89, 0x0d, 0x6c, 0x96, 0x31, 0x20, 0x00, 0x00, - 0xff, 0xff, 0xf1, 0xf2, 0x28, 0x08, 0x6e, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue261/issue261.proto b/vendor/github.com/gogo/protobuf/test/issue261/issue261.proto deleted file mode 100644 index 6f33793f1..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue261/issue261.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package issue261; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "google/protobuf/duration.proto"; - -message MapStdTypes { - map nullableDuration = 3 [(gogoproto.stdduration) = true]; -} diff --git a/vendor/github.com/gogo/protobuf/test/issue262/Makefile b/vendor/github.com/gogo/protobuf/test/issue262/Makefile deleted file mode 100644 index 555477909..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue262/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - go install github.com/gogo/protobuf/protoc-gen-gogoslick - protoc-min-version --version="3.0.0" --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ - --gogoslick_out=Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types:. timefail.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go b/vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go deleted file mode 100644 index fc008e97e..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue262/timefail.pb.go +++ /dev/null @@ -1,389 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: timefail.proto - -/* - Package timefail is a generated protocol buffer package. - - It is generated from these files: - timefail.proto - - It has these top-level messages: - TimeFail -*/ -package timefail - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" - -import time "time" - -import strings "strings" -import reflect "reflect" - -import types "github.com/gogo/protobuf/types" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 TimeFail struct { - TimeTest *time.Time `protobuf:"bytes,1,opt,name=time_test,json=timeTest,stdtime" json:"time_test,omitempty"` -} - -func (m *TimeFail) Reset() { *m = TimeFail{} } -func (*TimeFail) ProtoMessage() {} -func (*TimeFail) Descriptor() ([]byte, []int) { return fileDescriptorTimefail, []int{0} } - -func (m *TimeFail) GetTimeTest() *time.Time { - if m != nil { - return m.TimeTest - } - return nil -} - -func init() { - proto.RegisterType((*TimeFail)(nil), "timefail.TimeFail") -} -func (this *TimeFail) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TimeFail) - if !ok { - that2, ok := that.(TimeFail) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.TimeTest == nil { - if this.TimeTest != nil { - return false - } - } else if !this.TimeTest.Equal(*that1.TimeTest) { - return false - } - return true -} -func (this *TimeFail) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&timefail.TimeFail{") - s = append(s, "TimeTest: "+fmt.Sprintf("%#v", this.TimeTest)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTimefail(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 *TimeFail) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TimeFail) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.TimeTest != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTimefail(dAtA, i, uint64(types.SizeOfStdTime(*m.TimeTest))) - n1, err := types.StdTimeMarshalTo(*m.TimeTest, dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - return i, nil -} - -func encodeVarintTimefail(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 *TimeFail) Size() (n int) { - var l int - _ = l - if m.TimeTest != nil { - l = types.SizeOfStdTime(*m.TimeTest) - n += 1 + l + sovTimefail(uint64(l)) - } - return n -} - -func sovTimefail(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTimefail(x uint64) (n int) { - return sovTimefail(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *TimeFail) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TimeFail{`, - `TimeTest:` + strings.Replace(fmt.Sprintf("%v", this.TimeTest), "Timestamp", "google_protobuf1.Timestamp", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringTimefail(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *TimeFail) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimefail - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeFail: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeFail: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeTest", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimefail - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTimefail - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TimeTest == nil { - m.TimeTest = new(time.Time) - } - if err := types.StdTimeUnmarshal(m.TimeTest, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTimefail(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTimefail - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTimefail(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, ErrIntOverflowTimefail - } - 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, ErrIntOverflowTimefail - } - 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, ErrIntOverflowTimefail - } - 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, ErrInvalidLengthTimefail - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimefail - } - 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 := skipTimefail(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 ( - ErrInvalidLengthTimefail = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTimefail = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("timefail.proto", fileDescriptorTimefail) } - -var fileDescriptorTimefail = []byte{ - // 202 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xc9, 0xcc, 0x4d, - 0x4d, 0x4b, 0xcc, 0xcc, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x94, 0x92, 0x4f, 0xcf, - 0xcf, 0x4f, 0xcf, 0x49, 0x45, 0xa8, 0x02, 0x19, 0x54, 0x5c, 0x92, 0x98, 0x5b, 0x00, 0x51, 0xa0, - 0xe4, 0xc9, 0xc5, 0x11, 0x92, 0x99, 0x9b, 0xea, 0x96, 0x98, 0x99, 0x23, 0x64, 0xcb, 0xc5, 0x09, - 0x92, 0x8e, 0x2f, 0x49, 0x2d, 0x2e, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83, - 0x18, 0xa0, 0x07, 0x33, 0x40, 0x2f, 0x04, 0x66, 0x80, 0x13, 0xcb, 0x84, 0xfb, 0xf2, 0x8c, 0x41, - 0x60, 0xa7, 0x85, 0xa4, 0x16, 0x97, 0x38, 0xe9, 0x5c, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, - 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x0d, 0x8f, 0xe4, 0x18, 0x57, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, - 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x5f, 0x3c, 0x92, 0x63, 0xf8, 0xf0, - 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x24, 0x36, 0xb0, 0x89, 0xc6, 0x80, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xc3, 0xd6, 0xbd, 0x67, 0xeb, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue262/timefail.proto b/vendor/github.com/gogo/protobuf/test/issue262/timefail.proto deleted file mode 100644 index 06bce8bef..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue262/timefail.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -package timefail; - -message TimeFail { - google.protobuf.Timestamp time_test = 1 [(gogoproto.stdtime) = true]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto b/vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto deleted file mode 100644 index 59dff1394..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue270/a/a1.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto2"; - -package issue270.a; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/gogo/protobuf/test/issue270/a/a2.proto"; - -option (gogoproto.populate_all) = true; - -message A1 { - optional A2 a2 = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto b/vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto deleted file mode 100644 index 1d16ff79a..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue270/a/a2.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto2"; - -package issue270.a; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; -import "github.com/gogo/protobuf/test/issue270/b/b.proto"; - -option (gogoproto.populate_all) = true; - -message A2 { - optional issue270.b.B b = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/issue270/b/b.proto b/vendor/github.com/gogo/protobuf/test/issue270/b/b.proto deleted file mode 100644 index cb71c2480..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue270/b/b.proto +++ /dev/null @@ -1,6 +0,0 @@ -syntax = "proto2"; - -package issue270.b; - -message B { -} diff --git a/vendor/github.com/gogo/protobuf/test/issue270/doc.go b/vendor/github.com/gogo/protobuf/test/issue270/doc.go deleted file mode 100644 index 6631cbcfd..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue270/doc.go +++ /dev/null @@ -1 +0,0 @@ -package issue270 diff --git a/vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go b/vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go deleted file mode 100644 index b3faaa56e..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue270/issue270_test.go +++ /dev/null @@ -1,51 +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 issue270 - -import ( - "os" - "os/exec" - "strings" - "testing" -) - -func TestPopulateWarning(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:.", "a/a1.proto") - data, err := cmd.CombinedOutput() - dataStr := string(data) - t.Logf("received error = %v and output = %v", err, dataStr) - if err != nil { - t.Error(err) - } else if strings.Contains(dataStr, "WARNING") { - t.Errorf("Unexpected WARNING: %s", dataStr) - } - if err = os.Remove("a/a1.pb.go"); err != nil && !os.IsNotExist(err) { - t.Error(err) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/Makefile b/vendor/github.com/gogo/protobuf/test/issue312/events/Makefile deleted file mode 100644 index fc6be53f5..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue312/events/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc --proto_path=.:$(GOPATH)/src/:$(GOPATH)/src/github.com/gogo/protobuf/protobuf/ \ - --gogo_out=. events.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go b/vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go deleted file mode 100644 index da1232f76..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue312/events/events.pb.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: events.proto - -/* -Package events is a generated protocol buffer package. - -It is generated from these files: - events.proto - -It has these top-level messages: - Subtype -*/ -package events - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import issue312 "github.com/gogo/protobuf/test/issue312" -import _ "github.com/gogo/protobuf/gogoproto" - -import bytes "bytes" - -import strings "strings" -import reflect "reflect" - -// 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 Subtype struct { - State *issue312.TaskState `protobuf:"varint,4,opt,name=state,enum=issue312.TaskState" json:"state,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *Subtype) Reset() { *m = Subtype{} } -func (m *Subtype) String() string { return proto.CompactTextString(m) } -func (*Subtype) ProtoMessage() {} -func (*Subtype) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{0} } - -func (m *Subtype) GetState() issue312.TaskState { - if m != nil && m.State != nil { - return *m.State - } - return issue312.TaskState_TASK_STAGING -} - -func init() { - proto.RegisterType((*Subtype)(nil), "issue312.events.Subtype") -} -func (this *Subtype) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Subtype) - if !ok { - that2, ok := that.(Subtype) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.State != nil && that1.State != nil { - if *this.State != *that1.State { - return false - } - } else if this.State != nil { - return false - } else if that1.State != nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Subtype) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&events.Subtype{") - if this.State != nil { - s = append(s, "State: "+valueToGoStringEvents(this.State, "issue312.TaskState")+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringEvents(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 NewPopulatedSubtype(r randyEvents, easy bool) *Subtype { - this := &Subtype{} - if r.Intn(10) != 0 { - v1 := issue312.TaskState([]int32{6, 0, 1}[r.Intn(3)]) - this.State = &v1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEvents(r, 5) - } - return this -} - -type randyEvents interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEvents(r randyEvents) 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 randStringEvents(r randyEvents) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneEvents(r) - } - return string(tmps) -} -func randUnrecognizedEvents(r randyEvents, 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 = randFieldEvents(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEvents(dAtA []byte, r randyEvents, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEvents(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateEvents(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateEvents(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 = encodeVarintPopulateEvents(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEvents(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEvents(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 encodeVarintPopulateEvents(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 init() { proto.RegisterFile("events.proto", fileDescriptorEvents) } - -var fileDescriptorEvents = []byte{ - // 162 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0x2d, 0x4b, 0xcd, - 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xcf, 0x2c, 0x2e, 0x2e, 0x4d, 0x35, - 0x36, 0x34, 0xd2, 0x83, 0x08, 0x4b, 0x99, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, - 0xe7, 0xea, 0xa7, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0x97, 0xa4, 0x16, - 0x97, 0xe8, 0xc3, 0x94, 0xc3, 0x19, 0x10, 0x73, 0xa4, 0x74, 0x71, 0x6a, 0x03, 0xf1, 0xc0, 0x1c, - 0x30, 0x0b, 0xa2, 0x5c, 0xc9, 0x84, 0x8b, 0x3d, 0xb8, 0x34, 0xa9, 0xa4, 0xb2, 0x20, 0x55, 0x48, - 0x93, 0x8b, 0xb5, 0xb8, 0x24, 0xb1, 0x24, 0x55, 0x82, 0x45, 0x81, 0x51, 0x83, 0xcf, 0x48, 0x58, - 0x0f, 0x6e, 0x72, 0x48, 0x62, 0x71, 0x76, 0x30, 0x48, 0x2a, 0x08, 0xa2, 0xc2, 0x49, 0xe2, 0xc3, - 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, 0xdc, 0xf1, 0x48, 0x8e, 0x31, - 0x8a, 0x0d, 0xe2, 0x6a, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x99, 0x76, 0xdc, 0x82, 0xd5, 0x00, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/events.proto b/vendor/github.com/gogo/protobuf/test/issue312/events/events.proto deleted file mode 100644 index 23bd12999..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue312/events/events.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto2"; - -package issue312.events; - -import "github.com/gogo/protobuf/test/issue312/issue312.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option go_package = "events"; -option (gogoproto.gostring_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -message Subtype { - optional issue312.TaskState state = 4; -} - diff --git a/vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go b/vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go deleted file mode 100644 index 577053695..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue312/events/eventspb_test.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: events.proto - -/* -Package events is a generated protocol buffer package. - -It is generated from these files: - events.proto - -It has these top-level messages: - Subtype -*/ -package events - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -import math "math" -import _ "github.com/gogo/protobuf/test/issue312" -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 TestSubtypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubtype(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subtype{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubtypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubtype(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subtype{} - err = 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 TestSubtypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubtype(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subtype{} - if err := 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 TestSubtypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubtype(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subtype{} - if err := 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 TestSubtypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubtype(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue322/Makefile b/vendor/github.com/gogo/protobuf/test/issue322/Makefile deleted file mode 100644 index c7748e443..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue322/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogofast - protoc-min-version --version="3.0.0" --gogofast_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go b/vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go deleted file mode 100644 index 67b0259bc..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue322/issue322.pb.go +++ /dev/null @@ -1,580 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue322.proto - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - issue322.proto - -It has these top-level messages: - OneofTest -*/ -package test - -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 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 - -// 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 OneofTest struct { - // Types that are valid to be assigned to Union: - // *OneofTest_I - Union isOneofTest_Union `protobuf_oneof:"union"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OneofTest) Reset() { *m = OneofTest{} } -func (m *OneofTest) String() string { return proto.CompactTextString(m) } -func (*OneofTest) ProtoMessage() {} -func (*OneofTest) Descriptor() ([]byte, []int) { return fileDescriptorIssue322, []int{0} } - -const Default_OneofTest_I int32 = 4 - -type isOneofTest_Union interface { - isOneofTest_Union() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int -} - -type OneofTest_I struct { - I int32 `protobuf:"varint,1,opt,name=i,oneof,def=4"` -} - -func (*OneofTest_I) isOneofTest_Union() {} - -func (m *OneofTest) GetUnion() isOneofTest_Union { - if m != nil { - return m.Union - } - return nil -} - -func (m *OneofTest) GetI() int32 { - if x, ok := m.GetUnion().(*OneofTest_I); ok { - return x.I - } - return Default_OneofTest_I -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofTest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofTest_OneofMarshaler, _OneofTest_OneofUnmarshaler, _OneofTest_OneofSizer, []interface{}{ - (*OneofTest_I)(nil), - } -} - -func _OneofTest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofTest) - // union - switch x := m.Union.(type) { - case *OneofTest_I: - _ = b.EncodeVarint(1<<3 | proto.WireVarint) - _ = b.EncodeVarint(uint64(x.I)) - case nil: - default: - return fmt.Errorf("OneofTest.Union has unexpected type %T", x) - } - return nil -} - -func _OneofTest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofTest) - switch tag { - case 1: // union.i - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Union = &OneofTest_I{int32(x)} - return true, err - default: - return false, nil - } -} - -func _OneofTest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofTest) - // union - switch x := m.Union.(type) { - case *OneofTest_I: - n += proto.SizeVarint(1<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.I)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterType((*OneofTest)(nil), "test.OneofTest") -} -func (this *OneofTest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofTest) - if !ok { - that2, ok := that.(OneofTest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Union == nil { - if this.Union != nil { - return false - } - } else if this.Union == nil { - return false - } else if !this.Union.Equal(that1.Union) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *OneofTest_I) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofTest_I) - if !ok { - that2, ok := that.(OneofTest_I) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.I != that1.I { - return false - } - return true -} -func (this *OneofTest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&test.OneofTest{") - if this.Union != nil { - s = append(s, "Union: "+fmt.Sprintf("%#v", this.Union)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OneofTest_I) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&test.OneofTest_I{` + - `I:` + fmt.Sprintf("%#v", this.I) + `}`}, ", ") - return s -} -func valueToGoStringIssue322(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 *OneofTest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OneofTest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Union != nil { - nn1, err := m.Union.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 *OneofTest_I) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x8 - i++ - i = encodeVarintIssue322(dAtA, i, uint64(m.I)) - return i, nil -} -func encodeVarintIssue322(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 NewPopulatedOneofTest(r randyIssue322, easy bool) *OneofTest { - this := &OneofTest{} - oneofNumber_Union := []int32{1}[r.Intn(1)] - switch oneofNumber_Union { - case 1: - this.Union = NewPopulatedOneofTest_I(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedIssue322(r, 2) - } - return this -} - -func NewPopulatedOneofTest_I(r randyIssue322, easy bool) *OneofTest_I { - this := &OneofTest_I{} - this.I = int32(r.Int31()) - if r.Intn(2) == 0 { - this.I *= -1 - } - return this -} - -type randyIssue322 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIssue322(r randyIssue322) 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 randStringIssue322(r randyIssue322) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneIssue322(r) - } - return string(tmps) -} -func randUnrecognizedIssue322(r randyIssue322, 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 = randFieldIssue322(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldIssue322(dAtA []byte, r randyIssue322, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateIssue322(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateIssue322(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateIssue322(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 = encodeVarintPopulateIssue322(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateIssue322(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateIssue322(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 encodeVarintPopulateIssue322(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 *OneofTest) Size() (n int) { - var l int - _ = l - if m.Union != nil { - n += m.Union.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *OneofTest_I) Size() (n int) { - var l int - _ = l - n += 1 + sovIssue322(uint64(m.I)) - return n -} - -func sovIssue322(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIssue322(x uint64) (n int) { - return sovIssue322(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *OneofTest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue322 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OneofTest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OneofTest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field I", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIssue322 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.Union = &OneofTest_I{v} - default: - iNdEx = preIndex - skippy, err := skipIssue322(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue322 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIssue322(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, ErrIntOverflowIssue322 - } - 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, ErrIntOverflowIssue322 - } - 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, ErrIntOverflowIssue322 - } - 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, ErrInvalidLengthIssue322 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue322 - } - 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 := skipIssue322(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 ( - ErrInvalidLengthIssue322 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIssue322 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("issue322.proto", fileDescriptorIssue322) } - -var fileDescriptorIssue322 = []byte{ - // 149 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, - 0x4d, 0x35, 0x36, 0x32, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x29, 0x49, 0x2d, 0x2e, - 0x91, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, - 0xcf, 0xd7, 0x07, 0x4b, 0x26, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa4, 0xa4, - 0xce, 0xc5, 0xe9, 0x9f, 0x97, 0x9a, 0x9f, 0x16, 0x92, 0x5a, 0x5c, 0x22, 0x24, 0xc8, 0xc5, 0x98, - 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6a, 0xc5, 0x68, 0xe2, 0xc1, 0x10, 0xc4, 0x98, 0xe9, 0xc4, - 0xce, 0xc5, 0x5a, 0x9a, 0x97, 0x99, 0x9f, 0xe7, 0x24, 0xf3, 0xe1, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, - 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0xee, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, - 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x64, 0xd7, - 0x6a, 0x8c, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue322/issue322.proto b/vendor/github.com/gogo/protobuf/test/issue322/issue322.proto deleted file mode 100644 index e3045de10..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue322/issue322.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto2"; -package test; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.gostring_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.testgen_all) = true; - -message OneofTest { - oneof union { - int32 i = 1 [default = 4]; - } -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go b/vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go deleted file mode 100644 index 4e5550ff5..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue322/issue322pb_test.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue322.proto - -/* -Package test is a generated protocol buffer package. - -It is generated from these files: - issue322.proto - -It has these top-level messages: - OneofTest -*/ -package test - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestOneofTestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOneofTestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofTest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofTest{} - if err := proto.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 TestOneofTestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofTest(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofTest{} - err = 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 TestOneofTestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofTest(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofTest{} - if err := 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 TestOneofTestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofTest(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofTest{} - if err := 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 TestOneofTestGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofTest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOneofTestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofTest(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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/github.com/gogo/protobuf/test/issue330/Makefile b/vendor/github.com/gogo/protobuf/test/issue330/Makefile deleted file mode 100644 index e085e13d2..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue330/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto diff --git a/vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go b/vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go deleted file mode 100644 index 7020bf9bd..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue330/issue330.pb.go +++ /dev/null @@ -1,398 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue330.proto - -/* -Package issue330 is a generated protocol buffer package. - -It is generated from these files: - issue330.proto - -It has these top-level messages: - Object -*/ -package issue330 - -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 - -// 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 Object struct { - Type TypeIdentifier `protobuf:"varint,1,opt,name=type,proto3,casttype=TypeIdentifier" json:"type,omitempty"` -} - -func (m *Object) Reset() { *m = Object{} } -func (m *Object) String() string { return proto.CompactTextString(m) } -func (*Object) ProtoMessage() {} -func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorIssue330, []int{0} } - -func (m *Object) GetType() TypeIdentifier { - if m != nil { - return m.Type - } - return 0 -} - -func init() { - proto.RegisterType((*Object)(nil), "issue330.Object") -} -func (this *Object) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Object) - if !ok { - that2, ok := that.(Object) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - return true -} -func (m *Object) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Object) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Type != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintIssue330(dAtA, i, uint64(m.Type)) - } - return i, nil -} - -func encodeVarintIssue330(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 NewPopulatedObject(r randyIssue330, easy bool) *Object { - this := &Object{} - this.Type = TypeIdentifier(r.Uint32()) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyIssue330 interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneIssue330(r randyIssue330) 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 randStringIssue330(r randyIssue330) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneIssue330(r) - } - return string(tmps) -} -func randUnrecognizedIssue330(r randyIssue330, 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 = randFieldIssue330(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldIssue330(dAtA []byte, r randyIssue330, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateIssue330(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateIssue330(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateIssue330(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 = encodeVarintPopulateIssue330(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateIssue330(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateIssue330(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 encodeVarintPopulateIssue330(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 *Object) Size() (n int) { - var l int - _ = l - if m.Type != 0 { - n += 1 + sovIssue330(uint64(m.Type)) - } - return n -} - -func sovIssue330(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozIssue330(x uint64) (n int) { - return sovIssue330(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -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 ErrIntOverflowIssue330 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 != 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 ErrIntOverflowIssue330 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= (TypeIdentifier(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIssue330(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthIssue330 - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIssue330(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, ErrIntOverflowIssue330 - } - 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, ErrIntOverflowIssue330 - } - 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, ErrIntOverflowIssue330 - } - 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, ErrInvalidLengthIssue330 - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIssue330 - } - 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 := skipIssue330(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 ( - ErrInvalidLengthIssue330 = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIssue330 = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("issue330.proto", fileDescriptorIssue330) } - -var fileDescriptorIssue330 = []byte{ - // 158 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, - 0x4d, 0x35, 0x36, 0x36, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe0, 0x62, - 0xf3, 0x4f, 0xca, 0x4a, 0x4d, 0x2e, 0x11, 0x52, 0xe3, 0x62, 0x29, 0xa9, 0x2c, 0x48, 0x95, 0x60, - 0x54, 0x60, 0xd4, 0xe0, 0x75, 0x12, 0xfa, 0x75, 0x4f, 0x9e, 0x2f, 0xa4, 0xb2, 0x20, 0xd5, 0x33, - 0x25, 0x35, 0xaf, 0x24, 0x33, 0x2d, 0x33, 0xb5, 0x28, 0x08, 0x2c, 0xef, 0x24, 0xf3, 0xe3, 0xa1, - 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x1e, 0x78, 0x24, 0xc7, 0x78, 0xe2, - 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x26, 0xb1, 0x81, 0x8d, 0x35, - 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x41, 0xc2, 0x37, 0xa1, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue330/issue330.proto b/vendor/github.com/gogo/protobuf/test/issue330/issue330.proto deleted file mode 100644 index 4bfdda457..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue330/issue330.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package issue330; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.benchgen_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.populate_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.testgen_all) = true; -option (gogoproto.unmarshaler_all) = true; - -message Object { - uint32 type = 1 [(gogoproto.casttype) = "TypeIdentifier"]; -} diff --git a/vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go b/vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go deleted file mode 100644 index e24c30dda..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue330/issue330pb_test.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue330.proto - -/* -Package issue330 is a generated protocol buffer package. - -It is generated from these files: - issue330.proto - -It has these top-level messages: - Object -*/ -package issue330 - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 TestObjectProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestObjectMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - if err := proto.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 BenchmarkObjectProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Object, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedObject(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkObjectProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedObject(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Object{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestObjectJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Object{} - err = 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 TestObjectProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Object{} - if err := 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 TestObjectProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Object{} - if err := 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 TestObjectSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedObject(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkObjectSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Object, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedObject(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/issue330/type.go b/vendor/github.com/gogo/protobuf/test/issue330/type.go deleted file mode 100644 index 556b21b87..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue330/type.go +++ /dev/null @@ -1,17 +0,0 @@ -package issue330 - -type TypeIdentifier uint32 - -const ( - UnknownType TypeIdentifier = 0 - UserType TypeIdentifier = 20 -) - -func (t TypeIdentifier) String() string { - switch t { - case 20: - return "User" - default: - return "Unknown" - } -} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/Makefile b/vendor/github.com/gogo/protobuf/test/issue34/Makefile deleted file mode 100644 index ecb3e74ea..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue34/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go b/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go deleted file mode 100644 index a9fbde489..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue34/issue34_test.go +++ /dev/null @@ -1,82 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/issue34/proto.pb.go b/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go deleted file mode 100644 index f50fcba19..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue34/proto.pb.go +++ /dev/null @@ -1,351 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto.proto - -/* -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 - -// 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 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 (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } - -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 (*FooWithRepeated) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{1} } - -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(m.Bar[:0], dAtA[iNdEx:postIndex]...) - if m.Bar == nil { - m.Bar = []byte{} - } - 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") -) - -func init() { proto.RegisterFile("proto.proto", fileDescriptorProto) } - -var fileDescriptorProto = []byte{ - // 126 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xec, 0x99, 0xc5, 0xc5, 0xa5, 0xa9, 0xc6, 0x26, 0x52, 0xba, 0xe9, - 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, - 0xf9, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xfa, 0x94, 0xc4, 0xb9, 0x98, 0xdd, - 0xf2, 0xf3, 0x85, 0x04, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x78, 0x82, - 0x40, 0x4c, 0x25, 0x65, 0x2e, 0x7e, 0xb7, 0xfc, 0xfc, 0xf0, 0xcc, 0x92, 0x8c, 0xa0, 0xd4, 0x82, - 0xd4, 0xc4, 0x92, 0xd4, 0x14, 0x84, 0x22, 0x66, 0xa8, 0x22, 0x27, 0x96, 0x0b, 0x8f, 0xe4, 0x18, - 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb2, 0x1b, 0xef, 0x89, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue34/proto.proto b/vendor/github.com/gogo/protobuf/test/issue34/proto.proto deleted file mode 100644 index 5531befbb..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue34/proto.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/issue42order/Makefile b/vendor/github.com/gogo/protobuf/test/issue42order/Makefile deleted file mode 100644 index 5b8e59bdb..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue42order/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. issue42.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go deleted file mode 100644 index c13601c03..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.pb.go +++ /dev/null @@ -1,598 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: issue42.proto - -/* - 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 binary "encoding/binary" - -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 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 (*UnorderedFields) Descriptor() ([]byte, []int) { return fileDescriptorIssue42, []int{0} } - -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 (*OrderedFields) Descriptor() ([]byte, []int) { return fileDescriptorIssue42, []int{1} } - -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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.B)) - i += 8 - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.B)) - i += 8 - } - 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 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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") -) - -func init() { proto.RegisterFile("issue42.proto", fileDescriptorIssue42) } - -var fileDescriptorIssue42 = []byte{ - // 144 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcd, 0x2c, 0x2e, 0x2e, - 0x4d, 0x35, 0x31, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0xa5, 0x74, 0xd3, - 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, - 0xf2, 0x49, 0xa5, 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0xf4, 0x29, 0xe9, 0x72, 0xf1, 0x87, - 0xe6, 0xe5, 0x17, 0xa5, 0xa4, 0x16, 0xa5, 0xa6, 0xb8, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x0b, 0xf1, - 0x70, 0x31, 0x3a, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xb0, 0x05, 0x31, 0x3a, 0x81, 0x78, 0x8e, 0x12, - 0x5c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x8c, 0x8e, 0x4a, 0xda, 0x5c, 0xbc, 0xfe, 0xc4, 0x2a, 0x76, - 0x12, 0xf8, 0xf1, 0x50, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, - 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0x94, 0xa9, 0xfd, 0x9c, 0xb5, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto b/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto deleted file mode 100644 index 5e8b77be5..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue42order/issue42.proto +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/issue42order/order_test.go b/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go deleted file mode 100644 index 571731c7c..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue42order/order_test.go +++ /dev/null @@ -1,56 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/issue8/Makefile b/vendor/github.com/gogo/protobuf/test/issue8/Makefile deleted file mode 100644 index ecb3e74ea..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue8/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. proto.proto) diff --git a/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go b/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go deleted file mode 100644 index ca374715d..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue8/proto.pb.go +++ /dev/null @@ -1,362 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto.proto - -/* -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" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto1.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 _ = proto1.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -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 (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorProto, []int{0} } - -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 { - return this == nil - } - - that1, ok := that.(*Foo) - if !ok { - that2, ok := that.(Foo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 proto1.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") -) - -func init() { proto1.RegisterFile("proto.proto", fileDescriptorProto) } - -var fileDescriptorProto = []byte{ - // 109 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2e, 0x28, 0xca, 0x2f, - 0xc9, 0xd7, 0x03, 0x93, 0x42, 0xac, 0x60, 0x4a, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, - 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x3d, 0x3f, 0x3d, 0x5f, 0x1f, 0x2c, 0x9c, 0x54, 0x9a, 0x06, 0xe6, - 0x81, 0x39, 0x60, 0x16, 0x44, 0x97, 0x92, 0x38, 0x17, 0xb3, 0x5b, 0x7e, 0xbe, 0x90, 0x00, 0x17, - 0x73, 0x52, 0x62, 0x91, 0x04, 0xa3, 0x02, 0x93, 0x06, 0x4b, 0x10, 0x88, 0xe9, 0x24, 0xf0, 0xe3, - 0xa1, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0x08, - 0x08, 0x00, 0x00, 0xff, 0xff, 0x54, 0x06, 0x1b, 0x76, 0x6e, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/issue8/proto.proto b/vendor/github.com/gogo/protobuf/test/issue8/proto.proto deleted file mode 100644 index 2c9bcf46f..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue8/proto.proto +++ /dev/null @@ -1,42 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/test/issue8/protopb_test.go b/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go deleted file mode 100644 index 502c16ff5..000000000 --- a/vendor/github.com/gogo/protobuf/test/issue8/protopb_test.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto.proto - -/* -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 rand "math/rand" -import time "time" -import proto1 "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, false) - dAtA, err := proto1.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - if err := proto1.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto1.Unmarshal(littlefuzz, msg) - } -} - -func TestFooJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - dAtA := proto1.MarshalTextString(p) - msg := &Foo{} - if err := proto1.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - dAtA := proto1.CompactTextString(p) - msg := &Foo{} - if err := proto1.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/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go b/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go deleted file mode 100644 index 1e0b08d22..000000000 --- a/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo.go +++ /dev/null @@ -1 +0,0 @@ -package jsonpb_gogo diff --git a/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go b/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go deleted file mode 100644 index ec2558773..000000000 --- a/vendor/github.com/gogo/protobuf/test/jsonpb-gogo/jsonpb_gogo_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package jsonpb_gogo - -import ( - "testing" - - "github.com/gogo/protobuf/jsonpb" -) - -// customFieldMessage implements protobuf.Message but is not a normal generated message type. -type customFieldMessage struct { - someField string //this is not a proto field -} - -func (m *customFieldMessage) Reset() { - m.someField = "hello" -} - -func (m *customFieldMessage) String() string { - return m.someField -} - -func (m *customFieldMessage) ProtoMessage() { -} - -func TestUnmarshalWithJSONPBUnmarshaler(t *testing.T) { - rawJson := `{}` - marshaler := &jsonpb.Marshaler{} - msg := &customFieldMessage{someField: "Ignore me"} - str, err := marshaler.MarshalToString(msg) - if err != nil { - t.Errorf("an unexpected error occurred when marshaling message: %v", err) - } - if str != rawJson { - t.Errorf("marshaled JSON was incorrect: got %s, wanted %s", str, rawJson) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile b/vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile deleted file mode 100644 index 80a46900c..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2017, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogofast - protoc-gen-combo --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogo_out=. map.proto - find combos -type d -not -name combos -exec cp map_test.go.in {}/map_test.go \; diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go deleted file mode 100644 index 1f97751b0..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.pb.go +++ /dev/null @@ -1,1435 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/map.proto - -/* - Package mapdefaults is a generated protocol buffer package. - - It is generated from these files: - combos/both/map.proto - - It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 MapTest struct { - StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MapTest) Reset() { *m = MapTest{} } -func (*MapTest) ProtoMessage() {} -func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } - -type FakeMap struct { - Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` -} - -func (m *FakeMap) Reset() { *m = FakeMap{} } -func (*FakeMap) ProtoMessage() {} -func (*FakeMap) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{1} } - -type FakeMapEntry struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` -} - -func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } -func (*FakeMapEntry) ProtoMessage() {} -func (*FakeMapEntry) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{2} } - -func init() { - proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") - proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") - proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") -} -func (this *MapTest) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMap) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMapEntry) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func MapDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3869 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0xd6, 0xe2, 0x87, 0x04, 0x0e, 0x40, 0x70, 0xb9, 0xa4, 0x24, 0x88, 0x8e, 0x21, 0x0a, 0xb6, - 0x23, 0xda, 0x6e, 0xc0, 0x8c, 0x64, 0xc9, 0x12, 0xd4, 0xd8, 0x05, 0x41, 0x88, 0x81, 0x4a, 0x12, - 0xc8, 0x82, 0x8c, 0x7f, 0x32, 0x9d, 0x9d, 0xe5, 0xe2, 0x02, 0x58, 0x69, 0xb1, 0xbb, 0xd9, 0x5d, - 0x48, 0xa6, 0xa6, 0x33, 0x55, 0xc7, 0xfd, 0x99, 0x4c, 0xa7, 0xff, 0x9d, 0x49, 0xe2, 0x3a, 0xee, - 0xcf, 0x4c, 0xeb, 0x34, 0xfd, 0x73, 0x9a, 0x36, 0x4d, 0xfb, 0xd4, 0x97, 0xb4, 0x7e, 0xea, 0x24, - 0x6f, 0x7d, 0xe8, 0x83, 0xc5, 0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7, 0x8e, 0xe3, 0x03, 0x8a, 0x09, 0x3b, 0x71, 0xe6, 0xc7, 0x74, 0x62, 0x05, - 0x32, 0x26, 0x72, 0x3d, 0xd4, 0xa6, 0x11, 0x11, 0x9f, 0x32, 0xa6, 0x80, 0x82, 0xc6, 0x43, 0x2a, - 0xf1, 0x63, 0x85, 0xd4, 0xf3, 0x30, 0xef, 0x9b, 0xa4, 0x38, 0xaa, 0xd9, 0xe5, 0xb1, 0xb9, 0x16, - 0x65, 0x49, 0xa9, 0xc6, 0x71, 0x32, 0x86, 0xc9, 0x39, 0x14, 0x1a, 0x4b, 0x1b, 0x00, 0x96, 0x89, - 0xac, 0x8e, 0xd2, 0x46, 0x9a, 0x91, 0x4f, 0x1d, 0xe1, 0xa5, 0x06, 0x56, 0x19, 0xf3, 0x92, 0x45, - 0xa5, 0x9a, 0x21, 0x5d, 0x1d, 0x86, 0xda, 0xec, 0x11, 0x91, 0xb2, 0x4d, 0x37, 0xd9, 0x58, 0xb4, - 0xed, 0x41, 0xce, 0x41, 0x38, 0xee, 0x51, 0x9b, 0xbd, 0x59, 0x9a, 0x18, 0x51, 0x8a, 0x7c, 0x33, - 0x99, 0xc1, 0xe8, 0x8b, 0xcd, 0x39, 0xc1, 0xa1, 0xf4, 0x08, 0xf8, 0x02, 0x85, 0x84, 0x15, 0x90, - 0x2c, 0x94, 0xe5, 0xc2, 0x1d, 0xb5, 0x8f, 0x96, 0xef, 0x42, 0x2e, 0xec, 0x1e, 0x69, 0x09, 0x92, - 0xae, 0xa7, 0x3a, 0x1e, 0x89, 0xc2, 0xa4, 0x4c, 0x07, 0x92, 0x08, 0x71, 0x64, 0xb6, 0x49, 0x96, - 0x4b, 0xca, 0xf8, 0x5f, 0xe9, 0xa7, 0x86, 0x2f, 0x1c, 0x27, 0x2f, 0xfc, 0xc9, 0xf1, 0x15, 0x0d, - 0x31, 0x8f, 0xbe, 0xf7, 0xf2, 0xd3, 0x30, 0x17, 0x7a, 0x81, 0x69, 0x1f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 0x96, 0x2e, 0xc2, - 0x2c, 0x32, 0x3d, 0x47, 0x47, 0x2e, 0x33, 0xe0, 0x4c, 0xc8, 0x00, 0xa6, 0x46, 0x9f, 0xcc, 0x35, - 0x8b, 0x5b, 0x90, 0x0d, 0x4e, 0x4c, 0xfb, 0x6c, 0x2c, 0xb5, 0xbc, 0x1e, 0xfb, 0x19, 0x6c, 0x5a, - 0xa6, 0x83, 0xf5, 0x8d, 0x37, 0xef, 0x17, 0x4e, 0x7c, 0xef, 0x7e, 0xe1, 0xc4, 0xbf, 0xdc, 0x2f, - 0x9c, 0x78, 0xeb, 0x7e, 0x41, 0x78, 0xf7, 0x7e, 0x41, 0x78, 0xff, 0x7e, 0x41, 0xb8, 0x77, 0x58, - 0x10, 0xbe, 0x7e, 0x58, 0x10, 0xde, 0x38, 0x2c, 0x08, 0xdf, 0x39, 0x2c, 0x08, 0x6f, 0x1e, 0x16, - 0x84, 0xef, 0x1d, 0x16, 0x84, 0xb7, 0x0e, 0x0b, 0xc2, 0x0f, 0x0f, 0x0b, 0x27, 0xde, 0x3d, 0x2c, - 0x08, 0xef, 0x1f, 0x16, 0x4e, 0xdc, 0xfb, 0x41, 0xe1, 0xc4, 0xfe, 0x0c, 0xf1, 0xed, 0xc5, 0xff, - 0x0f, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x52, 0x3a, 0xd6, 0x3f, 0x32, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -func (this *MapTest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapTest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapTest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapTest but is not nil && this == nil") - } - if len(this.StrStr) != len(that1.StrStr) { - return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) - } - } - return nil -} -func (this *MapTest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.StrStr) != len(that1.StrStr) { - return false - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return false - } - } - return true -} -func (this *FakeMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") - } - if len(this.Entries) != len(that1.Entries) { - return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) - } - } - return nil -} -func (this *FakeMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return false - } - } - return true -} -func (this *FakeMapEntry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMapEntry") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") - } - if this.Key != that1.Key { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.Other != that1.Other { - return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) - } - return nil -} -func (this *FakeMapEntry) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Key != that1.Key { - return false - } - if this.Value != that1.Value { - return false - } - if this.Other != that1.Other { - return false - } - return true -} -func (this *MapTest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.MapTest{") - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - if this.StrStr != nil { - s = append(s, "StrStr: "+mapStringForStrStr+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.FakeMap{") - if this.Entries != nil { - s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMapEntry) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mapdefaults.FakeMapEntry{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMap(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 *MapTest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapTest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StrStr) > 0 { - for k := range m.StrStr { - dAtA[i] = 0xa - i++ - v := m.StrStr[k] - mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - i = encodeVarintMap(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintMap(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - return i, nil -} - -func (m *FakeMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FakeMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for _, msg := range m.Entries { - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *FakeMapEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMap(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if len(m.Other) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintMap(dAtA, i, uint64(len(m.Other))) - i += copy(dAtA[i:], m.Other) - } - return i, nil -} - -func encodeVarintMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { - this := &MapTest{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.StrStr = make(map[string]string) - for i := 0; i < v1; i++ { - this.StrStr[randStringMap(r)] = randStringMap(r) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { - this := &FakeMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(5) - this.Entries = make([]*FakeMapEntry, v2) - for i := 0; i < v2; i++ { - this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { - this := &FakeMapEntry{} - this.Key = string(randStringMap(r)) - this.Value = string(randStringMap(r)) - this.Other = string(randStringMap(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyMap interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMap(r randyMap) 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 randStringMap(r randyMap) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneMap(r) - } - return string(tmps) -} -func randUnrecognizedMap(r randyMap, 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 = randFieldMap(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateMap(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 = encodeVarintPopulateMap(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMap(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 encodeVarintPopulateMap(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 *MapTest) Size() (n int) { - var l int - _ = l - if len(m.StrStr) > 0 { - for k, v := range m.StrStr { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FakeMap) Size() (n int) { - var l int - _ = l - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovMap(uint64(l)) - } - } - return n -} - -func (m *FakeMapEntry) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Other) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - return n -} - -func sovMap(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMap(x uint64) (n int) { - return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MapTest) String() string { - if this == nil { - return "nil" - } - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - s := strings.Join([]string{`&MapTest{`, - `StrStr:` + mapStringForStrStr + `,`, - `}`, - }, "") - return s -} -func (this *FakeMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMap{`, - `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, - `}`, - }, "") - return s -} -func (this *FakeMapEntry) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMapEntry{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Other:` + fmt.Sprintf("%v", this.Other) + `,`, - `}`, - }, "") - return s -} -func valueToStringMap(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *MapTest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapTest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMap - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StrStr == nil { - m.StrStr = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StrStr[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FakeMap) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FakeMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FakeMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMap - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, &FakeMapEntry{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FakeMapEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FakeMapEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FakeMapEntry: 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 ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - 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 ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Other = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMap(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, ErrIntOverflowMap - } - 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, ErrIntOverflowMap - } - 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, ErrIntOverflowMap - } - 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, ErrInvalidLengthMap - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMap - } - 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 := skipMap(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 ( - ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/both/map.proto", fileDescriptorMap) } - -var fileDescriptorMap = []byte{ - // 310 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xbf, 0x4f, 0xc2, 0x40, - 0x14, 0xc7, 0xfb, 0x20, 0xd2, 0x78, 0x38, 0x98, 0x46, 0x93, 0xca, 0xf0, 0x42, 0x98, 0x58, 0x6c, - 0x13, 0x59, 0xc4, 0xc1, 0xc1, 0xa8, 0x93, 0x2c, 0xe0, 0x6e, 0xae, 0x78, 0xfc, 0x08, 0x94, 0x6b, - 0xee, 0x5e, 0x4d, 0x98, 0xe4, 0xcf, 0x71, 0x74, 0xf4, 0x4f, 0x60, 0x64, 0x74, 0xa4, 0xe7, 0xe2, - 0xc8, 0xc8, 0x68, 0xb8, 0x62, 0x52, 0x37, 0xb7, 0xf7, 0xf9, 0xde, 0xe7, 0xee, 0x7d, 0x73, 0xec, - 0xb4, 0x2f, 0xe3, 0x48, 0xea, 0x30, 0x92, 0x34, 0x0a, 0x63, 0x9e, 0x04, 0x89, 0x92, 0x24, 0xbd, - 0x6a, 0xcc, 0x93, 0x67, 0x31, 0xe0, 0xe9, 0x94, 0x74, 0xed, 0x7c, 0x38, 0xa6, 0x51, 0x1a, 0x05, - 0x7d, 0x19, 0x87, 0x43, 0x39, 0x94, 0xa1, 0x75, 0xa2, 0x74, 0x60, 0xc9, 0x82, 0x9d, 0xf2, 0xbb, - 0x8d, 0x57, 0xe6, 0x76, 0x78, 0xf2, 0x28, 0x34, 0x79, 0x6d, 0xe6, 0x6a, 0x52, 0x4f, 0x9a, 0x94, - 0x0f, 0xf5, 0x72, 0xb3, 0x7a, 0x51, 0x0f, 0x0a, 0x0f, 0x07, 0x7b, 0x2d, 0xe8, 0x91, 0xea, 0x91, - 0xba, 0x9b, 0x91, 0x9a, 0x77, 0x2b, 0xda, 0x42, 0xad, 0xcd, 0xaa, 0x85, 0xd8, 0x3b, 0x66, 0xe5, - 0x89, 0x98, 0xfb, 0x50, 0x87, 0xe6, 0x61, 0x77, 0x37, 0x7a, 0x27, 0xec, 0xe0, 0x85, 0x4f, 0x53, - 0xe1, 0x97, 0x6c, 0x96, 0xc3, 0x55, 0xe9, 0x12, 0x1a, 0xd7, 0xcc, 0xbd, 0xe7, 0x13, 0xd1, 0xe1, - 0x89, 0xd7, 0x62, 0xae, 0x98, 0x91, 0x1a, 0x0b, 0xbd, 0x2f, 0x70, 0xf6, 0xa7, 0xc0, 0x5e, 0xcb, - 0x37, 0xff, 0x9a, 0x8d, 0x07, 0x76, 0x54, 0x3c, 0xf8, 0xef, 0xee, 0x5d, 0x2a, 0x69, 0x24, 0x94, - 0x5f, 0xce, 0x53, 0x0b, 0x37, 0xb7, 0xcb, 0x0c, 0x9d, 0x55, 0x86, 0xce, 0x67, 0x86, 0xce, 0x3a, - 0x43, 0xd8, 0x64, 0x08, 0xdb, 0x0c, 0x61, 0x61, 0x10, 0xde, 0x0c, 0xc2, 0xbb, 0x41, 0xf8, 0x30, - 0x08, 0x4b, 0x83, 0xb0, 0x32, 0x08, 0x6b, 0x83, 0xf0, 0x6d, 0xd0, 0xd9, 0x18, 0x84, 0xad, 0x41, - 0x67, 0xf1, 0x85, 0x4e, 0x54, 0xb1, 0x7f, 0xdb, 0xfa, 0x09, 0x00, 0x00, 0xff, 0xff, 0x11, 0xc9, - 0x76, 0xfa, 0xb0, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto deleted file mode 100644 index 2de9cdd7f..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; -package mapdefaults; - - -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 MapTest { - map str_str = 1; -} - -message FakeMap { - repeated FakeMapEntry entries = 1; -} - -message FakeMapEntry { - string key = 1; - string value = 2; - string other = 3; -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go deleted file mode 100644 index 9998ead10..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/map_test.go +++ /dev/null @@ -1,180 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 mapdefaults - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "foo", - Value: "", - }, - { - Key: "", - Value: "bar", - }, - { - Key: "as", - Value: "df", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 3 { - t.Fatal("StrStr map should have 3 key/value pairs") - } - - val, ok := strStr["foo"] - if !ok { - t.Fatal("\"foo\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"foo\": %s", val) - } - - val, ok = strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "bar" { - t.Fatalf("Unexpected value for \"\": %s", val) - } - - val, ok = strStr["as"] - if !ok { - t.Fatal("\"as\" not found in StrStr map.") - } - if val != "df" { - t.Fatalf("Unexpected value for \"as\": %s", val) - } -} - -func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "", - Value: "", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - // Sanity check - if string(serializedMsg) != "\n\x00" { - t.Fatal("Serialized bytes mismatched") - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"\": %s", val) - } -} - -func TestUnmarshalIgnoreUnknownField(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "key", - Value: "value", - Other: "other", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := &MapTest{} - err = proto.Unmarshal(serializedMsg, msg) - - if err != nil { - var pb proto.Message = msg - _, ok := pb.(proto.Unmarshaler) - if !ok { - // non-codegen implementation returns error when extra tags are - // present. - return - } - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr["key"] - if !ok { - t.Fatal("\"key\" not found in StrStr map.") - } - if val != "value" { - t.Fatalf("Unexpected value for \"value\": %s", val) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go deleted file mode 100644 index 1bd17f59d..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/both/mappb_test.go +++ /dev/null @@ -1,564 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - combos/both/map.proto - -It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestMapTestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapTestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapEntryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapTestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapEntryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapTestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapTestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapDescription(t *testing.T) { - MapDescription() -} -func TestMapTestVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapEntryVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapTestGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapEntryGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMapTestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapEntrySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMapTestStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapEntryStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(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/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go deleted file mode 100644 index 6c7c81d9a..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.pb.go +++ /dev/null @@ -1,943 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/map.proto - -It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 MapTest struct { - StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MapTest) Reset() { *m = MapTest{} } -func (*MapTest) ProtoMessage() {} -func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } - -type FakeMap struct { - Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` -} - -func (m *FakeMap) Reset() { *m = FakeMap{} } -func (*FakeMap) ProtoMessage() {} -func (*FakeMap) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{1} } - -type FakeMapEntry struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` -} - -func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } -func (*FakeMapEntry) ProtoMessage() {} -func (*FakeMapEntry) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{2} } - -func init() { - proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") - proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") - proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") -} -func (this *MapTest) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMap) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMapEntry) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func MapDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3870 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x7a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0x3f, 0x17, 0x5f, 0x04, 0x0e, 0x40, 0x70, 0xb9, 0xa4, 0x25, 0x88, 0x8e, 0x21, 0x0a, 0xb6, - 0x23, 0xda, 0xfe, 0x07, 0xcc, 0x48, 0x96, 0x2c, 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0x2b, 0x4b, 0x0d, 0x10, 0x5d, 0x6b, 0xe0, 0x68, 0x48, 0xd1, 0xac, - 0x0e, 0x52, 0x74, 0xb3, 0x6b, 0x15, 0x32, 0x84, 0xe0, 0xec, 0xf8, 0x8b, 0x10, 0xc5, 0x9a, 0xd5, - 0x41, 0x0d, 0xb3, 0x6b, 0xc9, 0x79, 0x37, 0x34, 0x96, 0x4e, 0x41, 0xca, 0x3d, 0x34, 0x3d, 0xf5, - 0xe5, 0x42, 0x8e, 0x44, 0x08, 0x1b, 0x95, 0xfe, 0x36, 0x05, 0xf3, 0xd3, 0x84, 0xd8, 0x35, 0x48, - 0x76, 0xf1, 0x5b, 0x16, 0x62, 0x27, 0xf1, 0x01, 0xc5, 0x84, 0x9d, 0x98, 0xfa, 0x31, 0x9d, 0x58, - 0x85, 0xac, 0x89, 0x5c, 0x0f, 0x75, 0x68, 0x44, 0xc4, 0xa7, 0x8c, 0x29, 0xa0, 0xa0, 0xf1, 0x90, - 0x4a, 0xfc, 0x58, 0x21, 0xf5, 0x02, 0xcc, 0xfb, 0x26, 0x29, 0x8e, 0x6a, 0xf6, 0x78, 0x6c, 0xae, - 0x45, 0x59, 0x52, 0xae, 0x73, 0x9c, 0x8c, 0x61, 0x72, 0x1e, 0x85, 0xc6, 0xd2, 0x06, 0x80, 0x65, - 0x22, 0xab, 0xab, 0x74, 0x90, 0x66, 0x14, 0xd2, 0xc7, 0x78, 0xa9, 0x89, 0x55, 0xc6, 0xbc, 0x64, - 0x51, 0xa9, 0x66, 0x48, 0x57, 0x87, 0xa1, 0x36, 0x7b, 0x4c, 0xa4, 0x6c, 0xd3, 0x4d, 0x36, 0x16, - 0x6d, 0x7b, 0x90, 0x77, 0x10, 0x8e, 0x7b, 0xd4, 0x61, 0x6f, 0x96, 0x21, 0x46, 0x94, 0x23, 0xdf, - 0x4c, 0x66, 0x30, 0xfa, 0x62, 0x73, 0x4e, 0x70, 0x28, 0x3d, 0x0a, 0xbe, 0x40, 0x21, 0x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e8, 0x41, 0xa3, 0x22, 0xc3, 0x43, 0x21, 0x3e, 0xba, 0x35, 0x91, 0x13, 0xc1, 0xf8, 0x5d, - 0xc6, 0xb8, 0x18, 0x60, 0x6c, 0x33, 0x68, 0xa5, 0x06, 0x73, 0x27, 0xe1, 0xfa, 0x07, 0xc6, 0x95, - 0x43, 0x41, 0x92, 0x4d, 0x98, 0x27, 0x24, 0xda, 0xc0, 0xf5, 0xac, 0x3e, 0xc9, 0x7b, 0x0f, 0xa6, - 0xf9, 0xc7, 0xb7, 0xe9, 0x5e, 0xc9, 0x63, 0x58, 0xcd, 0x47, 0x55, 0x2a, 0x40, 0x3e, 0x39, 0x75, - 0x90, 0x66, 0x44, 0x30, 0xbc, 0xc9, 0x0c, 0xf1, 0xf5, 0x2b, 0x9f, 0x85, 0x25, 0xfc, 0x3f, 0x49, - 0x4b, 0x41, 0x4b, 0xa2, 0x2f, 0xbc, 0x0a, 0xdf, 0x7f, 0x85, 0x6e, 0xc7, 0x45, 0x9f, 0x20, 0x60, - 0x53, 0x60, 0x15, 0x7b, 0xc8, 0xf3, 0x90, 0xe3, 0x2a, 0xaa, 0x31, 0xc9, 0xbc, 0xc0, 0x8d, 0x41, - 0xe1, 0xcb, 0xef, 0x84, 0x57, 0x71, 0x93, 0x22, 0xab, 0x86, 0x51, 0xd9, 0x83, 0xd3, 0x13, 0xa2, - 0x62, 0x0a, 0xce, 0x57, 0x19, 0xe7, 0xd2, 0x58, 0x64, 0x60, 0xda, 0x16, 0x70, 0xb9, 0xbf, 0x96, - 0x53, 0x70, 0xfe, 0x2e, 0xe3, 0x94, 0x18, 0x96, 0x2f, 0x29, 0x66, 0xbc, 0x01, 0x0b, 0xb7, 0x91, - 0xb3, 0x6f, 0xb9, 0xec, 0x96, 0x66, 0x0a, 0xba, 0xd7, 0x18, 0xdd, 0x3c, 0x03, 0x92, 0x6b, 0x1b, - 0xcc, 0x75, 0x15, 0xd2, 0x5d, 0x55, 0x43, 0x53, 0x50, 0x7c,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0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -func (this *MapTest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapTest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapTest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapTest but is not nil && this == nil") - } - if len(this.StrStr) != len(that1.StrStr) { - return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) - } - } - return nil -} -func (this *MapTest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.StrStr) != len(that1.StrStr) { - return false - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return false - } - } - return true -} -func (this *FakeMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") - } - if len(this.Entries) != len(that1.Entries) { - return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) - } - } - return nil -} -func (this *FakeMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return false - } - } - return true -} -func (this *FakeMapEntry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMapEntry") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") - } - if this.Key != that1.Key { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.Other != that1.Other { - return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) - } - return nil -} -func (this *FakeMapEntry) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Key != that1.Key { - return false - } - if this.Value != that1.Value { - return false - } - if this.Other != that1.Other { - return false - } - return true -} -func (this *MapTest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.MapTest{") - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - if this.StrStr != nil { - s = append(s, "StrStr: "+mapStringForStrStr+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.FakeMap{") - if this.Entries != nil { - s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMapEntry) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mapdefaults.FakeMapEntry{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMap(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 *MapTest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapTest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StrStr) > 0 { - for k := range m.StrStr { - dAtA[i] = 0xa - i++ - v := m.StrStr[k] - mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - i = encodeVarintMap(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintMap(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - return i, nil -} - -func (m *FakeMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FakeMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Entries) > 0 { - for _, msg := range m.Entries { - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *FakeMapEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FakeMapEntry) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - } - if len(m.Value) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintMap(dAtA, i, uint64(len(m.Value))) - i += copy(dAtA[i:], m.Value) - } - if len(m.Other) > 0 { - dAtA[i] = 0x1a - i++ - i = encodeVarintMap(dAtA, i, uint64(len(m.Other))) - i += copy(dAtA[i:], m.Other) - } - return i, nil -} - -func encodeVarintMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { - this := &MapTest{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.StrStr = make(map[string]string) - for i := 0; i < v1; i++ { - this.StrStr[randStringMap(r)] = randStringMap(r) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { - this := &FakeMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(5) - this.Entries = make([]*FakeMapEntry, v2) - for i := 0; i < v2; i++ { - this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { - this := &FakeMapEntry{} - this.Key = string(randStringMap(r)) - this.Value = string(randStringMap(r)) - this.Other = string(randStringMap(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyMap interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMap(r randyMap) 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 randStringMap(r randyMap) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneMap(r) - } - return string(tmps) -} -func randUnrecognizedMap(r randyMap, 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 = randFieldMap(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateMap(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 = encodeVarintPopulateMap(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMap(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 encodeVarintPopulateMap(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 *MapTest) Size() (n int) { - var l int - _ = l - if len(m.StrStr) > 0 { - for k, v := range m.StrStr { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FakeMap) Size() (n int) { - var l int - _ = l - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovMap(uint64(l)) - } - } - return n -} - -func (m *FakeMapEntry) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Other) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - return n -} - -func sovMap(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMap(x uint64) (n int) { - return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MapTest) String() string { - if this == nil { - return "nil" - } - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - s := strings.Join([]string{`&MapTest{`, - `StrStr:` + mapStringForStrStr + `,`, - `}`, - }, "") - return s -} -func (this *FakeMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMap{`, - `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, - `}`, - }, "") - return s -} -func (this *FakeMapEntry) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMapEntry{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Other:` + fmt.Sprintf("%v", this.Other) + `,`, - `}`, - }, "") - return s -} -func valueToStringMap(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/marshaler/map.proto", fileDescriptorMap) } - -var fileDescriptorMap = []byte{ - // 315 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x3a, 0x31, - 0x18, 0xc7, 0xfb, 0x40, 0x7e, 0x5c, 0x7e, 0xc5, 0xc1, 0x5c, 0x1c, 0x4e, 0x86, 0x27, 0x84, 0x89, - 0xc5, 0xbb, 0x44, 0x16, 0x71, 0x70, 0x30, 0xea, 0x24, 0x0b, 0xb8, 0x9b, 0x1e, 0x96, 0x3f, 0x81, - 0xa3, 0x97, 0xb6, 0x67, 0xc2, 0x24, 0x2f, 0xc7, 0xd1, 0xd1,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, 0xdd, - 0x7d, 0x48, 0x85, 0x9e, 0x70, 0x19, 0x54, 0xf3, 0xd4, 0xc1, 0xf5, 0xcd, 0xda, 0x20, 0xd9, 0x18, - 0x24, 0x1f, 0x06, 0xc9, 0xd6, 0x20, 0xec, 0x0c, 0xc2, 0xde, 0x20, 0xac, 0x2c, 0xc2, 0xab, 0x45, - 0x78, 0xb3, 0x08, 0xef, 0x16, 0x61, 0x6d, 0x11, 0x36, 0x16, 0xc9, 0xd6, 0x22, 0x7c, 0x59, 0x24, - 0x3b, 0x8b, 0xb0, 0xb7, 0x48, 0x56, 0x9f, 0x48, 0xe2, 0x9a, 0xfb, 0xdb, 0xce, 0x77, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xde, 0x50, 0x18, 0x62, 0xb5, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto deleted file mode 100644 index fe9912313..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; -package mapdefaults; - - -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 MapTest { - map str_str = 1; -} - -message FakeMap { - repeated FakeMapEntry entries = 1; -} - -message FakeMapEntry { - string key = 1; - string value = 2; - string other = 3; -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go deleted file mode 100644 index 9998ead10..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/map_test.go +++ /dev/null @@ -1,180 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 mapdefaults - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "foo", - Value: "", - }, - { - Key: "", - Value: "bar", - }, - { - Key: "as", - Value: "df", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 3 { - t.Fatal("StrStr map should have 3 key/value pairs") - } - - val, ok := strStr["foo"] - if !ok { - t.Fatal("\"foo\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"foo\": %s", val) - } - - val, ok = strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "bar" { - t.Fatalf("Unexpected value for \"\": %s", val) - } - - val, ok = strStr["as"] - if !ok { - t.Fatal("\"as\" not found in StrStr map.") - } - if val != "df" { - t.Fatalf("Unexpected value for \"as\": %s", val) - } -} - -func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "", - Value: "", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - // Sanity check - if string(serializedMsg) != "\n\x00" { - t.Fatal("Serialized bytes mismatched") - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"\": %s", val) - } -} - -func TestUnmarshalIgnoreUnknownField(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "key", - Value: "value", - Other: "other", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := &MapTest{} - err = proto.Unmarshal(serializedMsg, msg) - - if err != nil { - var pb proto.Message = msg - _, ok := pb.(proto.Unmarshaler) - if !ok { - // non-codegen implementation returns error when extra tags are - // present. - return - } - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr["key"] - if !ok { - t.Fatal("\"key\" not found in StrStr map.") - } - if val != "value" { - t.Fatalf("Unexpected value for \"value\": %s", val) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go deleted file mode 100644 index 41e962a9c..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/marshaler/mappb_test.go +++ /dev/null @@ -1,564 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/map.proto - -It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestMapTestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapTestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapEntryMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapTestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapEntryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapTestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapTestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapDescription(t *testing.T) { - MapDescription() -} -func TestMapTestVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapEntryVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapTestGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapEntryGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMapTestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapEntrySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMapTestStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapEntryStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(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/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go deleted file mode 100644 index 29b34fd34..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.pb.go +++ /dev/null @@ -1,833 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - combos/neither/map.proto - -It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 MapTest struct { - StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MapTest) Reset() { *m = MapTest{} } -func (*MapTest) ProtoMessage() {} -func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } - -type FakeMap struct { - Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` -} - -func (m *FakeMap) Reset() { *m = FakeMap{} } -func (*FakeMap) ProtoMessage() {} -func (*FakeMap) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{1} } - -type FakeMapEntry struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` -} - -func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } -func (*FakeMapEntry) ProtoMessage() {} -func (*FakeMapEntry) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{2} } - -func init() { - proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") - proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") - proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") -} -func (this *MapTest) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMap) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMapEntry) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func MapDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3869 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x70, 0x1b, 0xd7, - 0x75, 0x26, 0xfe, 0x48, 0xe0, 0x00, 0x04, 0x97, 0x97, 0xb4, 0x04, 0x31, 0x31, 0x44, 0xc1, 0x76, - 0x44, 0xdb, 0x0d, 0x99, 0x91, 0x2c, 0x59, 0x82, 0x1a, 0xbb, 0x20, 0x08, 0x31, 0x50, 0x49, 0x02, - 0x59, 0x90, 0xf1, 0x4f, 0xa6, 0xb3, 0xb3, 0x5c, 0x5c, 0x80, 0x2b, 0x2d, 0x76, 0x37, 0xbb, 0x0b, - 0xc9, 0xd4, 0x74, 0xa6, 0xea, 0xb8, 0x3f, 0x93, 0xe9, 0xf4, 0xbf, 0x33, 0x49, 0x5c, 0xc7, 0xfd, - 0x99, 0x69, 0x9d, 0xa6, 0x7f, 0x49, 0xdd, 0xa6, 0x69, 0x9f, 0xfa, 0x92, 0xd6, 0x4f, 0x9d, 0xe4, - 0xad, 0x0f, 0x7d, 0xb0, 0x18, 0xcf, 0x34, 0x6d, 0xdd, 0xc6, 0x6d, 0xfd, 0xe0, 0x19, 0xbf, 0x74, - 0xee, 0xdf, 0x62, 0x17, 0x00, 0xb5, 0x60, 0x66, 0xec, 0x3c, 0x91, 0xf7, 0xdc, 0xf3, 0x7d, 0x7b, - 0xf6, 0xdc, 0x73, 0xcf, 0x39, 0xf7, 0x2e, 0xe0, 0x87, 0x57, 0x61, 0xb9, 0x6b, 0x59, 0x5d, 0x03, - 0xaf, 0xd9, 0x8e, 0xe5, 0x59, 0xfb, 0xfd, 0xce, 0x5a, 0x1b, 0xbb, 0x9a, 0xa3, 0xdb, 0x9e, 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6, 0x35, 0x5c, 0x98, 0xa6, 0x04, 0xe7, 0x47, 0x08, 0x5a, - 0x6c, 0x7e, 0x98, 0x43, 0xe0, 0x50, 0x15, 0x32, 0xf8, 0x25, 0x0f, 0x9b, 0xae, 0x6e, 0x99, 0x85, - 0x19, 0x4a, 0xf2, 0xd8, 0x98, 0x55, 0xc4, 0x46, 0x7b, 0x98, 0x62, 0x80, 0x43, 0x97, 0x61, 0xc6, - 0xb2, 0x3d, 0xdd, 0x32, 0xdd, 0x42, 0x7a, 0x39, 0xb6, 0x92, 0xbd, 0xf0, 0xf1, 0xb1, 0x81, 0xd0, - 0x60, 0x3a, 0xb2, 0x50, 0x46, 0x75, 0x90, 0x5c, 0xab, 0xef, 0x68, 0x58, 0xd1, 0xac, 0x36, 0x56, - 0x74, 0xb3, 0x63, 0x15, 0x32, 0x94, 0xe0, 0xec, 0xe8, 0x8b, 0x50, 0xc5, 0xaa, 0xd5, 0xc6, 0x75, - 0xb3, 0x63, 0xc9, 0x79, 0x37, 0x34, 0x46, 0xa7, 0x60, 0xda, 0x3d, 0x34, 0x3d, 0xf5, 0xa5, 0x42, - 0x8e, 0x46, 0x08, 0x1f, 0x95, 0xfe, 0x6e, 0x1a, 0xe6, 0x26, 0x09, 0xb1, 0x6b, 0x90, 0xea, 0x90, - 0xb7, 0x2c, 0xc4, 0x4f, 0xe2, 0x03, 0x86, 0x09, 0x3b, 0x71, 0xfa, 0x47, 0x74, 0x62, 0x05, 0xb2, - 0x26, 0x76, 0x3d, 0xdc, 0x66, 0x11, 0x91, 0x98, 0x30, 0xa6, 0x80, 0x81, 0x46, 0x43, 0x2a, 0xf9, - 0x23, 0x85, 0xd4, 0xf3, 0x30, 0xe7, 0x9b, 0xa4, 0x38, 0xaa, 0xd9, 0x15, 0xb1, 0xb9, 0x16, 0x65, - 0xc9, 0x6a, 0x4d, 0xe0, 0x64, 0x02, 0x93, 0xf3, 0x38, 0x34, 0x46, 0x1b, 0x00, 0x96, 0x89, 0xad, - 0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, 0x8c, 0x7d, 0xe3, 0xa8, 0x18, 0xfb, 0xf6, 0x51, 0x31, 0xf6, 0xe6, 0x51, 0x71, - 0xea, 0xbb, 0x47, 0xc5, 0xa9, 0xb7, 0x8e, 0x8a, 0xb1, 0x1f, 0x1c, 0x15, 0xa7, 0xde, 0x3d, 0x2a, - 0xc6, 0xde, 0x3f, 0x2a, 0x4e, 0xdd, 0xfb, 0x7e, 0x71, 0x6a, 0x7f, 0x9a, 0xfa, 0xf6, 0xe2, 0xff, - 0x07, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x94, 0xaa, 0xd5, 0x42, 0x32, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -func (this *MapTest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapTest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapTest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapTest but is not nil && this == nil") - } - if len(this.StrStr) != len(that1.StrStr) { - return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) - } - } - return nil -} -func (this *MapTest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.StrStr) != len(that1.StrStr) { - return false - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return false - } - } - return true -} -func (this *FakeMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") - } - if len(this.Entries) != len(that1.Entries) { - return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) - } - } - return nil -} -func (this *FakeMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return false - } - } - return true -} -func (this *FakeMapEntry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMapEntry") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") - } - if this.Key != that1.Key { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.Other != that1.Other { - return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) - } - return nil -} -func (this *FakeMapEntry) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Key != that1.Key { - return false - } - if this.Value != that1.Value { - return false - } - if this.Other != that1.Other { - return false - } - return true -} -func (this *MapTest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.MapTest{") - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - if this.StrStr != nil { - s = append(s, "StrStr: "+mapStringForStrStr+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.FakeMap{") - if this.Entries != nil { - s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMapEntry) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mapdefaults.FakeMapEntry{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { - this := &MapTest{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.StrStr = make(map[string]string) - for i := 0; i < v1; i++ { - this.StrStr[randStringMap(r)] = randStringMap(r) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { - this := &FakeMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(5) - this.Entries = make([]*FakeMapEntry, v2) - for i := 0; i < v2; i++ { - this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { - this := &FakeMapEntry{} - this.Key = string(randStringMap(r)) - this.Value = string(randStringMap(r)) - this.Other = string(randStringMap(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyMap interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMap(r randyMap) 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 randStringMap(r randyMap) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneMap(r) - } - return string(tmps) -} -func randUnrecognizedMap(r randyMap, 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 = randFieldMap(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateMap(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 = encodeVarintPopulateMap(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMap(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 encodeVarintPopulateMap(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 *MapTest) Size() (n int) { - var l int - _ = l - if len(m.StrStr) > 0 { - for k, v := range m.StrStr { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FakeMap) Size() (n int) { - var l int - _ = l - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovMap(uint64(l)) - } - } - return n -} - -func (m *FakeMapEntry) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Other) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - return n -} - -func sovMap(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMap(x uint64) (n int) { - return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MapTest) String() string { - if this == nil { - return "nil" - } - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - s := strings.Join([]string{`&MapTest{`, - `StrStr:` + mapStringForStrStr + `,`, - `}`, - }, "") - return s -} -func (this *FakeMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMap{`, - `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, - `}`, - }, "") - return s -} -func (this *FakeMapEntry) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMapEntry{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Other:` + fmt.Sprintf("%v", this.Other) + `,`, - `}`, - }, "") - return s -} -func valueToStringMap(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} - -func init() { proto.RegisterFile("combos/neither/map.proto", fileDescriptorMap) } - -var fileDescriptorMap = []byte{ - // 313 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0x3f, 0x4f, 0x32, 0x41, - 0x10, 0x87, 0x77, 0x20, 0x2f, 0x97, 0x77, 0xb1, 0x30, 0x17, 0x8b, 0x93, 0x62, 0x42, 0xa8, 0x68, - 0xbc, 0x4b, 0xa4, 0x11, 0x0b, 0x0b, 0xa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b, 0x29, 0x57, 0xc5, 0x02, 0xa7, - 0xbf, 0x16, 0x28, 0xb4, 0x7c, 0xf2, 0x8f, 0xd9, 0xba, 0xa7, 0x47, 0xe5, 0x87, 0xbf, 0xce, 0x3e, - 0xa4, 0xe2, 0x70, 0xc7, 0xa0, 0x9a, 0xa7, 0x0e, 0xae, 0x6f, 0xd6, 0x06, 0xc9, 0xc6, 0x20, 0xf9, - 0x30, 0x48, 0xb6, 0x06, 0x61, 0x67, 0x10, 0xf6, 0x06, 0x61, 0x65, 0x11, 0x5e, 0x2d, 0xc2, 0x9b, - 0x45, 0x78, 0xb7, 0x08, 0x6b, 0x8b, 0x64, 0x63, 0x91, 0x6c, 0x2d, 0xc2, 0x97, 0x45, 0xb2, 0xb3, - 0x08, 0x7b, 0x8b, 0x64, 0xf5, 0x89, 0x24, 0xae, 0xb9, 0xdb, 0x76, 0xbe, 0x03, 0x00, 0x00, 0xff, - 0xff, 0x9d, 0x34, 0x83, 0xd1, 0xb3, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto deleted file mode 100644 index 43d5c0dab..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; -package mapdefaults; - - -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 MapTest { - map str_str = 1; -} - -message FakeMap { - repeated FakeMapEntry entries = 1; -} - -message FakeMapEntry { - string key = 1; - string value = 2; - string other = 3; -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go deleted file mode 100644 index 9998ead10..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/map_test.go +++ /dev/null @@ -1,180 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 mapdefaults - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "foo", - Value: "", - }, - { - Key: "", - Value: "bar", - }, - { - Key: "as", - Value: "df", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 3 { - t.Fatal("StrStr map should have 3 key/value pairs") - } - - val, ok := strStr["foo"] - if !ok { - t.Fatal("\"foo\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"foo\": %s", val) - } - - val, ok = strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "bar" { - t.Fatalf("Unexpected value for \"\": %s", val) - } - - val, ok = strStr["as"] - if !ok { - t.Fatal("\"as\" not found in StrStr map.") - } - if val != "df" { - t.Fatalf("Unexpected value for \"as\": %s", val) - } -} - -func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "", - Value: "", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - // Sanity check - if string(serializedMsg) != "\n\x00" { - t.Fatal("Serialized bytes mismatched") - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"\": %s", val) - } -} - -func TestUnmarshalIgnoreUnknownField(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "key", - Value: "value", - Other: "other", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := &MapTest{} - err = proto.Unmarshal(serializedMsg, msg) - - if err != nil { - var pb proto.Message = msg - _, ok := pb.(proto.Unmarshaler) - if !ok { - // non-codegen implementation returns error when extra tags are - // present. - return - } - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr["key"] - if !ok { - t.Fatal("\"key\" not found in StrStr map.") - } - if val != "value" { - t.Fatalf("Unexpected value for \"value\": %s", val) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go deleted file mode 100644 index e9a2716e2..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/neither/mappb_test.go +++ /dev/null @@ -1,480 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - combos/neither/map.proto - -It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestMapTestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapEntryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapTestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapEntryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapTestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapTestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapDescription(t *testing.T) { - MapDescription() -} -func TestMapTestVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapEntryVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapTestGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapEntryGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMapTestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapEntrySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMapTestStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapEntryStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(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/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go deleted file mode 100644 index 808cd90cc..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.pb.go +++ /dev/null @@ -1,1325 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/map.proto - -/* - Package mapdefaults is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/map.proto - - It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 MapTest struct { - StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MapTest) Reset() { *m = MapTest{} } -func (*MapTest) ProtoMessage() {} -func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } - -type FakeMap struct { - Entries []*FakeMapEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` -} - -func (m *FakeMap) Reset() { *m = FakeMap{} } -func (*FakeMap) ProtoMessage() {} -func (*FakeMap) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{1} } - -type FakeMapEntry struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - Other string `protobuf:"bytes,3,opt,name=other,proto3" json:"other,omitempty"` -} - -func (m *FakeMapEntry) Reset() { *m = FakeMapEntry{} } -func (*FakeMapEntry) ProtoMessage() {} -func (*FakeMapEntry) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{2} } - -func init() { - proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") - proto.RegisterType((*FakeMap)(nil), "mapdefaults.FakeMap") - proto.RegisterType((*FakeMapEntry)(nil), "mapdefaults.FakeMapEntry") -} -func (this *MapTest) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMap) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func (this *FakeMapEntry) Description() (desc *descriptor.FileDescriptorSet) { - return MapDescription() -} -func MapDescription() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3868 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5d, 0x6c, 0x23, 0xd7, - 0x75, 0xd6, 0xf0, 0x4f, 0xe4, 0x21, 0x45, 0x8d, 0x46, 0xf2, 0x9a, 0x2b, 0xdb, 0x5c, 0x2d, 0x6d, - 0x67, 0x65, 0xbb, 0xa1, 0x82, 0x5d, 0xef, 0x7a, 0x97, 0xdb, 0xd8, 0xa5, 0x28, 0xae, 0xc2, 0xad, - 0x24, 0x32, 0x43, 0x29, 0xfe, 0x09, 0x8a, 0xc1, 0x68, 0x78, 0x49, 0xcd, 0xee, 0x70, 0x66, 0x32, - 0x33, 0xdc, 0xb5, 0x16, 0x05, 0xba, 0x85, 0xfb, 0x83, 0xa0, 0xe8, 0x7f, 0x81, 0x24, 0xae, 0xe3, - 0xfe, 0x00, 0xad, 0xd3, 0xf4, 0x2f, 0x69, 0xda, 0x24, 0xed, 0x53, 0x5f, 0xd2, 0xfa, 0xa9, 0x48, - 0xde, 0xfa, 0xd0, 0x07, 0xaf, 0x62, 0xa0, 0x69, 0xeb, 0x36, 0x6e, 0xeb, 0x07, 0x03, 0x7e, 0x09, - 0xee, 0xdf, 0x70, 0x86, 0xa4, 0x76, 0xa8, 0x00, 0x76, 0x9e, 0xa4, 0x7b, 0xee, 0xf9, 0xbe, 0x39, - 0x73, 0xee, 0xb9, 0xe7, 0x9c, 0x7b, 0x87, 0xf0, 0xc3, 0x2b, 0xb0, 0xd2, 0xb3, 0xac, 0x9e, 0x81, - 0xd6, 0x6c, 0xc7, 0xf2, 0xac, 0xfd, 0x41, 0x77, 0xad, 0x83, 0x5c, 0xcd, 0xd1, 0x6d, 0xcf, 0x72, - 0xca, 0x44, 0x26, 0xcd, 0x53, 0x8d, 0x32, 0xd7, 0x28, 0x6d, 0xc3, 0xc2, 0x35, 0xdd, 0x40, 0x1b, - 0xbe, 0x62, 0x1b, 0x79, 0xd2, 0x65, 0x48, 0x74, 0x75, 0x03, 0x15, 0x84, 0x95, 0xf8, 0x6a, 0xf6, - 0xfc, 0x63, 0xe5, 0x11, 0x50, 0x39, 0x8c, 0x68, 0x61, 0xb1, 0x4c, 0x10, 0xa5, 0xb7, 0x13, 0xb0, - 0x38, 0x61, 0x56, 0x92, 0x20, 0x61, 0xaa, 0x7d, 0xcc, 0x28, 0xac, 0x66, 0x64, 0xf2, 0xbf, 0x54, - 0x80, 0x59, 0x5b, 0xd5, 0x6e, 0xaa, 0x3d, 0x54, 0x88, 0x11, 0x31, 0x1f, 0x4a, 0x45, 0x80, 0x0e, - 0xb2, 0x91, 0xd9, 0x41, 0xa6, 0x76, 0x58, 0x88, 0xaf, 0xc4, 0x57, 0x33, 0x72, 0x40, 0x22, 0x3d, - 0x05, 0x0b, 0xf6, 0x60, 0xdf, 0xd0, 0x35, 0x25, 0xa0, 0x06, 0x2b, 0xf1, 0xd5, 0xa4, 0x2c, 0xd2, - 0x89, 0x8d, 0xa1, 0xf2, 0x39, 0x98, 0xbf, 0x8d, 0xd4, 0x9b, 0x41, 0xd5, 0x2c, 0x51, 0xcd, 0x63, - 0x71, 0x40, 0xb1, 0x06, 0xb9, 0x3e, 0x72, 0x5d, 0xb5, 0x87, 0x14, 0xef, 0xd0, 0x46, 0x85, 0x04, - 0x79, 0xfb, 0x95, 0xb1, 0xb7, 0x1f, 0x7d, 0xf3, 0x2c, 0x43, 0xed, 0x1e, 0xda, 0x48, 0xaa, 0x42, - 0x06, 0x99, 0x83, 0x3e, 0x65, 0x48, 0x1e, 0xe3, 0xbf, 0xba, 0x39, 0xe8, 0x8f, 0xb2, 0xa4, 0x31, - 0x8c, 0x51, 0xcc, 0xba, 0xc8, 0xb9, 0xa5, 0x6b, 0xa8, 0x90, 0x22, 0x04, 0xe7, 0xc6, 0x08, 0xda, - 0x74, 0x7e, 0x94, 0x83, 0xe3, 0xa4, 0x1a, 0x64, 0xd0, 0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 0x47, 0x46, 0x21, 0xb1, 0x22, 0xac, 0xe6, 0xcf, 0x3f, - 0x35, 0xd5, 0xae, 0x2c, 0x6f, 0x61, 0x88, 0x4c, 0x91, 0xd2, 0xb3, 0x90, 0x60, 0x29, 0x1a, 0x33, - 0x3c, 0x39, 0x1d, 0x03, 0xde, 0x4b, 0x32, 0xc1, 0x49, 0x0f, 0x41, 0x06, 0xff, 0xa5, 0xb1, 0x91, - 0x22, 0x36, 0xa7, 0xb1, 0x00, 0xc7, 0x85, 0xb4, 0x0c, 0x69, 0xb2, 0x4d, 0x3a, 0x88, 0x97, 0x36, - 0x7f, 0x8c, 0x03, 0xab, 0x83, 0xba, 0xea, 0xc0, 0xf0, 0x94, 0x5b, 0xaa, 0x31, 0x40, 0x24, 0xe0, - 0x33, 0x72, 0x8e, 0x09, 0x3f, 0x83, 0x65, 0xd2, 0x19, 0xc8, 0xd2, 0x5d, 0xa5, 0x9b, 0x1d, 0xf4, - 0x32, 0xc9, 0x9e, 0x49, 0x99, 0x6e, 0xb4, 0x06, 0x96, 0xe0, 0xc7, 0xdf, 0x70, 0x2d, 0x93, 0x87, - 0x26, 0x79, 0x04, 0x16, 0x90, 0xc7, 0x3f, 0x33, 0x9a, 0xb8, 0x1f, 0x99, 0xfc, 0x7a, 0xa3, 0x31, - 0x55, 0xfa, 0x66, 0x0c, 0x12, 0x24, 0x5f, 0xcc, 0x43, 0x76, 0xf7, 0xc5, 0x56, 0x5d, 0xd9, 0x68, - 0xee, 0xad, 0x6f, 0xd5, 0x45, 0x41, 0xca, 0x03, 0x10, 0xc1, 0xb5, 0xad, 0x66, 0x75, 0x57, 0x8c, - 0xf9, 0xe3, 0xc6, 0xce, 0xee, 0xa5, 0xa7, 0xc5, 0xb8, 0x0f, 0xd8, 0xa3, 0x82, 0x44, 0x50, 0xe1, - 0xc2, 0x79, 0x31, 0x29, 0x89, 0x90, 0xa3, 0x04, 0x8d, 0x17, 0xea, 0x1b, 0x97, 0x9e, 0x16, 0x53,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, 0x98, 0x62, 0x2c, 0xa7, 0xff, 0xdc, 0x58, 0x4e, 0xa7, 0x65, - 0xef, 0xd2, 0x34, 0x65, 0x8f, 0xc8, 0x4e, 0x96, 0xdb, 0x93, 0x13, 0x72, 0xfb, 0x55, 0x58, 0x18, - 0x23, 0x9a, 0x3a, 0xc7, 0xbe, 0x22, 0x40, 0xe1, 0x38, 0xe7, 0x44, 0x64, 0xba, 0x58, 0x28, 0xd3, - 0x5d, 0x1d, 0xf5, 0xe0, 0xd9, 0xe3, 0x17, 0x61, 0x6c, 0xad, 0xdf, 0x10, 0xe0, 0xd4, 0xe4, 0x4e, - 0x71, 0xa2, 0x0d, 0xcf, 0x42, 0xaa, 0x8f, 0xbc, 0x03, 0x8b, 0x77, 0x4b, 0x1f, 0x9b, 0x50, 0x83, - 0xf1, 0xf4, 0xe8, 0x62, 0x33, 0x54, 0xb0, 0x88, 0xc7, 0x8f, 0x6b, 0xf7, 0xa8, 0x35, 0x63, 0x96, - 0x7e, 0x3e, 0x06, 0x0f, 0x4c, 0x24, 0x9f, 0x68, 0xe8, 0x23, 0x00, 0xba, 0x69, 0x0f, 0x3c, 0xda, - 0x11, 0xd1, 0x04, 0x9b, 0x21, 0x12, 0x92, 0xbc, 0x70, 0xf2, 0x1c, 0x78, 0xfe, 0x7c, 0x9c, 0xcc, - 0x03, 0x15, 0x11, 0x85, 0xcb, 0x43, 0x43, 0x13, 0xc4, 0xd0, 0xe2, 0x31, 0x6f, 0x3a, 0x16, 0x98, - 0x9f, 0x00, 0x51, 0x33, 0x74, 0x64, 0x7a, 0x8a, 0xeb, 0x39, 0x48, 0xed, 0xeb, 0x66, 0x8f, 0x54, - 0x90, 0x74, 0x25, 0xd9, 0x55, 0x0d, 0x17, 0xc9, 0xf3, 0x74, 0xba, 0xcd, 0x67, 0x31, 0x82, 0x04, - 0x90, 0x13, 0x40, 0xa4, 0x42, 0x08, 0x3a, 0xed, 0x23, 0x4a, 0xdf, 0x48, 0x43, 0x36, 0xd0, 0x57, - 0x4b, 0x67, 0x21, 0x77, 0x43, 0xbd, 0xa5, 0x2a, 0xfc, 0xac, 0x44, 0x3d, 0x91, 0xc5, 0xb2, 0x16, - 0x3b, 0x2f, 0x7d, 0x02, 0x96, 0x88, 0x8a, 0x35, 0xf0, 0x90, 0xa3, 0x68, 0x86, 0xea, 0xba, 0xc4, - 0x69, 0x69, 0xa2, 0x2a, 0xe1, 0xb9, 0x26, 0x9e, 0xaa, 0xf1, 0x19, 0xe9, 0x22, 0x2c, 0x12, 0x44, - 0x7f, 0x60, 0x78, 0xba, 0x6d, 0x20, 0x05, 0x9f, 0xde, 0x5c, 0x52, 0x49, 0x7c, 0xcb, 0x16, 0xb0, - 0xc6, 0x36, 0x53, 0xc0, 0x16, 0xb9, 0xd2, 0x06, 0x3c, 0x42, 0x60, 0x3d, 0x64, 0x22, 0x47, 0xf5, - 0x90, 0x82, 0x3e, 0x37, 0x50, 0x0d, 0x57, 0x51, 0xcd, 0x8e, 0x72, 0xa0, 0xba, 0x07, 0x85, 0x25, - 0x4c, 0xb0, 0x1e, 0x2b, 0x08, 0xf2, 0x69, 0xac, 0xb8, 0xc9, 0xf4, 0xea, 0x44, 0xad, 0x6a, 0x76, - 0x3e, 0xa5, 0xba, 0x07, 0x52, 0x05, 0x4e, 0x11, 0x16, 0xd7, 0x73, 0x74, 0xb3, 0xa7, 0x68, 0x07, - 0x48, 0xbb, 0xa9, 0x0c, 0xbc, 0xee, 0xe5, 0xc2, 0x43, 0xc1, 0xe7, 0x13, 0x0b, 0xdb, 0x44, 0xa7, - 0x86, 0x55, 0xf6, 0xbc, 0xee, 0x65, 0xa9, 0x0d, 0x39, 0xbc, 0x18, 0x7d, 0xfd, 0x0e, 0x52, 0xba, - 0x96, 0x43, 0x4a, 0x63, 0x7e, 0x42, 0x6a, 0x0a, 0x78, 0xb0, 0xdc, 0x64, 0x80, 0x6d, 0xab, 0x83, - 0x2a, 0xc9, 0x76, 0xab, 0x5e, 0xdf, 0x90, 0xb3, 0x9c, 0xe5, 0x9a, 0xe5, 0xe0, 0x80, 0xea, 0x59, - 0xbe, 0x83, 0xb3, 0x34, 0xa0, 0x7a, 0x16, 0x77, 0xef, 0x45, 0x58, 0xd4, 0x34, 0xfa, 0xce, 0xba, - 0xa6, 0xb0, 0x33, 0x96, 0x5b, 0x10, 0x43, 0xce, 0xd2, 0xb4, 0x4d, 0xaa, 0xc0, 0x62, 0xdc, 0x95, - 0xae, 0xc0, 0x03, 0x43, 0x67, 0x05, 0x81, 0x0b, 0x63, 0x6f, 0x39, 0x0a, 0xbd, 0x08, 0x8b, 0xf6, - 0xe1, 0x38, 0x50, 0x0a, 0x3d, 0xd1, 0x3e, 0x1c, 0x85, 0x3d, 0x03, 0x4b, 0xf6, 0x81, 0x3d, 0x8e, - 0x7b, 0x32, 0x88, 0x93, 0xec, 0x03, 0x7b, 0x14, 0xf8, 0x38, 0x39, 0x70, 0x3b, 0x48, 0x53, 0x3d, - 0xd4, 0x29, 0x3c, 0x18, 0x54, 0x0f, 0x4c, 0x48, 0x6b, 0x20, 0x6a, 0x9a, 0x82, 0x4c, 0x75, 0xdf, - 0x40, 0x8a, 0xea, 0x20, 0x53, 0x75, 0x0b, 0x67, 0x82, 0xca, 0x79, 0x4d, 0xab, 0x93, 0xd9, 0x2a, - 0x99, 0x94, 0x9e, 0x84, 0x05, 0x6b, 0xff, 0x86, 0x46, 0x43, 0x52, 0xb1, 0x1d, 0xd4, 0xd5, 0x5f, - 0x2e, 0x3c, 0x46, 0xfc, 0x3b, 0x8f, 0x27, 0x48, 0x40, 0xb6, 0x88, 0x58, 0x7a, 0x02, 0x44, 0xcd, - 0x3d, 0x50, 0x1d, 0x9b, 0xe4, 0x64, 0xd7, 0x56, 0x35, 0x54, 0x78, 0x9c, 0xaa, 0x52, 0xf9, 0x0e, - 0x17, 0xe3, 0x2d, 0xe1, 0xde, 0xd6, 0xbb, 0x1e, 0x67, 0x3c, 0x47, 0xb7, 0x04, 0x91, 0x31, 0xb6,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c1, 0xe6, 0x18, 0x9f, 0x35, 0x34, 0x52, 0x47, 0x04, 0x92, 0x69, 0x1e, - 0xbd, 0x6f, 0x2b, 0x5d, 0xae, 0xe1, 0x02, 0x53, 0x49, 0xd1, 0x96, 0x55, 0xa6, 0x48, 0x5c, 0xdc, - 0x71, 0x6e, 0x41, 0xb4, 0x45, 0x48, 0xcb, 0x6c, 0x24, 0x6d, 0x42, 0xea, 0x86, 0x4b, 0xb8, 0x53, - 0x84, 0xfb, 0xb1, 0xfb, 0x73, 0x5f, 0x6f, 0x13, 0xf2, 0xcc, 0xf5, 0xb6, 0xb2, 0xd3, 0x94, 0xb7, - 0xab, 0x5b, 0x32, 0x83, 0x4b, 0xa7, 0x21, 0x61, 0xa8, 0x77, 0x0e, 0xc3, 0xa5, 0x88, 0x88, 0xa6, - 0x75, 0xfc, 0x69, 0x48, 0xdc, 0x46, 0xea, 0xcd, 0x70, 0x01, 0x20, 0xa2, 0x0f, 0x31, 0xf4, 0xd7, - 0x20, 0x49, 0xfc, 0x25, 0x01, 0x30, 0x8f, 0x89, 0x33, 0x52, 0x1a, 0x12, 0xb5, 0xa6, 0x8c, 0xc3, - 0x5f, 0x84, 0x1c, 0x95, 0x2a, 0xad, 0x46, 0xbd, 0x56, 0x17, 0x63, 0xa5, 0x8b, 0x90, 0xa2, 0x4e, - 0xc0, 0x5b, 0xc3, 0x77, 0x83, 0x38, 0xc3, 0x86, 0x8c, 0x43, 0xe0, 0xb3, 0x7b, 0xdb, 0xeb, 0x75, - 0x59, 0x8c, 0x05, 0x97, 0xd7, 0x85, 0x5c, 0xb0, 0x2f, 0xfe, 0x68, 0x62, 0xea, 0x1f, 0x04, 0xc8, - 0x06, 0xfa, 0x5c, 0xdc, 0xa0, 0xa8, 0x86, 0x61, 0xdd, 0x56, 0x54, 0x43, 0x57, 0x5d, 0x16, 0x14, - 0x40, 0x44, 0x55, 0x2c, 0x99, 0x76, 0xd1, 0x3e, 0x12, 0xe3, 0x5f, 0x17, 0x40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0x51, 0xf8, 0xc1, 0x51, 0x71, 0xe6, 0xdd, 0xa3, 0xa2, - 0xf0, 0xfe, 0x51, 0x71, 0xe6, 0xee, 0xf7, 0x8b, 0x33, 0xfb, 0x29, 0xe2, 0xdb, 0x0b, 0x3f, 0x0a, - 0x00, 0x00, 0xff, 0xff, 0x20, 0x1a, 0x0c, 0x48, 0x46, 0x32, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -func (this *MapTest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapTest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapTest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapTest but is not nil && this == nil") - } - if len(this.StrStr) != len(that1.StrStr) { - return fmt.Errorf("StrStr this(%v) Not Equal that(%v)", len(this.StrStr), len(that1.StrStr)) - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return fmt.Errorf("StrStr this[%v](%v) Not Equal that[%v](%v)", i, this.StrStr[i], i, that1.StrStr[i]) - } - } - return nil -} -func (this *MapTest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapTest) - if !ok { - that2, ok := that.(MapTest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.StrStr) != len(that1.StrStr) { - return false - } - for i := range this.StrStr { - if this.StrStr[i] != that1.StrStr[i] { - return false - } - } - return true -} -func (this *FakeMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMap but is not nil && this == nil") - } - if len(this.Entries) != len(that1.Entries) { - return fmt.Errorf("Entries this(%v) Not Equal that(%v)", len(this.Entries), len(that1.Entries)) - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return fmt.Errorf("Entries this[%v](%v) Not Equal that[%v](%v)", i, this.Entries[i], i, that1.Entries[i]) - } - } - return nil -} -func (this *FakeMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMap) - if !ok { - that2, ok := that.(FakeMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Entries) != len(that1.Entries) { - return false - } - for i := range this.Entries { - if !this.Entries[i].Equal(that1.Entries[i]) { - return false - } - } - return true -} -func (this *FakeMapEntry) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *FakeMapEntry") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *FakeMapEntry but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *FakeMapEntry but is not nil && this == nil") - } - if this.Key != that1.Key { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.Other != that1.Other { - return fmt.Errorf("Other this(%v) Not Equal that(%v)", this.Other, that1.Other) - } - return nil -} -func (this *FakeMapEntry) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FakeMapEntry) - if !ok { - that2, ok := that.(FakeMapEntry) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Key != that1.Key { - return false - } - if this.Value != that1.Value { - return false - } - if this.Other != that1.Other { - return false - } - return true -} -func (this *MapTest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.MapTest{") - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%#v: %#v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - if this.StrStr != nil { - s = append(s, "StrStr: "+mapStringForStrStr+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&mapdefaults.FakeMap{") - if this.Entries != nil { - s = append(s, "Entries: "+fmt.Sprintf("%#v", this.Entries)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FakeMapEntry) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&mapdefaults.FakeMapEntry{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "Other: "+fmt.Sprintf("%#v", this.Other)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringMap(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 NewPopulatedMapTest(r randyMap, easy bool) *MapTest { - this := &MapTest{} - if r.Intn(10) != 0 { - v1 := r.Intn(10) - this.StrStr = make(map[string]string) - for i := 0; i < v1; i++ { - this.StrStr[randStringMap(r)] = randStringMap(r) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMap(r randyMap, easy bool) *FakeMap { - this := &FakeMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(5) - this.Entries = make([]*FakeMapEntry, v2) - for i := 0; i < v2; i++ { - this.Entries[i] = NewPopulatedFakeMapEntry(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedFakeMapEntry(r randyMap, easy bool) *FakeMapEntry { - this := &FakeMapEntry{} - this.Key = string(randStringMap(r)) - this.Value = string(randStringMap(r)) - this.Other = string(randStringMap(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyMap interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneMap(r randyMap) 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 randStringMap(r randyMap) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneMap(r) - } - return string(tmps) -} -func randUnrecognizedMap(r randyMap, 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 = randFieldMap(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldMap(dAtA []byte, r randyMap, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateMap(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateMap(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateMap(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 = encodeVarintPopulateMap(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateMap(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateMap(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 encodeVarintPopulateMap(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 *MapTest) Size() (n int) { - var l int - _ = l - if len(m.StrStr) > 0 { - for k, v := range m.StrStr { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) - } - } - return n -} - -func (m *FakeMap) Size() (n int) { - var l int - _ = l - if len(m.Entries) > 0 { - for _, e := range m.Entries { - l = e.Size() - n += 1 + l + sovMap(uint64(l)) - } - } - return n -} - -func (m *FakeMapEntry) Size() (n int) { - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - l = len(m.Other) - if l > 0 { - n += 1 + l + sovMap(uint64(l)) - } - return n -} - -func sovMap(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMap(x uint64) (n int) { - return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *MapTest) String() string { - if this == nil { - return "nil" - } - keysForStrStr := make([]string, 0, len(this.StrStr)) - for k := range this.StrStr { - keysForStrStr = append(keysForStrStr, k) - } - sortkeys.Strings(keysForStrStr) - mapStringForStrStr := "map[string]string{" - for _, k := range keysForStrStr { - mapStringForStrStr += fmt.Sprintf("%v: %v,", k, this.StrStr[k]) - } - mapStringForStrStr += "}" - s := strings.Join([]string{`&MapTest{`, - `StrStr:` + mapStringForStrStr + `,`, - `}`, - }, "") - return s -} -func (this *FakeMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMap{`, - `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "FakeMapEntry", "FakeMapEntry", 1) + `,`, - `}`, - }, "") - return s -} -func (this *FakeMapEntry) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FakeMapEntry{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Other:` + fmt.Sprintf("%v", this.Other) + `,`, - `}`, - }, "") - return s -} -func valueToStringMap(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *MapTest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapTest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMap - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StrStr == nil { - m.StrStr = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.StrStr[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FakeMap) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FakeMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FakeMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMap - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Entries = append(m.Entries, &FakeMapEntry{}) - if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FakeMapEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FakeMapEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FakeMapEntry: 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 ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - 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 ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Other = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMap(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, ErrIntOverflowMap - } - 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, ErrIntOverflowMap - } - 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, ErrIntOverflowMap - } - 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, ErrInvalidLengthMap - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMap - } - 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 := skipMap(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 ( - ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unmarshaler/map.proto", fileDescriptorMap) } - -var fileDescriptorMap = []byte{ - // 315 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x90, 0xbf, 0x4f, 0x02, 0x31, - 0x14, 0xc7, 0xfb, 0x20, 0x72, 0xb1, 0x38, 0x98, 0x8b, 0xc3, 0x49, 0xcc, 0x0b, 0x61, 0x62, 0xf1, - 0x2e, 0x91, 0x45, 0x1c, 0x1c, 0x8c, 0x3a, 0xc9, 0x02, 0xee, 0xa6, 0x87, 0xe5, 0x47, 0xe0, 0xe8, - 0xa5, 0xed, 0x99, 0x30, 0xc9, 0x9f, 0x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07, 0x7a, 0x54, 0x3c, 0xf8, 0xef, - 0xee, 0x5d, 0x2a, 0xf4, 0x88, 0xcb, 0xa0, 0x9c, 0xa7, 0x0e, 0x6e, 0x6e, 0x97, 0x06, 0xc9, 0xca, - 0x20, 0xf9, 0x34, 0x48, 0xd6, 0x06, 0x61, 0x63, 0x10, 0xb6, 0x06, 0x61, 0x61, 0x11, 0xde, 0x2c, - 0xc2, 0xbb, 0x45, 0xf8, 0xb0, 0x08, 0x4b, 0x8b, 0x64, 0x65, 0x11, 0xd6, 0x16, 0xe1, 0xdb, 0x22, - 0xd9, 0x58, 0x84, 0xad, 0x45, 0xb2, 0xf8, 0x42, 0x12, 0x57, 0xdc, 0xdf, 0xb6, 0x7e, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x44, 0xd1, 0x73, 0x81, 0xb7, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto deleted file mode 100644 index 75a379ce4..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; -package mapdefaults; - - -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 MapTest { - map str_str = 1; -} - -message FakeMap { - repeated FakeMapEntry entries = 1; -} - -message FakeMapEntry { - string key = 1; - string value = 2; - string other = 3; -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go deleted file mode 100644 index 9998ead10..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/map_test.go +++ /dev/null @@ -1,180 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 mapdefaults - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "foo", - Value: "", - }, - { - Key: "", - Value: "bar", - }, - { - Key: "as", - Value: "df", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 3 { - t.Fatal("StrStr map should have 3 key/value pairs") - } - - val, ok := strStr["foo"] - if !ok { - t.Fatal("\"foo\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"foo\": %s", val) - } - - val, ok = strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "bar" { - t.Fatalf("Unexpected value for \"\": %s", val) - } - - val, ok = strStr["as"] - if !ok { - t.Fatal("\"as\" not found in StrStr map.") - } - if val != "df" { - t.Fatalf("Unexpected value for \"as\": %s", val) - } -} - -func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "", - Value: "", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - // Sanity check - if string(serializedMsg) != "\n\x00" { - t.Fatal("Serialized bytes mismatched") - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"\": %s", val) - } -} - -func TestUnmarshalIgnoreUnknownField(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - { - Key: "key", - Value: "value", - Other: "other", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := &MapTest{} - err = proto.Unmarshal(serializedMsg, msg) - - if err != nil { - var pb proto.Message = msg - _, ok := pb.(proto.Unmarshaler) - if !ok { - // non-codegen implementation returns error when extra tags are - // present. - return - } - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr["key"] - if !ok { - t.Fatal("\"key\" not found in StrStr map.") - } - if val != "value" { - t.Fatalf("Unexpected value for \"value\": %s", val) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go deleted file mode 100644 index d79882b3e..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/combos/unmarshaler/mappb_test.go +++ /dev/null @@ -1,480 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/map.proto - -It has these top-level messages: - MapTest - FakeMap - FakeMapEntry -*/ -package mapdefaults - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 TestMapTestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFakeMapEntryProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapTestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapTest{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestFakeMapEntryJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FakeMapEntry{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapTestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapTestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapTest{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestFakeMapEntryProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FakeMapEntry{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapDescription(t *testing.T) { - MapDescription() -} -func TestMapTestVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapTest{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestFakeMapEntryVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FakeMapEntry{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapTestGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFakeMapEntryGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMapTestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapTest(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestFakeMapEntrySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFakeMapEntry(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestMapTestStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapTest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestFakeMapEntryStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFakeMapEntry(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/github.com/gogo/protobuf/test/mapdefaults/map.pb.go b/vendor/github.com/gogo/protobuf/test/mapdefaults/map.pb.go deleted file mode 100644 index 8046683ca..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/map.pb.go +++ /dev/null @@ -1,414 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: map.proto - -/* -Package mapdefaults is a generated protocol buffer package. - -It is generated from these files: - map.proto - -It has these top-level messages: - MapTest -*/ -package mapdefaults - -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 - -// 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 MapTest struct { - StrStr map[string]string `protobuf:"bytes,1,rep,name=str_str,json=strStr" json:"str_str,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *MapTest) Reset() { *m = MapTest{} } -func (m *MapTest) String() string { return proto.CompactTextString(m) } -func (*MapTest) ProtoMessage() {} -func (*MapTest) Descriptor() ([]byte, []int) { return fileDescriptorMap, []int{0} } - -func (m *MapTest) GetStrStr() map[string]string { - if m != nil { - return m.StrStr - } - return nil -} - -func init() { - proto.RegisterType((*MapTest)(nil), "mapdefaults.MapTest") -} -func (m *MapTest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapTest) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StrStr) > 0 { - for k := range m.StrStr { - dAtA[i] = 0xa - i++ - v := m.StrStr[k] - mapSize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - i = encodeVarintMap(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMap(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintMap(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - return i, nil -} - -func encodeFixed64Map(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 encodeFixed32Map(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 encodeVarintMap(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 *MapTest) Size() (n int) { - var l int - _ = l - if len(m.StrStr) > 0 { - for k, v := range m.StrStr { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMap(uint64(len(k))) + 1 + len(v) + sovMap(uint64(len(v))) - n += mapEntrySize + 1 + sovMap(uint64(mapEntrySize)) - } - } - return n -} - -func sovMap(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozMap(x uint64) (n int) { - return sovMap(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MapTest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapTest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapTest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StrStr", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMap - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StrStr == nil { - m.StrStr = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMap - } - 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 ErrInvalidLengthMap - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } - } - m.StrStr[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMap(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMap - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMap(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, ErrIntOverflowMap - } - 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, ErrIntOverflowMap - } - 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, ErrIntOverflowMap - } - 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, ErrInvalidLengthMap - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMap - } - 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 := skipMap(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 ( - ErrInvalidLengthMap = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMap = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("map.proto", fileDescriptorMap) } - -var fileDescriptorMap = []byte{ - // 161 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcc, 0x4d, 0x2c, 0xd0, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xce, 0x4d, 0x2c, 0x48, 0x49, 0x4d, 0x4b, 0x2c, 0xcd, - 0x29, 0x29, 0x56, 0xaa, 0xe7, 0x62, 0xf7, 0x4d, 0x2c, 0x08, 0x49, 0x2d, 0x2e, 0x11, 0xb2, 0xe4, - 0x62, 0x2f, 0x2e, 0x29, 0x8a, 0x2f, 0x2e, 0x29, 0x92, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x52, - 0xd0, 0x43, 0x52, 0xa9, 0x07, 0x55, 0xa6, 0x17, 0x5c, 0x52, 0x14, 0x5c, 0x52, 0xe4, 0x9a, 0x57, - 0x52, 0x54, 0x19, 0xc4, 0x56, 0x0c, 0xe6, 0x48, 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70, - 0x31, 0x67, 0xa7, 0x56, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0x98, 0x42, 0x22, 0x5c, - 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x4c, 0x60, 0x31, 0x08, 0xc7, 0x8a, 0xc9, 0x82, 0xd1, - 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x4c, 0x62, - 0x03, 0x3b, 0xd1, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x38, 0xe5, 0x24, 0x74, 0xaf, 0x00, 0x00, - 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto b/vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto deleted file mode 100644 index 43d5c0dab..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/map.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; -package mapdefaults; - - -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 MapTest { - map str_str = 1; -} - -message FakeMap { - repeated FakeMapEntry entries = 1; -} - -message FakeMapEntry { - string key = 1; - string value = 2; - string other = 3; -} diff --git a/vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in b/vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in deleted file mode 100644 index 51e1260c3..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapdefaults/map_test.go.in +++ /dev/null @@ -1,180 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 mapdefaults - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestUnmarshalImplicitDefaultKeyValue1(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - &FakeMapEntry{ - Key: "foo", - Value: "", - }, - &FakeMapEntry{ - Key: "", - Value: "bar", - }, - &FakeMapEntry{ - Key: "as", - Value: "df", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 3 { - t.Fatal("StrStr map should have 3 key/value pairs") - } - - val, ok := strStr["foo"] - if !ok { - t.Fatal("\"foo\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"foo\": %s", val) - } - - val, ok = strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "bar" { - t.Fatalf("Unexpected value for \"\": %s", val) - } - - val, ok = strStr["as"] - if !ok { - t.Fatal("\"as\" not found in StrStr map.") - } - if val != "df" { - t.Fatalf("Unexpected value for \"as\": %s", val) - } -} - -func TestUnmarshalImplicitDefaultKeyValue2(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - &FakeMapEntry{ - Key: "", - Value: "", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - // Sanity check - if string(serializedMsg) != "\n\x00" { - t.Fatal("Serialized bytes mismatched") - } - - msg := MapTest{} - err = proto.Unmarshal(serializedMsg, &msg) - - if err != nil { - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr[""] - if !ok { - t.Fatal("\"\" not found in StrStr map.") - } - if val != "" { - t.Fatalf("Unexpected value for \"\": %s", val) - } -} - -func TestUnmarshalIgnoreUnknownField(t *testing.T) { - fm := &FakeMap{ - Entries: []*FakeMapEntry{ - &FakeMapEntry{ - Key: "key", - Value: "value", - Other: "other", - }, - }, - } - - serializedMsg, err := proto.Marshal(fm) - if err != nil { - t.Fatalf("Failed to serialize msg: %s", err) - } - - msg := &MapTest{} - err = proto.Unmarshal(serializedMsg, msg) - - if err != nil { - var pb proto.Message = msg - _, ok := pb.(proto.Unmarshaler) - if !ok { - // non-codegen implementation returns error when extra tags are - // present. - return - } - t.Fatalf("Unexpected error: %s", err) - } - - strStr := msg.StrStr - if len(strStr) != 1 { - t.Fatal("StrStr map should have 1 key/value pairs") - } - - val, ok := strStr["key"] - if !ok { - t.Fatal("\"key\" not found in StrStr map.") - } - if val != "value" { - t.Fatalf("Unexpected value for \"value\": %s", val) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile b/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile deleted file mode 100644 index 6a43fe506..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/Makefile +++ /dev/null @@ -1,35 +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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogo - cp header.proto mapsproto2.proto - cat ../theproto3/maps.proto >> mapsproto2.proto - find combos -type d -not -name combos -exec cp mapsproto2_test.go.in {}/mapsproto2_test.go \; - protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. mapsproto2.proto diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go deleted file mode 100644 index 9aa9c095c..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.pb.go +++ /dev/null @@ -1,8627 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/mapsproto2.proto - -/* - 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 - CustomMap - AllMaps - AllMapsOrdered -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import binary "encoding/binary" - -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 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 -} -func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -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() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -type CustomMap struct { - Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomMap) Reset() { *m = CustomMap{} } -func (*CustomMap) ProtoMessage() {} -func (*CustomMap) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } - -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 (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{3} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *CustomMap) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4688 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xde, 0xe1, 0x43, 0x22, 0x0f, 0x29, 0x6a, 0x74, 0x25, 0xaf, 0x69, 0xc5, 0xd6, 0xee, 0xca, - 0x8f, 0x95, 0xd7, 0xb6, 0x64, 0xcb, 0xbb, 0xeb, 0x35, 0x37, 0xb6, 0x4b, 0x49, 0x5c, 0xad, 0x6c, - 0xbd, 0x32, 0x94, 0xfc, 0x0a, 0x8c, 0xe9, 0x68, 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, 0x47, - 0x34, 0x03, 0x50, 0xc3, 0x6d, 0x6c, 0xd6, 0xb0, 0xa9, 0x1f, 0x14, 0x93, 0x27, 0x93, 0x73, 0x59, - 0xc5, 0x27, 0x41, 0x77, 0xc1, 0x44, 0xbb, 0xb3, 0xd7, 0x34, 0x74, 0xd5, 0xa7, 0x06, 0x27, 0x93, - 0x73, 0x69, 0x45, 0x66, 0x03, 0x2b, 0x5d, 0xe5, 0xd3, 0x30, 0xfe, 0x3c, 0xd6, 0xae, 0xf8, 0x55, - 0x73, 0x54, 0xb5, 0x40, 0xc4, 0x3e, 0xc5, 0x65, 0xc8, 0xb7, 0xb0, 0xe3, 0x68, 0x0d, 0xac, 0xba, - 0x07, 0x6d, 0x5c, 0x4c, 0xd1, 0xb7, 0x3f, 0xd9, 0xf3, 0xf6, 0xe1, 0x37, 0xcf, 0x71, 0xd4, 0xce, - 0x41, 0x1b, 0xa3, 0x32, 0x64, 0xb1, 0xd9, 0x69, 0x31, 0x86, 0x74, 0x1f, 0xff, 0x55, 0xcc, 0x4e, - 0x2b, 0xcc, 0x92, 0x21, 0x30, 0x4e, 0x31, 0xea, 0x60, 0xfb, 0xaa, 0xa1, 0xe3, 0xe2, 0x08, 0x25, - 0x38, 0xdd, 0x43, 0x50, 0x65, 0xe3, 0x61, 0x0e, 0x81, 0x43, 0xcb, 0x90, 0xc5, 0x2f, 0xb8, 0xd8, - 0x74, 0x0c, 0xcb, 0x2c, 0x8e, 0x52, 0x92, 0xdb, 0x23, 0x56, 0x11, 0x37, 0x6b, 0x61, 0x8a, 0x2e, - 0x0e, 0x9d, 0x87, 0x51, 0xab, 0xed, 0x1a, 0x96, 0xe9, 0x14, 0x33, 0x27, 0xa5, 0xb9, 0xdc, 0xe2, - 0xcd, 0x91, 0x81, 0xb0, 0xc5, 0x74, 0x14, 0xa1, 0x8c, 0xd6, 0x40, 0x76, 0xac, 0x8e, 0xad, 0x63, - 0x55, 0xb7, 0x6a, 0x58, 0x35, 0xcc, 0xba, 0x55, 0xcc, 0x52, 0x82, 0x13, 0xbd, 0x2f, 0x42, 0x15, - 0x97, 0xad, 0x1a, 0x5e, 0x33, 0xeb, 0x96, 0x52, 0x70, 0x02, 0xcf, 0xe8, 0x38, 0x8c, 0x38, 0x07, - 0xa6, 0xab, 0xbd, 0x50, 0xcc, 0xd3, 0x08, 0xe1, 0x4f, 0xb3, 0xff, 0x30, 0x02, 0xe3, 0xc3, 0x84, - 0xd8, 0x45, 0x48, 0xd7, 0xc9, 0x5b, 0x16, 0x13, 0x47, 0xf1, 0x01, 0xc3, 0x04, 0x9d, 0x38, 0xf2, - 0x11, 0x9d, 0x58, 0x86, 0x9c, 0x89, 0x1d, 0x17, 0xd7, 0x58, 0x44, 0x24, 0x87, 0x8c, 0x29, 0x60, - 0xa0, 0xde, 0x90, 0x4a, 0x7d, 0xa4, 0x90, 0x7a, 0x12, 0xc6, 0x3d, 0x93, 0x54, 0x5b, 0x33, 0x1b, - 0x22, 0x36, 0x17, 0xe2, 0x2c, 0x99, 0xaf, 0x08, 0x9c, 0x42, 0x60, 0x4a, 0x01, 0x07, 0x9e, 0xd1, - 0x0a, 0x80, 0x65, 0x62, 0xab, 0xae, 0xd6, 0xb0, 0xde, 0x2c, 0x66, 0xfa, 0x78, 0x69, 0x8b, 0xa8, - 0xf4, 0x78, 0xc9, 0x62, 0x52, 0xbd, 0x89, 0x1e, 0xec, 0x86, 0xda, 0x68, 0x9f, 0x48, 0xd9, 0x60, - 0x9b, 0xac, 0x27, 0xda, 0x76, 0xa1, 0x60, 0x63, 0x12, 0xf7, 0xb8, 0xc6, 0xdf, 0x2c, 0x4b, 0x8d, - 0x98, 0x8f, 0x7d, 0x33, 0x85, 0xc3, 0xd8, 0x8b, 0x8d, 0xd9, 0xfe, 0x47, 0x74, 0x2b, 0x78, 0x02, - 0x95, 0x86, 0x15, 0xd0, 0x2c, 0x94, 0x17, 0xc2, 0x4d, 0xad, 0x85, 0xa7, 0x5f, 0x84, 0x42, 0xd0, - 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8, 0x61, 0x2f, 0x1d, 0x09, 0x7f, - 0x1e, 0x32, 0x1f, 0x05, 0x37, 0xfb, 0x03, 0x04, 0xa3, 0xe5, 0x66, 0x73, 0x43, 0x6b, 0x3b, 0xe8, - 0x29, 0x98, 0x60, 0x9d, 0xfd, 0x8e, 0xb5, 0x42, 0xbf, 0xfc, 0x6c, 0x68, 0x6d, 0x1e, 0xd0, 0x77, - 0x05, 0xdc, 0xcd, 0x01, 0xf3, 0x3d, 0xda, 0x74, 0x7e, 0xa5, 0x97, 0x05, 0x3d, 0x0e, 0xb2, 0x10, - 0xd2, 0xbd, 0x45, 0x98, 0x59, 0xb8, 0x9e, 0x19, 0xc8, 0x2c, 0x94, 0x19, 0x71, 0x0f, 0x07, 0x7a, - 0x18, 0x32, 0x6b, 0xa6, 0x7b, 0xff, 0x22, 0xe1, 0x63, 0x31, 0x38, 0x1b, 0xc9, 0x27, 0x94, 0x18, - 0x8f, 0x87, 0xe1, 0xf8, 0xf3, 0x67, 0x09, 0x3e, 0x35, 0x18, 0x4f, 0x95, 0xba, 0x78, 0xfa, 0x88, - 0xca, 0x90, 0x25, 0x6b, 0xce, 0x0c, 0x60, 0xff, 0xe5, 0xe1, 0xd6, 0x48, 0x02, 0x4f, 0x8b, 0x31, - 0x74, 0x51, 0x82, 0x82, 0xd9, 0x30, 0x12, 0x43, 0xe1, 0x33, 0xa2, 0x8b, 0x22, 0x14, 0x55, 0xcf, - 0x8a, 0xd1, 0x01, 0x14, 0xd5, 0x90, 0x15, 0x55, 0xbf, 0x15, 0x55, 0xcf, 0x8a, 0x4c, 0x0c, 0x85, - 0xdf, 0x0a, 0xef, 0x19, 0xad, 0x00, 0x5c, 0x32, 0x5e, 0xc0, 0x35, 0x66, 0x46, 0x36, 0x22, 0x19, - 0x09, 0x8e, 0xae, 0x1a, 0x23, 0xf1, 0xe1, 0xd0, 0x2a, 0xe4, 0xaa, 0xf5, 0x2e, 0x0d, 0xf0, 0xff, - 0xf1, 0x11, 0x69, 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, 0xef, 0xfa, 0x8c, 0xf4, 0xc1, 0xf5, 0x19, 0xe9, - 0xda, 0xe1, 0x8c, 0xf4, 0xd5, 0xc3, 0x19, 0xe9, 0xeb, 0x87, 0x33, 0xd2, 0xb7, 0x0f, 0x67, 0xa4, - 0xef, 0x1c, 0xce, 0x48, 0x6f, 0x1c, 0xce, 0x48, 0xdf, 0x3b, 0x9c, 0x91, 0xde, 0x3a, 0x9c, 0x91, - 0xde, 0x39, 0x9c, 0x39, 0xf6, 0xde, 0xe1, 0x8c, 0xf4, 0xc1, 0xe1, 0xcc, 0xb1, 0x6b, 0x3f, 0x9e, - 0x39, 0xf6, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x09, 0x1b, 0x6d, 0x94, 0x81, 0x47, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *CustomMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) - } - } - if len(this.Ids) != len(that1.Ids) { - return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[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 *CustomMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return false - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return false - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return false - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return false - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return false - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return false - } - } - if len(this.Ids) != len(that1.Ids) { - return false - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 -} -func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 CustomMapFace interface { - Proto() proto.Message - GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 - GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 - GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid - GetIds() map[string]github_com_gogo_protobuf_test.Uuid -} - -func (this *CustomMap) Proto() proto.Message { - return this -} - -func (this *CustomMap) TestProto() proto.Message { - return NewCustomMapFromFace(this) -} - -func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { - return this.Nullable128S -} - -func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { - return this.Uint128S -} - -func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { - return this.NullableIds -} - -func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { - return this.Ids -} - -func NewCustomMapFromFace(that CustomMapFace) *CustomMap { - this := &CustomMap{} - this.Nullable128S = that.GetNullable128S() - this.Uint128S = that.GetUint128S() - this.NullableIds = that.GetNullableIds() - this.Ids = that.GetIds() - return this -} - -type AllMapsFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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 *CustomMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&proto2_maps.CustomMap{") - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - if this.Nullable128S != nil { - s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") - } - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - if this.Uint128S != nil { - s = append(s, "Uint128S: "+mapStringForUint128S+",\n") - } - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - if this.NullableIds != nil { - s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") - } - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) - } - mapStringForIds += "}" - if this.Ids != nil { - s = append(s, "Ids: "+mapStringForIds+",\n") - } - if this.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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.F)))) - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Nullable128S) > 0 { - for k := range m.Nullable128S { - dAtA[i] = 0xa - i++ - v := m.Nullable128S[k] - cSize := 0 - if v != nil { - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - 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 len(m.Uint128S) > 0 { - for k := range m.Uint128S { - dAtA[i] = 0x12 - i++ - v := m.Uint128S[k] - cSize := 0 - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - 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())) - n2, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if len(m.NullableIds) > 0 { - for k := range m.NullableIds { - dAtA[i] = 0x1a - i++ - v := m.NullableIds[k] - cSize := 0 - if v != nil { - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) - n3, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - } - } - if len(m.Ids) > 0 { - for k := range m.Ids { - dAtA[i] = 0x22 - i++ - v := m.Ids[k] - cSize := 0 - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - 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())) - n4, err := v.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 *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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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] - byteSize := 0 - if v != nil { - byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - 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] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovMapsproto2(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) - n5, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMapsOrdered) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) - for k := range m.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) - } - sortkeys.Strings(keysForStringToDoubleMap) - for _, k := range keysForStringToDoubleMap { - dAtA[i] = 0xa - i++ - v := m.StringToDoubleMap[string(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - sortkeys.Strings(keysForStringToFloatMap) - for _, k := range keysForStringToFloatMap { - dAtA[i] = 0x12 - i++ - v := m.StringToFloatMap[string(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - sortkeys.Int32s(keysForInt32Map) - for _, k := range keysForInt32Map { - dAtA[i] = 0x1a - i++ - v := m.Int32Map[int32(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 { - keysForInt64Map := make([]int64, 0, len(m.Int64Map)) - for k := range m.Int64Map { - keysForInt64Map = append(keysForInt64Map, int64(k)) - } - sortkeys.Int64s(keysForInt64Map) - for _, k := range keysForInt64Map { - dAtA[i] = 0x22 - i++ - v := m.Int64Map[int64(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 { - keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) - for k := range m.Uint32Map { - keysForUint32Map = append(keysForUint32Map, uint32(k)) - } - sortkeys.Uint32s(keysForUint32Map) - for _, k := range keysForUint32Map { - dAtA[i] = 0x2a - i++ - v := m.Uint32Map[uint32(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 { - keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) - for k := range m.Uint64Map { - keysForUint64Map = append(keysForUint64Map, uint64(k)) - } - sortkeys.Uint64s(keysForUint64Map) - for _, k := range keysForUint64Map { - dAtA[i] = 0x32 - i++ - v := m.Uint64Map[uint64(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 { - keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) - for k := range m.Sint32Map { - keysForSint32Map = append(keysForSint32Map, int32(k)) - } - sortkeys.Int32s(keysForSint32Map) - for _, k := range keysForSint32Map { - dAtA[i] = 0x3a - i++ - v := m.Sint32Map[int32(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 { - keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) - for k := range m.Sint64Map { - keysForSint64Map = append(keysForSint64Map, int64(k)) - } - sortkeys.Int64s(keysForSint64Map) - for _, k := range keysForSint64Map { - dAtA[i] = 0x42 - i++ - v := m.Sint64Map[int64(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 { - keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) - for k := range m.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, uint32(k)) - } - sortkeys.Uint32s(keysForFixed32Map) - for _, k := range keysForFixed32Map { - dAtA[i] = 0x4a - i++ - v := m.Fixed32Map[uint32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - sortkeys.Int32s(keysForSfixed32Map) - for _, k := range keysForSfixed32Map { - dAtA[i] = 0x52 - i++ - v := m.Sfixed32Map[int32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - sortkeys.Uint64s(keysForFixed64Map) - for _, k := range keysForFixed64Map { - dAtA[i] = 0x5a - i++ - v := m.Fixed64Map[uint64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - sortkeys.Int64s(keysForSfixed64Map) - for _, k := range keysForSfixed64Map { - dAtA[i] = 0x62 - i++ - v := m.Sfixed64Map[int64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - sortkeys.Bools(keysForBoolMap) - for _, k := range keysForBoolMap { - dAtA[i] = 0x6a - i++ - v := m.BoolMap[bool(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 { - keysForStringMap := make([]string, 0, len(m.StringMap)) - for k := range m.StringMap { - keysForStringMap = append(keysForStringMap, string(k)) - } - sortkeys.Strings(keysForStringMap) - for _, k := range keysForStringMap { - dAtA[i] = 0x72 - i++ - v := m.StringMap[string(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 { - keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) - for k := range m.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) - } - sortkeys.Strings(keysForStringToBytesMap) - for _, k := range keysForStringToBytesMap { - dAtA[i] = 0x7a - i++ - v := m.StringToBytesMap[string(k)] - byteSize := 0 - if v != nil { - byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - } - if len(m.StringToEnumMap) > 0 { - keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) - for k := range m.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) - } - sortkeys.Strings(keysForStringToEnumMap) - for _, k := range keysForStringToEnumMap { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToEnumMap[string(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 { - keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) - for k := range m.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) - } - sortkeys.Strings(keysForStringToMsgMap) - for _, k := range keysForStringToMsgMap { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToMsgMap[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovMapsproto2(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) - n6, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -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 NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { - this := &CustomMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v2; i++ { - this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v3; i++ { - this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v4; i++ { - this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v5; i++ { - this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v6; i++ { - v7 := randStringMapsproto2(r) - this.StringToDoubleMap[v7] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v8; i++ { - v9 := randStringMapsproto2(r) - this.StringToFloatMap[v9] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v10; i++ { - v11 := int32(r.Int31()) - this.Int32Map[v11] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v11] *= -1 - } - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v12; i++ { - v13 := int64(r.Int63()) - this.Int64Map[v13] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v13] *= -1 - } - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v14; i++ { - v15 := uint32(r.Uint32()) - this.Uint32Map[v15] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v16; i++ { - v17 := uint64(uint64(r.Uint32())) - this.Uint64Map[v17] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v18; i++ { - v19 := int32(r.Int31()) - this.Sint32Map[v19] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v19] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v20; i++ { - v21 := int64(r.Int63()) - this.Sint64Map[v21] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v22; i++ { - v23 := uint32(r.Uint32()) - this.Fixed32Map[v23] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v24; i++ { - v25 := int32(r.Int31()) - this.Sfixed32Map[v25] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v26; i++ { - v27 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v28; i++ { - v29 := int64(r.Int63()) - this.Sfixed64Map[v29] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v29] *= -1 - } - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v30; i++ { - v31 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v32; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v33; i++ { - v34 := r.Intn(100) - v35 := randStringMapsproto2(r) - this.StringToBytesMap[v35] = make([]byte, v34) - for i := 0; i < v34; i++ { - this.StringToBytesMap[v35][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v36; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v37; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v38; i++ { - v39 := randStringMapsproto2(r) - this.StringToDoubleMap[v39] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v40; i++ { - v41 := randStringMapsproto2(r) - this.StringToFloatMap[v41] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v42; i++ { - v43 := int32(r.Int31()) - this.Int32Map[v43] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v43] *= -1 - } - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v44; i++ { - v45 := int64(r.Int63()) - this.Int64Map[v45] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v45] *= -1 - } - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v46; i++ { - v47 := uint32(r.Uint32()) - this.Uint32Map[v47] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v48; i++ { - v49 := uint64(uint64(r.Uint32())) - this.Uint64Map[v49] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v50; i++ { - v51 := int32(r.Int31()) - this.Sint32Map[v51] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v51] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v52; i++ { - v53 := int64(r.Int63()) - this.Sint64Map[v53] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v54; i++ { - v55 := uint32(r.Uint32()) - this.Fixed32Map[v55] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v56; i++ { - v57 := int32(r.Int31()) - this.Sfixed32Map[v57] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v58; i++ { - v59 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v60; i++ { - v61 := int64(r.Int63()) - this.Sfixed64Map[v61] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v61] *= -1 - } - } - } - if r.Intn(10) != 0 { - v62 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v62; i++ { - v63 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v64; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v65; i++ { - v66 := r.Intn(100) - v67 := randStringMapsproto2(r) - this.StringToBytesMap[v67] = make([]byte, v66) - for i := 0; i < v66; i++ { - this.StringToBytesMap[v67][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v68; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v69; 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 { - v70 := r.Intn(100) - tmps := make([]rune, v70) - for i := 0; i < v70; 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)) - v71 := r.Int63() - if r.Intn(2) == 0 { - v71 *= -1 - } - dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) - 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 *CustomMap) Size() (n int) { - var l int - _ = l - if len(m.Nullable128S) > 0 { - for k, v := range m.Nullable128S { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint128S) > 0 { - for k, v := range m.Uint128S { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.NullableIds) > 0 { - for k, v := range m.NullableIds { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Ids) > 0 { - for k, v := range m.Ids { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 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 *CustomMap) String() string { - if this == nil { - return "nil" - } - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) - } - mapStringForIds += "}" - s := strings.Join([]string{`&CustomMap{`, - `Nullable128S:` + mapStringForNullable128S + `,`, - `Uint128S:` + mapStringForUint128S + `,`, - `NullableIds:` + mapStringForNullableIds + `,`, - `Ids:` + mapStringForIds + `,`, - `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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 *CustomMap) Unmarshal(dAtA []byte) 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: CustomMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullable128S", 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 - } - if m.Nullable128S == nil { - m.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Nullable128S[mapkey] = ((*github_com_gogo_protobuf_test_custom.Uint128)(mapvalue)) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint128S", 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 - } - if m.Uint128S == nil { - m.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Uint128S[mapkey] = ((github_com_gogo_protobuf_test_custom.Uint128)(*mapvalue)) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableIds", 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 - } - if m.NullableIds == nil { - m.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test.Uuid - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableIds[mapkey] = ((*github_com_gogo_protobuf_test.Uuid)(mapvalue)) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", 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 - } - if m.Ids == nil { - m.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test.Uuid - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Ids[mapkey] = ((github_com_gogo_protobuf_test.Uuid)(*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 (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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 (m *AllMapsOrdered) Unmarshal(dAtA []byte) 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: AllMapsOrdered: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMapsOrdered: 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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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") -) - -func init() { proto.RegisterFile("combos/both/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 1143 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcb, 0x6f, 0x1a, 0x57, - 0x14, 0xc6, 0xb9, 0x3c, 0x0c, 0x5c, 0xde, 0x37, 0x69, 0x85, 0x50, 0x7b, 0x71, 0xe8, 0x8b, 0x90, - 0x14, 0x6c, 0x1a, 0x45, 0x96, 0xd3, 0xa6, 0x32, 0xb6, 0x53, 0xac, 0x14, 0x37, 0x82, 0xa6, 0x2f, - 0xc9, 0x52, 0xc1, 0x3c, 0x82, 0x0a, 0x0c, 0x65, 0x86, 0xa8, 0xde, 0x54, 0xf9, 0x33, 0xba, 0xed, - 0xae, 0xcb, 0x2e, 0xbb, 0xec, 0xd2, 0x52, 0x37, 0x59, 0x46, 0x51, 0x65, 0x85, 0xe9, 0x26, 0xcb, - 0x2c, 0xb3, 0xac, 0xe6, 0xce, 0x83, 0x3b, 0x33, 0x67, 0x66, 0xa0, 0xab, 0x2e, 0xbc, 0x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 0x70, 0x7b, 0x45, 0xb9, - 0xef, 0x9c, 0xa2, 0xdc, 0xd6, 0x2a, 0x74, 0xf7, 0x44, 0xf7, 0xb5, 0x43, 0xa2, 0xab, 0xac, 0x82, - 0xbe, 0x0c, 0x76, 0x97, 0xc1, 0xee, 0x32, 0xd8, 0x5d, 0x06, 0xbb, 0xff, 0x47, 0xb0, 0xdb, 0x0d, - 0xfe, 0xf2, 0x6b, 0x1e, 0x95, 0xae, 0xe1, 0xb0, 0x66, 0x4d, 0x36, 0xb0, 0xbf, 0xb1, 0x97, 0xf6, - 0xb1, 0xcf, 0x5a, 0x1a, 0xb1, 0xcf, 0xfd, 0xb4, 0xbf, 0xf6, 0xf9, 0xf9, 0x82, 0xfa, 0x9e, 0x2e, - 0xa8, 0xef, 0xd9, 0x82, 0xfa, 0x5e, 0x2c, 0x28, 0x7a, 0xb9, 0xa0, 0xe8, 0xd5, 0x82, 0xa2, 0xd7, - 0x0b, 0x8a, 0x9e, 0xc8, 0x14, 0xfd, 0x26, 0x53, 0xf4, 0xbb, 0x4c, 0xd1, 0x1f, 0x32, 0x45, 0x7f, - 0xca, 0x14, 0x9d, 0xcb, 0x14, 0x3d, 0x95, 0x29, 0x7a, 0x21, 0x53, 0xf4, 0x52, 0xa6, 0xbe, 0x57, - 0x32, 0x45, 0xaf, 0x65, 0xea, 0x7b, 0xf2, 0x0f, 0xf5, 0xfd, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xfa, - 0x87, 0xd5, 0x9e, 0xf2, 0x16, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto deleted file mode 100644 index 4f8e4ab91..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2.proto +++ /dev/null @@ -1,124 +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 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; -} - -message CustomMap { - map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; - map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; - map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; - map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; -} - -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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go deleted file mode 100644 index 488bc86bf..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2_test.go +++ /dev/null @@ -1,104 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 proto2_maps - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go deleted file mode 100644 index 9dddf5971..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/both/mapsproto2pb_test.go +++ /dev/null @@ -1,989 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/mapsproto2.proto - -/* -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 - CustomMap - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedCustomMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &CustomMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(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 TestCustomMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestCustomMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomMap(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(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 TestCustomMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go deleted file mode 100644 index be9329498..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.pb.go +++ /dev/null @@ -1,4487 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/mapsproto2.proto - -/* -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 - CustomMap - AllMaps - AllMapsOrdered -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import binary "encoding/binary" - -// 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 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 -} -func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -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() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -type CustomMap struct { - Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomMap) Reset() { *m = CustomMap{} } -func (*CustomMap) ProtoMessage() {} -func (*CustomMap) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } - -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 (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{3} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *CustomMap) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4687 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xd6, 0xf0, 0x21, 0x91, 0x87, 0x14, 0x35, 0xba, 0x92, 0xd7, 0xb4, 0x1c, 0x6b, 0x77, 0xe5, - 0xc7, 0xca, 0x6b, 0x5b, 0x6b, 0xcb, 0xbb, 0xeb, 0x35, 0x37, 0xb6, 0x4b, 0x49, 0x5c, 0xad, 0x6c, - 0xbd, 0x32, 0x94, 0xfc, 0x0a, 0x8c, 0xe9, 0x68, 0x78, 0x49, 0x8d, 0x97, 0x9c, 0xa1, 0x67, 0x86, - 0x6b, 0xcb, 0x28, 0x8a, 0x2d, 0xdc, 0x07, 0x82, 0xa2, 0xef, 0x02, 0x71, 0x5c, 0xc7, 0x6d, 0x0a, - 0xb4, 0x4e, 0xd3, 0x57, 0xd2, 0xb4, 0x69, 0xda, 0x5f, 0xf9, 0x93, 0xd6, 0x40, 0x81, 0x22, 0xf9, - 0x17, 0x04, 0x81, 0xe1, 0x55, 0x0c, 0xd4, 0x6d, 0xdd, 0xc6, 0x6d, 0x0d, 0xd4, 0x80, 0xff, 0x14, - 0xf7, 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21, 0xdf, 0xc2, 0x8e, 0xa3, 0x35, 0xb0, 0xea, - 0x1e, 0xb4, 0x71, 0x31, 0x45, 0xdf, 0xfe, 0x44, 0xcf, 0xdb, 0x87, 0xdf, 0x3c, 0xc7, 0x51, 0x3b, - 0x07, 0x6d, 0x8c, 0xca, 0x90, 0xc5, 0x66, 0xa7, 0xc5, 0x18, 0xd2, 0x7d, 0xfc, 0x57, 0x31, 0x3b, - 0xad, 0x30, 0x4b, 0x86, 0xc0, 0x38, 0xc5, 0x98, 0x83, 0xed, 0xab, 0x86, 0x8e, 0x8b, 0xa3, 0x94, - 0xe0, 0x54, 0x0f, 0x41, 0x95, 0x8d, 0x87, 0x39, 0x04, 0x0e, 0x2d, 0x43, 0x16, 0xbf, 0xe0, 0x62, - 0xd3, 0x31, 0x2c, 0xb3, 0x38, 0x46, 0x49, 0x6e, 0x8f, 0x58, 0x45, 0xdc, 0xac, 0x85, 0x29, 0xba, - 0x38, 0x74, 0x1e, 0xc6, 0xac, 0xb6, 0x6b, 0x58, 0xa6, 0x53, 0xcc, 0x9c, 0x90, 0xe6, 0x73, 0x8b, - 0x9f, 0x89, 0x0c, 0x84, 0x2d, 0xa6, 0xa3, 0x08, 0x65, 0xb4, 0x06, 0xb2, 0x63, 0x75, 0x6c, 0x1d, - 0xab, 0xba, 0x55, 0xc3, 0xaa, 0x61, 0xd6, 0xad, 0x62, 0x96, 0x12, 0x1c, 0xef, 0x7d, 0x11, 0xaa, - 0xb8, 0x6c, 0xd5, 0xf0, 0x9a, 0x59, 0xb7, 0x94, 0x82, 0x13, 0x78, 0x46, 0xc7, 0x60, 0xd4, 0x39, - 0x30, 0x5d, 0xed, 0x85, 0x62, 0x9e, 0x46, 0x08, 0x7f, 0x9a, 0xfb, 0xbb, 0x51, 0x98, 0x18, 0x26, - 0xc4, 0x2e, 0x42, 0xba, 0x4e, 0xde, 0xb2, 0x98, 0x38, 0x8a, 0x0f, 0x18, 0x26, 0xe8, 0xc4, 0xd1, - 0x8f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, - 0xd1, 0xaf, 0x17, 0x8e, 0xa9, 0xb9, 0x6f, 0x25, 0x20, 0x45, 0xf3, 0xc5, 0x04, 0xe4, 0x76, 0x9e, - 0xda, 0xae, 0xa8, 0x2b, 0x5b, 0xbb, 0x4b, 0xeb, 0x15, 0x59, 0x42, 0x05, 0x00, 0x2a, 0xb8, 0xb4, - 0xbe, 0x55, 0xde, 0x91, 0x13, 0xde, 0xf3, 0xda, 0xe6, 0xce, 0xf9, 0xb3, 0x72, 0xd2, 0x03, 0xec, - 0x32, 0x41, 0xca, 0xaf, 0x70, 0xff, 0xa2, 0x9c, 0x46, 0x32, 0xe4, 0x19, 0xc1, 0xda, 0x93, 0x95, - 0x95, 0xf3, 0x67, 0xe5, 0xd1, 0xa0, 0xe4, 0xfe, 0x45, 0x79, 0x0c, 0x8d, 0x43, 0x96, 0x4a, 0x96, - 0xb6, 0xb6, 0xd6, 0xe5, 0x8c, 0xc7, 0x59, 0xdd, 0x51, 0xd6, 0x36, 0x57, 0xe5, 0xac, 0xc7, 0xb9, - 0xaa, 0x6c, 0xed, 0x6e, 0xcb, 0xe0, 0x31, 0x6c, 0x54, 0xaa, 0xd5, 0xf2, 0x6a, 0x45, 0xce, 0x79, - 0x1a, 0x4b, 0x4f, 0xed, 0x54, 0xaa, 0x72, 0x3e, 0x60, 0xd6, 0xfd, 0x8b, 0xf2, 0xb8, 0x37, 0x45, - 0x65, 0x73, 0x77, 0x43, 0x2e, 0xa0, 0x49, 0x18, 0x67, 0x53, 0x08, 0x23, 0x26, 0x42, 0xa2, 0xf3, - 0x67, 0x65, 0xb9, 0x6b, 0x08, 0x63, 0x99, 0x0c, 0x08, 0xce, 0x9f, 0x95, 0xd1, 0xdc, 0x32, 0xa4, - 0x69, 0x74, 0x21, 0x04, 0x85, 0xf5, 0xf2, 0x52, 0x65, 0x5d, 0xdd, 0xda, 0xde, 0x59, 0xdb, 0xda, - 0x2c, 0xaf, 0xcb, 0x52, 0x57, 0xa6, 0x54, 0x3e, 0xb7, 0xbb, 0xa6, 0x54, 0x56, 0xe4, 0x84, 0x5f, - 0xb6, 0x5d, 0x29, 0xef, 0x54, 0x56, 0xe4, 0xe4, 0x9c, 0x0e, 0xd3, 0x51, 0x79, 0x32, 0x72, 0x67, - 0xf8, 0x96, 0x38, 0xd1, 0x67, 0x89, 0x29, 0x57, 0xcf, 0x12, 0xff, 0x38, 0x01, 0x53, 0x11, 0xb5, - 0x22, 0x72, 0x92, 0x47, 0x20, 0xcd, 0x42, 0x94, 0x55, 0xcf, 0x3b, 0x23, 0x8b, 0x0e, 0x0d, 0xd8, - 0x9e, 0x0a, 0x4a, 0x71, 0xfe, 0x0e, 0x22, 0xd9, 0xa7, 0x83, 0x20, 0x14, 0x3d, 0x39, 0xfd, 0x99, - 0x9e, 0x9c, 0xce, 0xca, 0xde, 0xf9, 0x61, 0xca, 0x1e, 0x95, 0x1d, 0x2d, 0xb7, 0xa7, 0x23, 0x72, - 0xfb, 0x45, 0x98, 0xec, 0x21, 0x1a, 0x3a, 0xc7, 0xbe, 0x24, 0x41, 0xb1, 0x9f, 0x73, 0x62, 0x32, - 0x5d, 0x22, 0x90, 0xe9, 0x2e, 0x86, 0x3d, 0x78, 0xb2, 0xff, 0x22, 0xf4, 0xac, 0xf5, 0xeb, 0x12, - 0x1c, 0x8b, 0xee, 0x14, 0x23, 0x6d, 0x78, 0x18, 0x46, 0x5b, 0xd8, 0xdd, 0xb7, 0x44, 0xb7, 0x74, - 0x47, 0x44, 0x0d, 0x26, 0xc3, 0xe1, 0xc5, 0xe6, 0x28, 0x7f, 0x11, 0x4f, 0xf6, 0x6b, 0xf7, 0x98, - 0x35, 0x3d, 0x96, 0x7e, 0x21, 0x01, 0x37, 0x44, 0x92, 0x47, 0x1a, 0x7a, 0x0b, 0x80, 0x61, 0xb6, - 0x3b, 0x2e, 0xeb, 0x88, 0x58, 0x82, 0xcd, 0x52, 0x09, 0x4d, 0x5e, 0x24, 0x79, 0x76, 0x5c, 0x6f, - 0x3c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x03, 0x99, 0x85, 0x32, 0x23, 0xee, 0xe1, 0x40, 0x0f, - 0x43, 0x66, 0xcd, 0x74, 0xef, 0x5f, 0x24, 0x7c, 0x2c, 0x06, 0xe7, 0x22, 0xf9, 0x84, 0x12, 0xe3, - 0xf1, 0x30, 0x1c, 0x7f, 0xfe, 0x2c, 0xc1, 0xa7, 0x06, 0xe3, 0xa9, 0x52, 0x17, 0x4f, 0x1f, 0x51, - 0x19, 0xb2, 0x64, 0xcd, 0x99, 0x01, 0xec, 0xff, 0x3d, 0xdc, 0x1a, 0x49, 0xe0, 0x69, 0x31, 0x86, - 0x2e, 0x4a, 0x50, 0x30, 0x1b, 0x46, 0x63, 0x28, 0x7c, 0x46, 0x74, 0x51, 0x84, 0xa2, 0xea, 0x59, - 0x31, 0x36, 0x80, 0xa2, 0x1a, 0xb2, 0xa2, 0xea, 0xb7, 0xa2, 0xea, 0x59, 0x91, 0x89, 0xa1, 0xf0, - 0x5b, 0xe1, 0x3d, 0xa3, 0x15, 0x80, 0x4b, 0xc6, 0x0b, 0xb8, 0xc6, 0xcc, 0xc8, 0x46, 0x24, 0x23, - 0xc1, 0xd1, 0x55, 0x63, 0x24, 0x3e, 0x1c, 0x5a, 0x85, 0x5c, 0xb5, 0xde, 0xa5, 0x01, 0xfe, 0xdf, - 0x3e, 0x22, 0x4d, 0xa9, 0x87, 0x78, 0xfc, 0x48, 0xcf, 0x1c, 0xf6, 0x4a, 0xb9, 0x38, 0x73, 0x7c, - 0xef, 0xe4, 0xc3, 0x75, 0xcd, 0x61, 0x34, 0xf9, 0x58, 0x73, 0x7c, 0x3c, 0x7e, 0x24, 0xba, 0x08, - 0x63, 0x4b, 0x96, 0x45, 0x34, 0x8b, 0xe3, 0x94, 0xe4, 0x64, 0x24, 0x09, 0xd7, 0x61, 0x04, 0x02, - 0x41, 0x57, 0x87, 0x86, 0x3e, 0x81, 0x17, 0x06, 0xad, 0x8e, 0xd0, 0x12, 0xab, 0x23, 0x9e, 0xfd, - 0x3b, 0x70, 0xe9, 0xc0, 0xc5, 0xa4, 0x95, 0x2e, 0x4e, 0x0c, 0xb1, 0x03, 0x85, 0x72, 0x68, 0x07, - 0x0a, 0x31, 0xaa, 0xc2, 0x84, 0x90, 0x55, 0xcc, 0x0e, 0xc9, 0xc1, 0x45, 0x99, 0xff, 0xa6, 0x7b, - 0x10, 0x2d, 0xd7, 0x65, 0xac, 0x61, 0x06, 0xb4, 0x0d, 0x05, 0x21, 0xda, 0x70, 0xe8, 0x4b, 0x4f, - 0x46, 0xd4, 0xd5, 0x30, 0x27, 0x53, 0x65, 0x94, 0x21, 0xfc, 0xcc, 0x0a, 0x1c, 0x8b, 0xce, 0x56, - 0x71, 0xd9, 0x52, 0xf2, 0x67, 0xd9, 0x65, 0xb8, 0x21, 0x32, 0x33, 0xc5, 0x91, 0x24, 0x42, 0x75, - 0x22, 0x90, 0x8e, 0xfc, 0xe0, 0x74, 0x04, 0x38, 0xdd, 0x0b, 0xee, 0x06, 0x99, 0x1f, 0x9c, 0x8c, - 0x00, 0x27, 0xfd, 0xe0, 0xcf, 0x42, 0x21, 0x98, 0x87, 0xfc, 0xe8, 0xf1, 0x08, 0xf4, 0x78, 0x04, - 0x3a, 0x7a, 0xee, 0x54, 0x04, 0x3a, 0x15, 0x42, 0x57, 0xfb, 0xce, 0x3d, 0x19, 0x81, 0x9e, 0x8c, - 0x40, 0x47, 0xcf, 0x8d, 0x22, 0xd0, 0xc8, 0x8f, 0x7e, 0x08, 0x26, 0x42, 0x29, 0xc7, 0x0f, 0x1f, - 0x8b, 0x80, 0x8f, 0x85, 0x6a, 0x73, 0x38, 0xd5, 0xf8, 0xf1, 0x13, 0x11, 0xf8, 0x89, 0xa8, 0xe9, - 0xa3, 0xad, 0x1f, 0x8d, 0x80, 0x8f, 0x46, 0x4e, 0x1f, 0x8d, 0x97, 0x23, 0xf0, 0xb2, 0x1f, 0x5f, - 0x82, 0xbc, 0x3f, 0xab, 0xf8, 0xb1, 0x99, 0x08, 0x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0xe4, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x07, 0xb5, 0xd8, 0x1c, 0x86, 0x47, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *CustomMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) - } - } - if len(this.Ids) != len(that1.Ids) { - return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[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 *CustomMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return false - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return false - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return false - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return false - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return false - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return false - } - } - if len(this.Ids) != len(that1.Ids) { - return false - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 -} -func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 CustomMapFace interface { - Proto() proto.Message - GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 - GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 - GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid - GetIds() map[string]github_com_gogo_protobuf_test.Uuid -} - -func (this *CustomMap) Proto() proto.Message { - return this -} - -func (this *CustomMap) TestProto() proto.Message { - return NewCustomMapFromFace(this) -} - -func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { - return this.Nullable128S -} - -func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { - return this.Uint128S -} - -func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { - return this.NullableIds -} - -func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { - return this.Ids -} - -func NewCustomMapFromFace(that CustomMapFace) *CustomMap { - this := &CustomMap{} - this.Nullable128S = that.GetNullable128S() - this.Uint128S = that.GetUint128S() - this.NullableIds = that.GetNullableIds() - this.Ids = that.GetIds() - return this -} - -type AllMapsFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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 *CustomMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&proto2_maps.CustomMap{") - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - if this.Nullable128S != nil { - s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") - } - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - if this.Uint128S != nil { - s = append(s, "Uint128S: "+mapStringForUint128S+",\n") - } - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - if this.NullableIds != nil { - s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") - } - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) - } - mapStringForIds += "}" - if this.Ids != nil { - s = append(s, "Ids: "+mapStringForIds+",\n") - } - if this.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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.F)))) - i += 8 - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *CustomMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Nullable128S) > 0 { - for k := range m.Nullable128S { - dAtA[i] = 0xa - i++ - v := m.Nullable128S[k] - cSize := 0 - if v != nil { - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - 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 len(m.Uint128S) > 0 { - for k := range m.Uint128S { - dAtA[i] = 0x12 - i++ - v := m.Uint128S[k] - cSize := 0 - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - 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())) - n2, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - } - if len(m.NullableIds) > 0 { - for k := range m.NullableIds { - dAtA[i] = 0x1a - i++ - v := m.NullableIds[k] - cSize := 0 - if v != nil { - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) - n3, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - } - } - if len(m.Ids) > 0 { - for k := range m.Ids { - dAtA[i] = 0x22 - i++ - v := m.Ids[k] - cSize := 0 - cSize = v.Size() - cSize += 1 + sovMapsproto2(uint64(cSize)) - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + cSize - 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())) - n4, err := v.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 *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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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] - byteSize := 0 - if v != nil { - byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - 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] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovMapsproto2(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) - n5, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -func (m *AllMapsOrdered) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) - for k := range m.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) - } - sortkeys.Strings(keysForStringToDoubleMap) - for _, k := range keysForStringToDoubleMap { - dAtA[i] = 0xa - i++ - v := m.StringToDoubleMap[string(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - sortkeys.Strings(keysForStringToFloatMap) - for _, k := range keysForStringToFloatMap { - dAtA[i] = 0x12 - i++ - v := m.StringToFloatMap[string(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - sortkeys.Int32s(keysForInt32Map) - for _, k := range keysForInt32Map { - dAtA[i] = 0x1a - i++ - v := m.Int32Map[int32(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 { - keysForInt64Map := make([]int64, 0, len(m.Int64Map)) - for k := range m.Int64Map { - keysForInt64Map = append(keysForInt64Map, int64(k)) - } - sortkeys.Int64s(keysForInt64Map) - for _, k := range keysForInt64Map { - dAtA[i] = 0x22 - i++ - v := m.Int64Map[int64(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 { - keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) - for k := range m.Uint32Map { - keysForUint32Map = append(keysForUint32Map, uint32(k)) - } - sortkeys.Uint32s(keysForUint32Map) - for _, k := range keysForUint32Map { - dAtA[i] = 0x2a - i++ - v := m.Uint32Map[uint32(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 { - keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) - for k := range m.Uint64Map { - keysForUint64Map = append(keysForUint64Map, uint64(k)) - } - sortkeys.Uint64s(keysForUint64Map) - for _, k := range keysForUint64Map { - dAtA[i] = 0x32 - i++ - v := m.Uint64Map[uint64(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 { - keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) - for k := range m.Sint32Map { - keysForSint32Map = append(keysForSint32Map, int32(k)) - } - sortkeys.Int32s(keysForSint32Map) - for _, k := range keysForSint32Map { - dAtA[i] = 0x3a - i++ - v := m.Sint32Map[int32(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 { - keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) - for k := range m.Sint64Map { - keysForSint64Map = append(keysForSint64Map, int64(k)) - } - sortkeys.Int64s(keysForSint64Map) - for _, k := range keysForSint64Map { - dAtA[i] = 0x42 - i++ - v := m.Sint64Map[int64(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 { - keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) - for k := range m.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, uint32(k)) - } - sortkeys.Uint32s(keysForFixed32Map) - for _, k := range keysForFixed32Map { - dAtA[i] = 0x4a - i++ - v := m.Fixed32Map[uint32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - sortkeys.Int32s(keysForSfixed32Map) - for _, k := range keysForSfixed32Map { - dAtA[i] = 0x52 - i++ - v := m.Sfixed32Map[int32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - sortkeys.Uint64s(keysForFixed64Map) - for _, k := range keysForFixed64Map { - dAtA[i] = 0x5a - i++ - v := m.Fixed64Map[uint64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - sortkeys.Int64s(keysForSfixed64Map) - for _, k := range keysForSfixed64Map { - dAtA[i] = 0x62 - i++ - v := m.Sfixed64Map[int64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - sortkeys.Bools(keysForBoolMap) - for _, k := range keysForBoolMap { - dAtA[i] = 0x6a - i++ - v := m.BoolMap[bool(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 { - keysForStringMap := make([]string, 0, len(m.StringMap)) - for k := range m.StringMap { - keysForStringMap = append(keysForStringMap, string(k)) - } - sortkeys.Strings(keysForStringMap) - for _, k := range keysForStringMap { - dAtA[i] = 0x72 - i++ - v := m.StringMap[string(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 { - keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) - for k := range m.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) - } - sortkeys.Strings(keysForStringToBytesMap) - for _, k := range keysForStringToBytesMap { - dAtA[i] = 0x7a - i++ - v := m.StringToBytesMap[string(k)] - byteSize := 0 - if v != nil { - byteSize = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + byteSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - } - if len(m.StringToEnumMap) > 0 { - keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) - for k := range m.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) - } - sortkeys.Strings(keysForStringToEnumMap) - for _, k := range keysForStringToEnumMap { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToEnumMap[string(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 { - keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) - for k := range m.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) - } - sortkeys.Strings(keysForStringToMsgMap) - for _, k := range keysForStringToMsgMap { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToMsgMap[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovMapsproto2(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + msgSize - i = encodeVarintMapsproto2(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintMapsproto2(dAtA, i, uint64(v.Size())) - n6, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -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 NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { - this := &CustomMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v2; i++ { - this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v3; i++ { - this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v4; i++ { - this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v5; i++ { - this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v6; i++ { - v7 := randStringMapsproto2(r) - this.StringToDoubleMap[v7] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v8; i++ { - v9 := randStringMapsproto2(r) - this.StringToFloatMap[v9] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v10; i++ { - v11 := int32(r.Int31()) - this.Int32Map[v11] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v11] *= -1 - } - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v12; i++ { - v13 := int64(r.Int63()) - this.Int64Map[v13] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v13] *= -1 - } - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v14; i++ { - v15 := uint32(r.Uint32()) - this.Uint32Map[v15] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v16; i++ { - v17 := uint64(uint64(r.Uint32())) - this.Uint64Map[v17] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v18; i++ { - v19 := int32(r.Int31()) - this.Sint32Map[v19] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v19] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v20; i++ { - v21 := int64(r.Int63()) - this.Sint64Map[v21] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v22; i++ { - v23 := uint32(r.Uint32()) - this.Fixed32Map[v23] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v24; i++ { - v25 := int32(r.Int31()) - this.Sfixed32Map[v25] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v26; i++ { - v27 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v28; i++ { - v29 := int64(r.Int63()) - this.Sfixed64Map[v29] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v29] *= -1 - } - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v30; i++ { - v31 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v32; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v33; i++ { - v34 := r.Intn(100) - v35 := randStringMapsproto2(r) - this.StringToBytesMap[v35] = make([]byte, v34) - for i := 0; i < v34; i++ { - this.StringToBytesMap[v35][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v36; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v37; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v38; i++ { - v39 := randStringMapsproto2(r) - this.StringToDoubleMap[v39] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v40; i++ { - v41 := randStringMapsproto2(r) - this.StringToFloatMap[v41] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v42; i++ { - v43 := int32(r.Int31()) - this.Int32Map[v43] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v43] *= -1 - } - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v44; i++ { - v45 := int64(r.Int63()) - this.Int64Map[v45] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v45] *= -1 - } - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v46; i++ { - v47 := uint32(r.Uint32()) - this.Uint32Map[v47] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v48; i++ { - v49 := uint64(uint64(r.Uint32())) - this.Uint64Map[v49] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v50; i++ { - v51 := int32(r.Int31()) - this.Sint32Map[v51] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v51] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v52; i++ { - v53 := int64(r.Int63()) - this.Sint64Map[v53] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v54; i++ { - v55 := uint32(r.Uint32()) - this.Fixed32Map[v55] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v56; i++ { - v57 := int32(r.Int31()) - this.Sfixed32Map[v57] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v58; i++ { - v59 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v60; i++ { - v61 := int64(r.Int63()) - this.Sfixed64Map[v61] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v61] *= -1 - } - } - } - if r.Intn(10) != 0 { - v62 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v62; i++ { - v63 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v64; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v65; i++ { - v66 := r.Intn(100) - v67 := randStringMapsproto2(r) - this.StringToBytesMap[v67] = make([]byte, v66) - for i := 0; i < v66; i++ { - this.StringToBytesMap[v67][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v68; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v69; 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 { - v70 := r.Intn(100) - tmps := make([]rune, v70) - for i := 0; i < v70; 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)) - v71 := r.Int63() - if r.Intn(2) == 0 { - v71 *= -1 - } - dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) - 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 *CustomMap) Size() (n int) { - var l int - _ = l - if len(m.Nullable128S) > 0 { - for k, v := range m.Nullable128S { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint128S) > 0 { - for k, v := range m.Uint128S { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.NullableIds) > 0 { - for k, v := range m.NullableIds { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Ids) > 0 { - for k, v := range m.Ids { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 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 *CustomMap) String() string { - if this == nil { - return "nil" - } - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) - } - mapStringForIds += "}" - s := strings.Join([]string{`&CustomMap{`, - `Nullable128S:` + mapStringForNullable128S + `,`, - `Uint128S:` + mapStringForUint128S + `,`, - `NullableIds:` + mapStringForNullableIds + `,`, - `Ids:` + mapStringForIds + `,`, - `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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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 init() { proto.RegisterFile("combos/marshaler/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 1148 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0x47, - 0x18, 0xc6, 0x19, 0x30, 0x06, 0x86, 0xef, 0x89, 0x5b, 0x21, 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, 0x0a, 0x45, - 0x2f, 0x15, 0xea, 0x7b, 0xa5, 0x50, 0xf4, 0x5a, 0xa1, 0xbe, 0x27, 0xff, 0x52, 0xdf, 0x7f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xec, 0x4e, 0x18, 0x12, 0xf7, 0x16, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto deleted file mode 100644 index dc972a908..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2.proto +++ /dev/null @@ -1,124 +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 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; -} - -message CustomMap { - map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; - map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; - map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; - map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; -} - -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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go deleted file mode 100644 index 488bc86bf..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2_test.go +++ /dev/null @@ -1,104 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 proto2_maps - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go deleted file mode 100644 index e302f3f97..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/marshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,989 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/mapsproto2.proto - -/* -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 - CustomMap - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkCustomMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedCustomMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &CustomMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(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 TestCustomMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestCustomMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomMap(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(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 TestCustomMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go deleted file mode 100644 index f57f77da9..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.pb.go +++ /dev/null @@ -1,3588 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/mapsproto2.proto - -/* -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 - CustomMap - AllMaps - AllMapsOrdered -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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 -} -func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -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() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -type CustomMap struct { - Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomMap) Reset() { *m = CustomMap{} } -func (*CustomMap) ProtoMessage() {} -func (*CustomMap) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } - -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 (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{3} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *CustomMap) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4690 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xd6, 0xf0, 0x21, 0x91, 0x87, 0x14, 0x35, 0xba, 0x92, 0xd7, 0xb4, 0x1c, 0x4b, 0xbb, 0xf2, - 0x63, 0xe5, 0xb5, 0x2d, 0xd9, 0xf2, 0xee, 0x7a, 0xcd, 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82, 0x27, - 0x50, 0x69, 0x58, 0x01, 0xcd, 0x42, 0x79, 0x21, 0xdc, 0xd4, 0x9a, 0x78, 0xea, 0x45, 0x28, 0x04, - 0xdd, 0x83, 0x26, 0x21, 0xed, 0xb8, 0x9a, 0xed, 0xd2, 0x28, 0x4c, 0x2b, 0xec, 0x01, 0xc9, 0x90, - 0xc4, 0x66, 0x8d, 0x66, 0xb9, 0xb4, 0x42, 0xfe, 0x44, 0x3f, 0xd3, 0x79, 0xe1, 0x24, 0x7d, 0xe1, - 0x3b, 0xba, 0x57, 0x34, 0xc0, 0x1c, 0x7e, 0xef, 0xa9, 0x07, 0x60, 0x34, 0xf0, 0x02, 0x83, 0x4e, - 0x3d, 0xfb, 0x73, 0x70, 0x43, 0x24, 0x35, 0x7a, 0x12, 0x26, 0xdb, 0xa6, 0x61, 0xba, 0xd8, 0x6e, - 0xd9, 0x98, 0x44, 0x2c, 0x9b, 0xaa, 0xf8, 0x2f, 0x23, 0x3d, 0x62, 0x6e, 0xd7, 0xaf, 0xcd, 0x58, - 0x94, 0x89, 0x76, 0xb7, 0xf0, 0x4c, 0x36, 0xf3, 0xce, 0x88, 0x7c, 0xed, 0xda, 0xb5, 0x6b, 0x89, - 0xd9, 0x97, 0x87, 0x61, 0x32, 0x6a, 0xcf, 0x44, 0x6e, 0xdf, 0x13, 0x30, 0x6c, 0xb6, 0x9b, 0x7b, - 0xd8, 0xa6, 0x4e, 0x4a, 0x2b, 0xfc, 0x09, 0x95, 0x21, 0xdd, 0xd0, 0xf6, 0x70, 0xa3, 0x98, 0x3a, - 0x29, 0xcd, 0x15, 0x16, 0xef, 0x1a, 0x68, 0x57, 0xce, 0xaf, 0x13, 0x88, 0xc2, 0x90, 0xe8, 0x61, - 0x48, 0xf1, 0x14, 0x4d, 0x18, 0xce, 0x0c, 0xc6, 0x40, 0xf6, 0x92, 0x42, 0x71, 0xe8, 0x66, 0xc8, - 0x92, 0x7f, 0x59, 0x6c, 0x0c, 0x53, 0x9b, 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45, 0xce, 0x79, - 0x1a, 0x4b, 0x4f, 0xed, 0x54, 0xaa, 0x72, 0x3e, 0x60, 0xd6, 0xfd, 0x8b, 0xf2, 0xa8, 0x37, 0x45, - 0x65, 0x73, 0x77, 0x43, 0x2e, 0xa0, 0x71, 0x18, 0x65, 0x53, 0x08, 0x23, 0xc6, 0x42, 0xa2, 0xf3, - 0x67, 0x65, 0xb9, 0x63, 0x08, 0x63, 0x19, 0x0f, 0x08, 0xce, 0x9f, 0x95, 0xd1, 0xec, 0x32, 0xa4, - 0x69, 0x74, 0x21, 0x04, 0x85, 0xf5, 0xf2, 0x52, 0x65, 0x5d, 0xdd, 0xda, 0xde, 0x59, 0xdb, 0xda, - 0x2c, 0xaf, 0xcb, 0x52, 0x47, 0xa6, 0x54, 0x3e, 0xb7, 0xbb, 0xa6, 0x54, 0x56, 0xe4, 0x84, 0x5f, - 0xb6, 0x5d, 0x29, 0xef, 0x54, 0x56, 0xe4, 0xe4, 0xac, 0x0e, 0x93, 0x51, 0x79, 0x32, 0x72, 0x67, - 0xf8, 0x96, 0x38, 0xd1, 0x63, 0x89, 0x29, 0x57, 0xd7, 0x12, 0xff, 0x38, 0x01, 0x13, 0x11, 0xb5, - 0x22, 0x72, 0x92, 0x47, 0x20, 0xcd, 0x42, 0x94, 0x55, 0xcf, 0x3b, 0x23, 0x8b, 0x0e, 0x0d, 0xd8, - 0xae, 0x0a, 0x4a, 0x71, 0xfe, 0x0e, 0x22, 0xd9, 0xa3, 0x83, 0x20, 0x14, 0x5d, 0x39, 0xfd, 0x99, - 0xae, 0x9c, 0xce, 0xca, 0xde, 0xf9, 0x41, 0xca, 0x1e, 0x95, 0x1d, 0x2f, 0xb7, 0xa7, 0x23, 0x72, - 0xfb, 0x45, 0x18, 0xef, 0x22, 0x1a, 0x38, 0xc7, 0xbe, 0x24, 0x41, 0xb1, 0x97, 0x73, 0x62, 0x32, - 0x5d, 0x22, 0x90, 0xe9, 0x2e, 0x86, 0x3d, 0x78, 0xaa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xf7, 0x3b, 0x34, - 0xc0, 0xff, 0xd3, 0x47, 0xa4, 0x29, 0xfb, 0x21, 0x1e, 0x3f, 0xd2, 0x33, 0x87, 0xbd, 0x52, 0x2e, - 0xce, 0x1c, 0xdf, 0x3b, 0xf9, 0x70, 0x1d, 0x73, 0x18, 0x4d, 0x3e, 0xd6, 0x1c, 0x1f, 0x8f, 0x1f, - 0x89, 0x2e, 0xc2, 0xc8, 0x92, 0x65, 0x11, 0xcd, 0xe2, 0x28, 0x25, 0x39, 0x15, 0x49, 0xc2, 0x75, - 0x18, 0x81, 0x40, 0xd0, 0xd5, 0xa1, 0xa1, 0x4f, 0xe0, 0x85, 0x7e, 0xab, 0x23, 0xb4, 0xc4, 0xea, - 0x88, 0x67, 0xff, 0x0e, 0x5c, 0x3a, 0x74, 0x31, 0x69, 0xa4, 0x8b, 0x63, 0x03, 0xec, 0x40, 0xa1, - 0x1c, 0xda, 0x81, 0x42, 0x8c, 0xaa, 0x30, 0x26, 0x64, 0x15, 0xb3, 0x4d, 0x72, 0x70, 0x51, 0xe6, - 0xbf, 0xe8, 0xee, 0x47, 0xcb, 0x75, 0x19, 0x6b, 0x98, 0x01, 0x6d, 0x43, 0x41, 0x88, 0x36, 0x1c, - 0xfa, 0xd2, 0xe3, 0x11, 0x75, 0x35, 0xcc, 0xc9, 0x54, 0x19, 0x65, 0x08, 0x3f, 0xb5, 0x02, 0x27, - 0xa2, 0xb3, 0x55, 0x5c, 0xb6, 0x94, 0xfc, 0x59, 0x76, 0x19, 0x6e, 0x88, 0xcc, 0x4c, 0x71, 0x24, - 0x89, 0x50, 0x9d, 0x08, 0xa4, 0x23, 0x3f, 0x38, 0x1d, 0x01, 0x4e, 0x77, 0x83, 0x3b, 0x41, 0xe6, - 0x07, 0x27, 0x23, 0xc0, 0x49, 0x3f, 0xf8, 0xb3, 0x50, 0x08, 0xe6, 0x21, 0x3f, 0x7a, 0x34, 0x02, - 0x3d, 0x1a, 0x81, 0x8e, 0x9e, 0x3b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a1, 0xb7, 0xae, 0x4f, 0x4b, 0xef, 0x5c, 0x9f, 0x96, 0xde, 0xbb, 0x3e, 0x2d, 0x7d, 0x70, 0x7d, - 0x5a, 0xba, 0x76, 0x34, 0x2d, 0x7d, 0xf5, 0x68, 0x5a, 0xfa, 0xfa, 0xd1, 0xb4, 0xf4, 0xed, 0xa3, - 0x69, 0xe9, 0x3b, 0x47, 0xd3, 0xd2, 0x1b, 0x47, 0xd3, 0x43, 0xdf, 0x3b, 0x9a, 0x1e, 0x7a, 0xeb, - 0x68, 0x5a, 0x7a, 0xe7, 0x68, 0x7a, 0xe8, 0xbd, 0xa3, 0x69, 0xe9, 0x83, 0xa3, 0xe9, 0xa1, 0x6b, - 0x3f, 0x9e, 0x1e, 0xfa, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x25, 0x90, 0x39, 0x84, 0x47, - 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *CustomMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) - } - } - if len(this.Ids) != len(that1.Ids) { - return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[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 *CustomMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return false - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return false - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return false - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return false - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return false - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return false - } - } - if len(this.Ids) != len(that1.Ids) { - return false - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 -} -func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 CustomMapFace interface { - Proto() proto.Message - GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 - GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 - GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid - GetIds() map[string]github_com_gogo_protobuf_test.Uuid -} - -func (this *CustomMap) Proto() proto.Message { - return this -} - -func (this *CustomMap) TestProto() proto.Message { - return NewCustomMapFromFace(this) -} - -func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { - return this.Nullable128S -} - -func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { - return this.Uint128S -} - -func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { - return this.NullableIds -} - -func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { - return this.Ids -} - -func NewCustomMapFromFace(that CustomMapFace) *CustomMap { - this := &CustomMap{} - this.Nullable128S = that.GetNullable128S() - this.Uint128S = that.GetUint128S() - this.NullableIds = that.GetNullableIds() - this.Ids = that.GetIds() - return this -} - -type AllMapsFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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 *CustomMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&proto2_maps.CustomMap{") - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - if this.Nullable128S != nil { - s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") - } - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - if this.Uint128S != nil { - s = append(s, "Uint128S: "+mapStringForUint128S+",\n") - } - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - if this.NullableIds != nil { - s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") - } - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) - } - mapStringForIds += "}" - if this.Ids != nil { - s = append(s, "Ids: "+mapStringForIds+",\n") - } - if this.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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 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 NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { - this := &CustomMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v2; i++ { - this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v3; i++ { - this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v4; i++ { - this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v5; i++ { - this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v6; i++ { - v7 := randStringMapsproto2(r) - this.StringToDoubleMap[v7] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v8; i++ { - v9 := randStringMapsproto2(r) - this.StringToFloatMap[v9] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v10; i++ { - v11 := int32(r.Int31()) - this.Int32Map[v11] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v11] *= -1 - } - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v12; i++ { - v13 := int64(r.Int63()) - this.Int64Map[v13] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v13] *= -1 - } - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v14; i++ { - v15 := uint32(r.Uint32()) - this.Uint32Map[v15] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v16; i++ { - v17 := uint64(uint64(r.Uint32())) - this.Uint64Map[v17] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v18; i++ { - v19 := int32(r.Int31()) - this.Sint32Map[v19] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v19] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v20; i++ { - v21 := int64(r.Int63()) - this.Sint64Map[v21] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v22; i++ { - v23 := uint32(r.Uint32()) - this.Fixed32Map[v23] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v24; i++ { - v25 := int32(r.Int31()) - this.Sfixed32Map[v25] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v26; i++ { - v27 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v28; i++ { - v29 := int64(r.Int63()) - this.Sfixed64Map[v29] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v29] *= -1 - } - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v30; i++ { - v31 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v32; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v33; i++ { - v34 := r.Intn(100) - v35 := randStringMapsproto2(r) - this.StringToBytesMap[v35] = make([]byte, v34) - for i := 0; i < v34; i++ { - this.StringToBytesMap[v35][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v36; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v37; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v38; i++ { - v39 := randStringMapsproto2(r) - this.StringToDoubleMap[v39] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v40; i++ { - v41 := randStringMapsproto2(r) - this.StringToFloatMap[v41] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v42; i++ { - v43 := int32(r.Int31()) - this.Int32Map[v43] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v43] *= -1 - } - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v44; i++ { - v45 := int64(r.Int63()) - this.Int64Map[v45] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v45] *= -1 - } - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v46; i++ { - v47 := uint32(r.Uint32()) - this.Uint32Map[v47] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v48; i++ { - v49 := uint64(uint64(r.Uint32())) - this.Uint64Map[v49] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v50; i++ { - v51 := int32(r.Int31()) - this.Sint32Map[v51] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v51] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v52; i++ { - v53 := int64(r.Int63()) - this.Sint64Map[v53] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v54; i++ { - v55 := uint32(r.Uint32()) - this.Fixed32Map[v55] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v56; i++ { - v57 := int32(r.Int31()) - this.Sfixed32Map[v57] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v58; i++ { - v59 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v60; i++ { - v61 := int64(r.Int63()) - this.Sfixed64Map[v61] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v61] *= -1 - } - } - } - if r.Intn(10) != 0 { - v62 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v62; i++ { - v63 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v64; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v65; i++ { - v66 := r.Intn(100) - v67 := randStringMapsproto2(r) - this.StringToBytesMap[v67] = make([]byte, v66) - for i := 0; i < v66; i++ { - this.StringToBytesMap[v67][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v68; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v69; 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 { - v70 := r.Intn(100) - tmps := make([]rune, v70) - for i := 0; i < v70; 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)) - v71 := r.Int63() - if r.Intn(2) == 0 { - v71 *= -1 - } - dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) - 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 *CustomMap) Size() (n int) { - var l int - _ = l - if len(m.Nullable128S) > 0 { - for k, v := range m.Nullable128S { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint128S) > 0 { - for k, v := range m.Uint128S { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.NullableIds) > 0 { - for k, v := range m.NullableIds { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Ids) > 0 { - for k, v := range m.Ids { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 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 *CustomMap) String() string { - if this == nil { - return "nil" - } - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) - } - mapStringForIds += "}" - s := strings.Join([]string{`&CustomMap{`, - `Nullable128S:` + mapStringForNullable128S + `,`, - `Uint128S:` + mapStringForUint128S + `,`, - `NullableIds:` + mapStringForNullableIds + `,`, - `Ids:` + mapStringForIds + `,`, - `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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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 init() { proto.RegisterFile("combos/neither/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 1148 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0xc7, - 0x1b, 0xc7, 0x77, 0xc0, 0x36, 0x30, 0xbc, 0x4f, 0xfc, 0xfb, 0x09, 0x21, 0x75, 0x70, 0xe8, 0x1b, - 0x21, 0x29, 0xd8, 0x34, 0x8a, 0x2c, 0xa7, 0x4d, 0x65, 0x6c, 0xa7, 0x58, 0x29, 0x6e, 0x04, 0x4d, - 0xdf, 0x24, 0x4b, 0x05, 0xb3, 0x10, 0x54, 0x60, 0x29, 0xbb, 0x44, 0xf5, 0xa5, 0xca, 0x9f, 0xd1, - 0x6b, 0x6f, 0x3d, 0xf6, 0xd8, 0x63, 0x8f, 0x96, 0x7a, 0xc9, 0x31, 0x8a, 0x2a, 0x2b, 0x6c, 0x2f, - 0x39, 0xe6, 0x98, 0x63, 0xb5, 0xb3, 0xbb, 0x30, 0xbb, 0xfb, 0xec, 0x2e, 0xf4, 0xd4, 0x83, 0x4f, - 0x78, 0x96, 0xe7, 0xfb, 0xf9, 0x3e, 0xbb, 0x3b, 0xf3, 0xf0, 0x35, 0xce, 0x9d, 0x49, 0xc3, 0xb6, - 0x24, 0x97, 0x47, 0x62, 0x5f, 0x79, 0x2c, 0x4e, 0xca, 0xc3, 0xd6, 0x58, 0x1e, 0x4f, 0x24, 0x45, - 0xaa, 0x94, 0xd8, 0x07, 0x89, 0x1a, 0x2b, 0xed, 0x8b, 0xec, 0x07, 0xbd, 0xbe, 0xf2, 0x78, 0xda, - 0x2e, 0x9d, 0x49, 0xc3, 0x72, 0x4f, 0xea, 0x49, 0x65, 0xf6, 0x65, 0x7b, 0xda, 0x65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0xcf, 0x83, 0x54, 0xa0, 0xfa, 0xd9, - 0xc5, 0x8c, 0x0a, 0xcf, 0x66, 0x54, 0x78, 0x3e, 0xa3, 0xc2, 0xcb, 0x19, 0x45, 0xaf, 0x66, 0x14, - 0xbd, 0x9e, 0x51, 0xf4, 0x66, 0x46, 0xd1, 0x53, 0x95, 0xa2, 0x5f, 0x55, 0x8a, 0x7e, 0x53, 0x29, - 0xfa, 0x5d, 0xa5, 0xe8, 0x0f, 0x95, 0xa2, 0x0b, 0x95, 0x0a, 0xcf, 0x54, 0x2a, 0xbc, 0x54, 0x29, - 0x7a, 0xa5, 0x52, 0xe1, 0xb5, 0x4a, 0xd1, 0x1b, 0x95, 0x0a, 0x4f, 0xff, 0xa6, 0xc2, 0x3f, 0x01, - 0x00, 0x00, 0xff, 0xff, 0x3c, 0x2b, 0x76, 0x8f, 0xf5, 0x16, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto deleted file mode 100644 index 39de58312..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2.proto +++ /dev/null @@ -1,124 +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 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; -} - -message CustomMap { - map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; - map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; - map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; - map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; -} - -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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go deleted file mode 100644 index 488bc86bf..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2_test.go +++ /dev/null @@ -1,104 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 proto2_maps - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go deleted file mode 100644 index fc7b78285..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/neither/mapsproto2pb_test.go +++ /dev/null @@ -1,877 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/mapsproto2.proto - -/* -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 - CustomMap - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedCustomMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &CustomMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(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 TestCustomMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestCustomMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomMap(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(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 TestCustomMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go deleted file mode 100644 index 7e960c438..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.pb.go +++ /dev/null @@ -1,7728 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/mapsproto2.proto - -/* - 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 - CustomMap - AllMaps - AllMapsOrdered -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" -import github_com_gogo_protobuf_test "github.com/gogo/protobuf/test" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import binary "encoding/binary" - -// 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 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 -} -func (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -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() {} -func (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{0} } - -type CustomMap struct { - Nullable128S map[string]*github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,rep,name=Nullable128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Nullable128s,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Uint128S map[string]github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,rep,name=Uint128s,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"Uint128s" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - NullableIds map[string]*github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,3,rep,name=NullableIds,customtype=github.com/gogo/protobuf/test.Uuid" json:"NullableIds,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Ids map[string]github_com_gogo_protobuf_test.Uuid `protobuf:"bytes,4,rep,name=Ids,customtype=github.com/gogo/protobuf/test.Uuid" json:"Ids" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *CustomMap) Reset() { *m = CustomMap{} } -func (*CustomMap) ProtoMessage() {} -func (*CustomMap) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{1} } - -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 (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorMapsproto2, []int{3} } - -func init() { - proto.RegisterType((*FloatingPoint)(nil), "proto2.maps.FloatingPoint") - proto.RegisterType((*CustomMap)(nil), "proto2.maps.CustomMap") - proto.RegisterType((*AllMaps)(nil), "proto2.maps.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "proto2.maps.AllMapsOrdered") - proto.RegisterEnum("proto2.maps.MapEnum", MapEnum_name, MapEnum_value) -} -func (this *FloatingPoint) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *CustomMap) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMaps) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func (this *AllMapsOrdered) Description() (desc *descriptor.FileDescriptorSet) { - return Mapsproto2Description() -} -func Mapsproto2Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4687 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5b, 0x6b, 0x6c, 0x23, 0xd7, - 0x75, 0xd6, 0xf0, 0x21, 0x91, 0x87, 0x14, 0x35, 0xba, 0x92, 0xd7, 0xb4, 0x1c, 0x6b, 0x77, 0xe5, - 0xc7, 0xca, 0x6b, 0x5b, 0x6b, 0xcb, 0xbb, 0xeb, 0x35, 0x37, 0xb6, 0x4b, 0x49, 0x5c, 0xad, 0x6c, - 0xbd, 0x32, 0x94, 0xfc, 0x0a, 0x8c, 0xe9, 0x68, 0x78, 0x49, 0x8d, 0x97, 0x9c, 0xa1, 0x67, 0x86, - 0x6b, 0xcb, 0x28, 0x8a, 0x2d, 0xdc, 0x07, 0x82, 0xa2, 0xef, 0x02, 0x71, 0x5c, 0xc7, 0x6d, 0x0a, - 0xb4, 0x4e, 0xd3, 0x57, 0xd2, 0xb4, 0x69, 0xda, 0x5f, 0xf9, 0x93, 0xd6, 0x40, 0x81, 0x22, 0xf9, - 0x17, 0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4f, 0xc1, 0xc4, 0xf3, 0x58, 0xbb, 0xe2, 0x57, - 0xcd, 0x51, 0xd5, 0x02, 0x11, 0xfb, 0x14, 0x97, 0x21, 0xdf, 0xc2, 0x8e, 0xa3, 0x35, 0xb0, 0xea, - 0x1e, 0xb4, 0x71, 0x31, 0x45, 0xdf, 0xfe, 0x44, 0xcf, 0xdb, 0x87, 0xdf, 0x3c, 0xc7, 0x51, 0x3b, - 0x07, 0x6d, 0x8c, 0xca, 0x90, 0xc5, 0x66, 0xa7, 0xc5, 0x18, 0xd2, 0x7d, 0xfc, 0x57, 0x31, 0x3b, - 0xad, 0x30, 0x4b, 0x86, 0xc0, 0x38, 0xc5, 0x98, 0x83, 0xed, 0xab, 0x86, 0x8e, 0x8b, 0xa3, 0x94, - 0xe0, 0x54, 0x0f, 0x41, 0x95, 0x8d, 0x87, 0x39, 0x04, 0x0e, 0x2d, 0x43, 0x16, 0xbf, 0xe0, 0x62, - 0xd3, 0x31, 0x2c, 0xb3, 0x38, 0x46, 0x49, 0x6e, 0x8f, 0x58, 0x45, 0xdc, 0xac, 0x85, 0x29, 0xba, - 0x38, 0x74, 0x1e, 0xc6, 0xac, 0xb6, 0x6b, 0x58, 0xa6, 0x53, 0xcc, 0x9c, 0x90, 0xe6, 0x73, 0x8b, - 0x9f, 0x89, 0x0c, 0x84, 0x2d, 0xa6, 0xa3, 0x08, 0x65, 0xb4, 0x06, 0xb2, 0x63, 0x75, 0x6c, 0x1d, - 0xab, 0xba, 0x55, 0xc3, 0xaa, 0x61, 0xd6, 0xad, 0x62, 0x96, 0x12, 0x1c, 0xef, 0x7d, 0x11, 0xaa, - 0xb8, 0x6c, 0xd5, 0xf0, 0x9a, 0x59, 0xb7, 0x94, 0x82, 0x13, 0x78, 0x46, 0xc7, 0x60, 0xd4, 0x39, - 0x30, 0x5d, 0xed, 0x85, 0x62, 0x9e, 0x46, 0x08, 0x7f, 0x9a, 0xfb, 0xbb, 0x51, 0x98, 0x18, 0x26, - 0xc4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9, - 0x9f, 0x75, 0x2c, 0x53, 0x84, 0x26, 0x9d, 0x82, 0x08, 0xe8, 0xf4, 0x0f, 0x84, 0x13, 0xf7, 0x2d, - 0xd1, 0xaf, 0x17, 0x8e, 0xa9, 0xb9, 0x6f, 0x25, 0x20, 0x45, 0xf3, 0xc5, 0x04, 0xe4, 0x76, 0x9e, - 0xda, 0xae, 0xa8, 0x2b, 0x5b, 0xbb, 0x4b, 0xeb, 0x15, 0x59, 0x42, 0x05, 0x00, 0x2a, 0xb8, 0xb4, - 0xbe, 0x55, 0xde, 0x91, 0x13, 0xde, 0xf3, 0xda, 0xe6, 0xce, 0xf9, 0xb3, 0x72, 0xd2, 0x03, 0xec, - 0x32, 0x41, 0xca, 0xaf, 0x70, 0xff, 0xa2, 0x9c, 0x46, 0x32, 0xe4, 0x19, 0xc1, 0xda, 0x93, 0x95, - 0x95, 0xf3, 0x67, 0xe5, 0xd1, 0xa0, 0xe4, 0xfe, 0x45, 0x79, 0x0c, 0x8d, 0x43, 0x96, 0x4a, 0x96, - 0xb6, 0xb6, 0xd6, 0xe5, 0x8c, 0xc7, 0x59, 0xdd, 0x51, 0xd6, 0x36, 0x57, 0xe5, 0xac, 0xc7, 0xb9, - 0xaa, 0x6c, 0xed, 0x6e, 0xcb, 0xe0, 0x31, 0x6c, 0x54, 0xaa, 0xd5, 0xf2, 0x6a, 0x45, 0xce, 0x79, - 0x1a, 0x4b, 0x4f, 0xed, 0x54, 0xaa, 0x72, 0x3e, 0x60, 0xd6, 0xfd, 0x8b, 0xf2, 0xb8, 0x37, 0x45, - 0x65, 0x73, 0x77, 0x43, 0x2e, 0xa0, 0x49, 0x18, 0x67, 0x53, 0x08, 0x23, 0x26, 0x42, 0xa2, 0xf3, - 0x67, 0x65, 0xb9, 0x6b, 0x08, 0x63, 0x99, 0x0c, 0x08, 0xce, 0x9f, 0x95, 0xd1, 0xdc, 0x32, 0xa4, - 0x69, 0x74, 0x21, 0x04, 0x85, 0xf5, 0xf2, 0x52, 0x65, 0x5d, 0xdd, 0xda, 0xde, 0x59, 0xdb, 0xda, - 0x2c, 0xaf, 0xcb, 0x52, 0x57, 0xa6, 0x54, 0x3e, 0xb7, 0xbb, 0xa6, 0x54, 0x56, 0xe4, 0x84, 0x5f, - 0xb6, 0x5d, 0x29, 0xef, 0x54, 0x56, 0xe4, 0xe4, 0x9c, 0x0e, 0xd3, 0x51, 0x79, 0x32, 0x72, 0x67, - 0xf8, 0x96, 0x38, 0xd1, 0x67, 0x89, 0x29, 0x57, 0xcf, 0x12, 0xff, 0x38, 0x01, 0x53, 0x11, 0xb5, - 0x22, 0x72, 0x92, 0x47, 0x20, 0xcd, 0x42, 0x94, 0x55, 0xcf, 0x3b, 0x23, 0x8b, 0x0e, 0x0d, 0xd8, - 0x9e, 0x0a, 0x4a, 0x71, 0xfe, 0x0e, 0x22, 0xd9, 0xa7, 0x83, 0x20, 0x14, 0x3d, 0x39, 0xfd, 0x99, - 0x9e, 0x9c, 0xce, 0xca, 0xde, 0xf9, 0x61, 0xca, 0x1e, 0x95, 0x1d, 0x2d, 0xb7, 0xa7, 0x23, 0x72, - 0xfb, 0x45, 0x98, 0xec, 0x21, 0x1a, 0x3a, 0xc7, 0xbe, 0x24, 0x41, 0xb1, 0x9f, 0x73, 0x62, 0x32, - 0x5d, 0x22, 0x90, 0xe9, 0x2e, 0x86, 0x3d, 0x78, 0xb2, 0xff, 0x22, 0xf4, 0xac, 0xf5, 0xeb, 0x12, - 0x1c, 0x8b, 0xee, 0x14, 0x23, 0x6d, 0x78, 0x18, 0x46, 0x5b, 0xd8, 0xdd, 0xb7, 0x44, 0xb7, 0x74, - 0x47, 0x44, 0x0d, 0x26, 0xc3, 0xe1, 0xc5, 0xe6, 0x28, 0x7f, 0x11, 0x4f, 0xf6, 0x6b, 0xf7, 0x98, - 0x35, 0x3d, 0x96, 0x7e, 0x21, 0x01, 0x37, 0x44, 0x92, 0x47, 0x1a, 0x7a, 0x0b, 0x80, 0x61, 0xb6, - 0x3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, 0xb7, 0x0e, 0x67, 0xa5, - 0x77, 0x0e, 0x67, 0x47, 0xde, 0x3b, 0x9c, 0x95, 0x3e, 0x38, 0x9c, 0x1d, 0xb9, 0xf6, 0xe3, 0xd9, - 0x91, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x32, 0x30, 0x68, 0x88, 0x47, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *CustomMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *CustomMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *CustomMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *CustomMap but is not nil && this == nil") - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return fmt.Errorf("Nullable128S this(%v) Not Equal that(%v)", len(this.Nullable128S), len(that1.Nullable128S)) - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return fmt.Errorf("Nullable128S this[%v](%v) Not Equal that[%v](%v)", i, this.Nullable128S[i], i, that1.Nullable128S[i]) - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return fmt.Errorf("Uint128S this(%v) Not Equal that(%v)", len(this.Uint128S), len(that1.Uint128S)) - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return fmt.Errorf("Uint128S this[%v](%v) Not Equal that[%v](%v)", i, this.Uint128S[i], i, that1.Uint128S[i]) - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return fmt.Errorf("NullableIds this(%v) Not Equal that(%v)", len(this.NullableIds), len(that1.NullableIds)) - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return fmt.Errorf("NullableIds this[%v](%v) Not Equal that[%v](%v)", i, this.NullableIds[i], i, that1.NullableIds[i]) - } - } - if len(this.Ids) != len(that1.Ids) { - return fmt.Errorf("Ids this(%v) Not Equal that(%v)", len(this.Ids), len(that1.Ids)) - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - return fmt.Errorf("Ids this[%v](%v) Not Equal that[%v](%v)", i, this.Ids[i], i, that1.Ids[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 *CustomMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*CustomMap) - if !ok { - that2, ok := that.(CustomMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Nullable128S) != len(that1.Nullable128S) { - return false - } - for i := range this.Nullable128S { - if !this.Nullable128S[i].Equal(*that1.Nullable128S[i]) { //nullable - return false - } - } - if len(this.Uint128S) != len(that1.Uint128S) { - return false - } - for i := range this.Uint128S { - if !this.Uint128S[i].Equal(that1.Uint128S[i]) { //not nullable - return false - } - } - if len(this.NullableIds) != len(that1.NullableIds) { - return false - } - for i := range this.NullableIds { - if !this.NullableIds[i].Equal(*that1.NullableIds[i]) { //nullable - return false - } - } - if len(this.Ids) != len(that1.Ids) { - return false - } - for i := range this.Ids { - if !this.Ids[i].Equal(that1.Ids[i]) { //not nullable - 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 -} -func (this *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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() proto.Message - GetF() *float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 CustomMapFace interface { - Proto() proto.Message - GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 - GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 - GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid - GetIds() map[string]github_com_gogo_protobuf_test.Uuid -} - -func (this *CustomMap) Proto() proto.Message { - return this -} - -func (this *CustomMap) TestProto() proto.Message { - return NewCustomMapFromFace(this) -} - -func (this *CustomMap) GetNullable128S() map[string]*github_com_gogo_protobuf_test_custom.Uint128 { - return this.Nullable128S -} - -func (this *CustomMap) GetUint128S() map[string]github_com_gogo_protobuf_test_custom.Uint128 { - return this.Uint128S -} - -func (this *CustomMap) GetNullableIds() map[string]*github_com_gogo_protobuf_test.Uuid { - return this.NullableIds -} - -func (this *CustomMap) GetIds() map[string]github_com_gogo_protobuf_test.Uuid { - return this.Ids -} - -func NewCustomMapFromFace(that CustomMapFace) *CustomMap { - this := &CustomMap{} - this.Nullable128S = that.GetNullable128S() - this.Uint128S = that.GetUint128S() - this.NullableIds = that.GetNullableIds() - this.Ids = that.GetIds() - return this -} - -type AllMapsFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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 *CustomMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&proto2_maps.CustomMap{") - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%#v: %#v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - if this.Nullable128S != nil { - s = append(s, "Nullable128S: "+mapStringForNullable128S+",\n") - } - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%#v: %#v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - if this.Uint128S != nil { - s = append(s, "Uint128S: "+mapStringForUint128S+",\n") - } - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%#v: %#v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - if this.NullableIds != nil { - s = append(s, "NullableIds: "+mapStringForNullableIds+",\n") - } - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%#v: %#v,", k, this.Ids[k]) - } - mapStringForIds += "}" - if this.Ids != nil { - s = append(s, "Ids: "+mapStringForIds+",\n") - } - if this.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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&proto2_maps.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 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 NewPopulatedCustomMap(r randyMapsproto2, easy bool) *CustomMap { - this := &CustomMap{} - if r.Intn(10) != 0 { - v2 := r.Intn(10) - this.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v2; i++ { - this.Nullable128S[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test_custom.Uint128)(github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v3 := r.Intn(10) - this.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) - for i := 0; i < v3; i++ { - this.Uint128S[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test_custom.Uint128)(*github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r)) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(10) - this.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v4; i++ { - this.NullableIds[randStringMapsproto2(r)] = (*github_com_gogo_protobuf_test.Uuid)(github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(10) - this.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) - for i := 0; i < v5; i++ { - this.Ids[randStringMapsproto2(r)] = (github_com_gogo_protobuf_test.Uuid)(*github_com_gogo_protobuf_test.NewPopulatedUuid(r)) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 5) - } - return this -} - -func NewPopulatedAllMaps(r randyMapsproto2, easy bool) *AllMaps { - this := &AllMaps{} - if r.Intn(10) != 0 { - v6 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v6; i++ { - v7 := randStringMapsproto2(r) - this.StringToDoubleMap[v7] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v7] *= -1 - } - } - } - if r.Intn(10) != 0 { - v8 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v8; i++ { - v9 := randStringMapsproto2(r) - this.StringToFloatMap[v9] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v9] *= -1 - } - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v10; i++ { - v11 := int32(r.Int31()) - this.Int32Map[v11] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v11] *= -1 - } - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v12; i++ { - v13 := int64(r.Int63()) - this.Int64Map[v13] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v13] *= -1 - } - } - } - if r.Intn(10) != 0 { - v14 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v14; i++ { - v15 := uint32(r.Uint32()) - this.Uint32Map[v15] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v16 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v16; i++ { - v17 := uint64(uint64(r.Uint32())) - this.Uint64Map[v17] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v18; i++ { - v19 := int32(r.Int31()) - this.Sint32Map[v19] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v19] *= -1 - } - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v20; i++ { - v21 := int64(r.Int63()) - this.Sint64Map[v21] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v21] *= -1 - } - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v22; i++ { - v23 := uint32(r.Uint32()) - this.Fixed32Map[v23] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v24; i++ { - v25 := int32(r.Int31()) - this.Sfixed32Map[v25] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v25] *= -1 - } - } - } - if r.Intn(10) != 0 { - v26 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v26; i++ { - v27 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v27] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v28 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v28; i++ { - v29 := int64(r.Int63()) - this.Sfixed64Map[v29] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v29] *= -1 - } - } - } - if r.Intn(10) != 0 { - v30 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v30; i++ { - v31 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v31] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v32 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v32; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v33 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v33; i++ { - v34 := r.Intn(100) - v35 := randStringMapsproto2(r) - this.StringToBytesMap[v35] = make([]byte, v34) - for i := 0; i < v34; i++ { - this.StringToBytesMap[v35][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v36 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v36; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v37; i++ { - this.StringToMsgMap[randStringMapsproto2(r)] = NewPopulatedFloatingPoint(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedMapsproto2(r, 18) - } - return this -} - -func NewPopulatedAllMapsOrdered(r randyMapsproto2, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v38 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v38; i++ { - v39 := randStringMapsproto2(r) - this.StringToDoubleMap[v39] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v39] *= -1 - } - } - } - if r.Intn(10) != 0 { - v40 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v40; i++ { - v41 := randStringMapsproto2(r) - this.StringToFloatMap[v41] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v41] *= -1 - } - } - } - if r.Intn(10) != 0 { - v42 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v42; i++ { - v43 := int32(r.Int31()) - this.Int32Map[v43] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v43] *= -1 - } - } - } - if r.Intn(10) != 0 { - v44 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v44; i++ { - v45 := int64(r.Int63()) - this.Int64Map[v45] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v45] *= -1 - } - } - } - if r.Intn(10) != 0 { - v46 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v46; i++ { - v47 := uint32(r.Uint32()) - this.Uint32Map[v47] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v48 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v48; i++ { - v49 := uint64(uint64(r.Uint32())) - this.Uint64Map[v49] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v50 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v50; i++ { - v51 := int32(r.Int31()) - this.Sint32Map[v51] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v51] *= -1 - } - } - } - if r.Intn(10) != 0 { - v52 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v52; i++ { - v53 := int64(r.Int63()) - this.Sint64Map[v53] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v53] *= -1 - } - } - } - if r.Intn(10) != 0 { - v54 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v54; i++ { - v55 := uint32(r.Uint32()) - this.Fixed32Map[v55] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v56 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v56; i++ { - v57 := int32(r.Int31()) - this.Sfixed32Map[v57] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v57] *= -1 - } - } - } - if r.Intn(10) != 0 { - v58 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v58; i++ { - v59 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v59] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v60 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v60; i++ { - v61 := int64(r.Int63()) - this.Sfixed64Map[v61] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v61] *= -1 - } - } - } - if r.Intn(10) != 0 { - v62 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v62; i++ { - v63 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v63] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v64; i++ { - this.StringMap[randStringMapsproto2(r)] = randStringMapsproto2(r) - } - } - if r.Intn(10) != 0 { - v65 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v65; i++ { - v66 := r.Intn(100) - v67 := randStringMapsproto2(r) - this.StringToBytesMap[v67] = make([]byte, v66) - for i := 0; i < v66; i++ { - this.StringToBytesMap[v67][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v68; i++ { - this.StringToEnumMap[randStringMapsproto2(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v69 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v69; 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 { - v70 := r.Intn(100) - tmps := make([]rune, v70) - for i := 0; i < v70; 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)) - v71 := r.Int63() - if r.Intn(2) == 0 { - v71 *= -1 - } - dAtA = encodeVarintPopulateMapsproto2(dAtA, uint64(v71)) - 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 *CustomMap) Size() (n int) { - var l int - _ = l - if len(m.Nullable128S) > 0 { - for k, v := range m.Nullable128S { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Uint128S) > 0 { - for k, v := range m.Uint128S { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.NullableIds) > 0 { - for k, v := range m.NullableIds { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if len(m.Ids) > 0 { - for k, v := range m.Ids { - _ = k - _ = v - l = 0 - l = v.Size() - l += 1 + sovMapsproto2(uint64(l)) - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 1 + sovMapsproto2(uint64(mapEntrySize)) - } - } - 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - n += mapEntrySize + 2 + sovMapsproto2(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if v != nil { - l = 1 + len(v) + sovMapsproto2(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + l - 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() - l += 1 + sovMapsproto2(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovMapsproto2(uint64(len(k))) + 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 *CustomMap) String() string { - if this == nil { - return "nil" - } - keysForNullable128S := make([]string, 0, len(this.Nullable128S)) - for k := range this.Nullable128S { - keysForNullable128S = append(keysForNullable128S, k) - } - sortkeys.Strings(keysForNullable128S) - mapStringForNullable128S := "map[string]*github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForNullable128S { - mapStringForNullable128S += fmt.Sprintf("%v: %v,", k, this.Nullable128S[k]) - } - mapStringForNullable128S += "}" - keysForUint128S := make([]string, 0, len(this.Uint128S)) - for k := range this.Uint128S { - keysForUint128S = append(keysForUint128S, k) - } - sortkeys.Strings(keysForUint128S) - mapStringForUint128S := "map[string]github_com_gogo_protobuf_test_custom.Uint128{" - for _, k := range keysForUint128S { - mapStringForUint128S += fmt.Sprintf("%v: %v,", k, this.Uint128S[k]) - } - mapStringForUint128S += "}" - keysForNullableIds := make([]string, 0, len(this.NullableIds)) - for k := range this.NullableIds { - keysForNullableIds = append(keysForNullableIds, k) - } - sortkeys.Strings(keysForNullableIds) - mapStringForNullableIds := "map[string]*github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForNullableIds { - mapStringForNullableIds += fmt.Sprintf("%v: %v,", k, this.NullableIds[k]) - } - mapStringForNullableIds += "}" - keysForIds := make([]string, 0, len(this.Ids)) - for k := range this.Ids { - keysForIds = append(keysForIds, k) - } - sortkeys.Strings(keysForIds) - mapStringForIds := "map[string]github_com_gogo_protobuf_test.Uuid{" - for _, k := range keysForIds { - mapStringForIds += fmt.Sprintf("%v: %v,", k, this.Ids[k]) - } - mapStringForIds += "}" - s := strings.Join([]string{`&CustomMap{`, - `Nullable128S:` + mapStringForNullable128S + `,`, - `Uint128S:` + mapStringForUint128S + `,`, - `NullableIds:` + mapStringForNullableIds + `,`, - `Ids:` + mapStringForIds + `,`, - `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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 *CustomMap) Unmarshal(dAtA []byte) 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: CustomMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullable128S", 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 - } - if m.Nullable128S == nil { - m.Nullable128S = make(map[string]*github_com_gogo_protobuf_test_custom.Uint128) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Nullable128S[mapkey] = ((*github_com_gogo_protobuf_test_custom.Uint128)(mapvalue)) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Uint128S", 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 - } - if m.Uint128S == nil { - m.Uint128S = make(map[string]github_com_gogo_protobuf_test_custom.Uint128) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test_custom.Uint128 - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Uint128S[mapkey] = ((github_com_gogo_protobuf_test_custom.Uint128)(*mapvalue)) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableIds", 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 - } - if m.NullableIds == nil { - m.NullableIds = make(map[string]*github_com_gogo_protobuf_test.Uuid) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test.Uuid - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableIds[mapkey] = ((*github_com_gogo_protobuf_test.Uuid)(mapvalue)) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ids", 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 - } - if m.Ids == nil { - m.Ids = make(map[string]github_com_gogo_protobuf_test.Uuid) - } - var mapkey string - var mapvalue1 github_com_gogo_protobuf_test.Uuid - var mapvalue = &mapvalue1 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - if err := mapvalue.Unmarshal(dAtA[iNdEx:postbytesIndex]); err != nil { - return err - } - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Ids[mapkey] = ((github_com_gogo_protobuf_test.Uuid)(*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 (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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 (m *AllMapsOrdered) Unmarshal(dAtA []byte) 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: AllMapsOrdered: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMapsOrdered: 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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipMapsproto2(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthMapsproto2 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/mapsproto2.proto", fileDescriptorMapsproto2) } - -var fileDescriptorMapsproto2 = []byte{ - // 1150 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x97, 0xcd, 0x6f, 0x1a, 0x47, - 0x18, 0xc6, 0x19, 0xb0, 0x0d, 0x0c, 0xdf, 0x93, 0xb4, 0x42, 0x48, 0x1d, 0x1c, 0xd2, 0x0f, 0x42, - 0x52, 0xb0, 0x69, 0x14, 0x59, 0x4e, 0x9b, 0xca, 0xd8, 0x4e, 0xb1, 0x52, 0xdc, 0x08, 0x9a, 0x7e, - 0x49, 0x96, 0x0a, 0x66, 0x21, 0xa8, 0xc0, 0x52, 0x76, 0x37, 0xaa, 0x2f, 0x55, 0xfe, 0x8c, 0x5e, - 0x7b, 0xeb, 0xb1, 0xc7, 0x1e, 0x7b, 0xb4, 0xd4, 0x4b, 0x8e, 0x51, 0x54, 0x59, 0x61, 0x7b, 0xc9, - 0x31, 0xc7, 0x1c, 0xab, 0x9d, 0xdd, 0x85, 0xd9, 0xdd, 0x77, 0x77, 0xa1, 0xa7, 0x1e, 0x7c, 0xc2, - 0xb3, 0xbc, 0xcf, 0xef, 0x79, 0x77, 0x77, 0xe6, 0xe5, 0x31, 0xbe, 0x7e, 0x2a, 0x8e, 0x3a, 0xa2, - 0x54, 0x51, 0xc6, 0xa3, 0xf6, 0x54, 0x7a, 0xdc, 0x1e, 0x0a, 0xd3, 0xca, 0xa8, 0x3d, 0x91, 0x26, - 0x53, 0x51, 0x16, 0xab, 0x65, 0xf6, 0x41, 0x62, 0xc6, 0x4a, 0xfb, 0x22, 0xf7, 0x61, 0x7f, 0x20, - 0x3f, 0x56, 0x3a, 0xe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26, 0x1b, 0x38, 0xd8, 0xd8, 0x4b, 0x07, 0xd8, 0x67, 0x2d, 0x8d, 0xd8, 0xe7, 0x7e, 0x3a, 0x58, - 0xfb, 0xfc, 0x7c, 0x46, 0x03, 0xcf, 0x66, 0x34, 0xf0, 0x7c, 0x46, 0x03, 0x2f, 0x67, 0x14, 0xbd, - 0x9a, 0x51, 0xf4, 0x7a, 0x46, 0xd1, 0x9b, 0x19, 0x45, 0x4f, 0x55, 0x8a, 0x7e, 0x53, 0x29, 0xfa, - 0x5d, 0xa5, 0xe8, 0x0f, 0x95, 0xa2, 0x3f, 0x55, 0x8a, 0xce, 0x55, 0x1a, 0x78, 0xa6, 0x52, 0xf4, - 0x52, 0xa5, 0xe8, 0x95, 0x4a, 0x03, 0xaf, 0x55, 0x8a, 0xde, 0xa8, 0x34, 0xf0, 0xf4, 0x1f, 0x1a, - 0xf8, 0x37, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xc4, 0xd5, 0x8e, 0xf9, 0x16, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto deleted file mode 100644 index 27a47d6af..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2.proto +++ /dev/null @@ -1,124 +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 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; -} - -message CustomMap { - map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; - map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; - map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; - map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; -} - -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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go deleted file mode 100644 index 488bc86bf..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2_test.go +++ /dev/null @@ -1,104 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 proto2_maps - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go deleted file mode 100644 index 8e770c030..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/combos/unmarshaler/mapsproto2pb_test.go +++ /dev/null @@ -1,877 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/mapsproto2.proto - -/* -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 - CustomMap - AllMaps - AllMapsOrdered -*/ -package proto2_maps - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestCustomMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedCustomMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkCustomMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedCustomMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &CustomMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestCustomMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestCustomMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestCustomMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(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 TestCustomMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestAllMapsFace(t *testing.T) { - popr := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestCustomMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkCustomMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*CustomMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedCustomMap(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(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 TestCustomMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomMap(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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/github.com/gogo/protobuf/test/mapsproto2/doc.go b/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go deleted file mode 100644 index 4276bac39..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/doc.go +++ /dev/null @@ -1 +0,0 @@ -package mapsproto2 diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto deleted file mode 100644 index 5d87649a6..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/header.proto +++ /dev/null @@ -1,76 +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 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; -} - -message CustomMap { - map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; - map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; - map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; - map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; -} diff --git a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto deleted file mode 100644 index 39de58312..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2.proto +++ /dev/null @@ -1,124 +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 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; -} - -message CustomMap { - map Nullable128s = 1 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128"]; - map Uint128s = 2 [(gogoproto.customtype)="github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable)=false]; - map NullableIds = 3 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid"]; - map Ids = 4 [(gogoproto.customtype)="github.com/gogo/protobuf/test.Uuid", (gogoproto.nullable)=false]; -} - -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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in b/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in deleted file mode 100644 index 5ccc86602..000000000 --- a/vendor/github.com/gogo/protobuf/test/mapsproto2/mapsproto2_test.go.in +++ /dev/null @@ -1,104 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 proto2_maps - -import ( - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": []byte{}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/.gitignore b/vendor/github.com/gogo/protobuf/test/mixbench/.gitignore deleted file mode 100644 index 95341f35b..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/.gitignore +++ /dev/null @@ -1 +0,0 @@ -mixbench \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt deleted file mode 100644 index 58efdca46..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/marshal.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test -BenchmarkNidOptNativeProtoMarshal-8 2000000 831 ns/op 276.72 MB/s -BenchmarkNinOptNativeProtoMarshal-8 2000000 931 ns/op 224.49 MB/s -BenchmarkNidRepNativeProtoMarshal-8 500000 2341 ns/op 349.71 MB/s -BenchmarkNinRepNativeProtoMarshal-8 500000 2500 ns/op 327.56 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-8 500000 3542 ns/op 105.30 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-8 500000 3571 ns/op 104.44 MB/s -BenchmarkNidOptStructProtoMarshal-8 500000 2386 ns/op 354.44 MB/s -BenchmarkNinOptStructProtoMarshal-8 500000 2361 ns/op 324.30 MB/s -BenchmarkNidRepStructProtoMarshal-8 200000 5585 ns/op 317.40 MB/s -BenchmarkNinRepStructProtoMarshal-8 200000 5608 ns/op 316.16 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-8 1000000 1475 ns/op 327.39 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-8 1000000 1465 ns/op 312.60 MB/s -BenchmarkNidNestedStructProtoMarshal-8 100000 14816 ns/op 278.74 MB/s -BenchmarkNinNestedStructProtoMarshal-8 100000 13744 ns/op 283.03 MB/s -BenchmarkNidOptCustomProtoMarshal-8 3000000 539 ns/op 131.63 MB/s -BenchmarkCustomDashProtoMarshal-8 3000000 474 ns/op 172.86 MB/s -BenchmarkNinOptCustomProtoMarshal-8 3000000 578 ns/op 115.81 MB/s -BenchmarkNidRepCustomProtoMarshal-8 1000000 1700 ns/op 107.04 MB/s -BenchmarkNinRepCustomProtoMarshal-8 1000000 1715 ns/op 106.07 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-8 5000000 346 ns/op 46.17 MB/s -BenchmarkNinOptStructUnionProtoMarshal-8 3000000 518 ns/op 121.60 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-8 2000000 785 ns/op 189.70 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-8 2000000 657 ns/op 118.58 MB/s -BenchmarkTreeProtoMarshal-8 3000000 584 ns/op 176.32 MB/s -BenchmarkOrBranchProtoMarshal-8 2000000 997 ns/op 245.52 MB/s -BenchmarkAndBranchProtoMarshal-8 2000000 982 ns/op 249.36 MB/s -BenchmarkLeafProtoMarshal-8 3000000 453 ns/op 213.86 MB/s -BenchmarkDeepTreeProtoMarshal-8 2000000 822 ns/op 176.28 MB/s -BenchmarkADeepBranchProtoMarshal-8 2000000 931 ns/op 196.52 MB/s -BenchmarkAndDeepBranchProtoMarshal-8 1000000 1515 ns/op 219.09 MB/s -BenchmarkDeepLeafProtoMarshal-8 2000000 696 ns/op 200.89 MB/s -BenchmarkNilProtoMarshal-8 10000000 219 ns/op 159.54 MB/s -BenchmarkNidOptEnumProtoMarshal-8 5000000 275 ns/op 134.49 MB/s -BenchmarkNinOptEnumProtoMarshal-8 5000000 314 ns/op 130.50 MB/s -BenchmarkNidRepEnumProtoMarshal-8 3000000 516 ns/op 114.31 MB/s -BenchmarkNinRepEnumProtoMarshal-8 3000000 516 ns/op 114.21 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-8 5000000 308 ns/op 132.80 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-8 5000000 311 ns/op 131.65 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 5000000 312 ns/op 131.11 MB/s -BenchmarkTimerProtoMarshal-8 3000000 503 ns/op 208.34 MB/s -BenchmarkMyExtendableProtoMarshal-8 2000000 689 ns/op 117.49 MB/s -BenchmarkOtherExtenableProtoMarshal-8 1000000 1356 ns/op 116.48 MB/s -BenchmarkNestedDefinitionProtoMarshal-8 2000000 919 ns/op 252.30 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 3000000 566 ns/op 210.03 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 5000000 395 ns/op 207.58 MB/s -BenchmarkNestedScopeProtoMarshal-8 2000000 840 ns/op 265.32 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-8 2000000 932 ns/op 224.11 MB/s -BenchmarkCustomContainerProtoMarshal-8 2000000 680 ns/op 160.07 MB/s -BenchmarkCustomNameNidOptNativeProtoMarshal-8 2000000 844 ns/op 272.51 MB/s -BenchmarkCustomNameNinOptNativeProtoMarshal-8 2000000 915 ns/op 228.30 MB/s -BenchmarkCustomNameNinRepNativeProtoMarshal-8 500000 2346 ns/op 348.99 MB/s -BenchmarkCustomNameNinStructProtoMarshal-8 500000 3010 ns/op 318.50 MB/s -BenchmarkCustomNameCustomTypeProtoMarshal-8 1000000 2003 ns/op 106.79 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 2000000 757 ns/op 196.79 MB/s -BenchmarkCustomNameEnumProtoMarshal-8 5000000 375 ns/op 119.68 MB/s -BenchmarkNoExtensionsMapProtoMarshal-8 3000000 423 ns/op 191.12 MB/s -BenchmarkUnrecognizedProtoMarshal-8 5000000 279 ns/op 160.80 MB/s -BenchmarkUnrecognizedWithInnerProtoMarshal-8 3000000 582 ns/op 161.34 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 10000000 209 ns/op 23.87 MB/s -BenchmarkUnrecognizedWithEmbedProtoMarshal-8 3000000 497 ns/op 178.98 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 10000000 216 ns/op 23.12 MB/s -BenchmarkNodeProtoMarshal-8 3000000 436 ns/op 231.46 MB/s -BenchmarkNonByteCustomTypeProtoMarshal-8 2000000 843 ns/op 93.69 MB/s -BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 2000000 851 ns/op 97.47 MB/s -BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 2000000 857 ns/op 92.15 MB/s -BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 500000 2748 ns/op 83.67 MB/s -BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 500000 2750 ns/op 83.62 MB/s -BenchmarkProtoTypeProtoMarshal-8 5000000 395 ns/op 207.07 MB/s -PASS -ok github.com/gogo/protobuf/test 159.241s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt deleted file mode 100644 index e9674c43e..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/marshaler.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test/combos/both -BenchmarkNidOptNativeProtoMarshal-8 5000000 240 ns/op 955.07 MB/s -BenchmarkNinOptNativeProtoMarshal-8 5000000 277 ns/op 752.54 MB/s -BenchmarkNidRepNativeProtoMarshal-8 1000000 1074 ns/op 762.27 MB/s -BenchmarkNinRepNativeProtoMarshal-8 1000000 1065 ns/op 768.51 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-8 1000000 1033 ns/op 361.05 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-8 1000000 1018 ns/op 366.08 MB/s -BenchmarkNidOptStructProtoMarshal-8 1000000 1024 ns/op 825.83 MB/s -BenchmarkNinOptStructProtoMarshal-8 2000000 974 ns/op 785.66 MB/s -BenchmarkNidRepStructProtoMarshal-8 500000 2593 ns/op 683.64 MB/s -BenchmarkNinRepStructProtoMarshal-8 500000 2443 ns/op 725.73 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-8 3000000 582 ns/op 829.86 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-8 3000000 557 ns/op 821.40 MB/s -BenchmarkNidNestedStructProtoMarshal-8 200000 7862 ns/op 525.28 MB/s -BenchmarkNinNestedStructProtoMarshal-8 200000 6228 ns/op 624.58 MB/s -BenchmarkNidOptCustomProtoMarshal-8 20000000 95.1 ns/op 746.84 MB/s -BenchmarkCustomDashProtoMarshal-8 20000000 92.5 ns/op 886.08 MB/s -BenchmarkNinOptCustomProtoMarshal-8 20000000 96.2 ns/op 696.51 MB/s -BenchmarkNidRepCustomProtoMarshal-8 5000000 258 ns/op 703.59 MB/s -BenchmarkNinRepCustomProtoMarshal-8 5000000 267 ns/op 679.91 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 68.8 ns/op 232.44 MB/s -BenchmarkNinOptStructUnionProtoMarshal-8 10000000 137 ns/op 457.92 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 259 ns/op 573.18 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 212 ns/op 366.72 MB/s -BenchmarkTreeProtoMarshal-8 10000000 154 ns/op 666.39 MB/s -BenchmarkOrBranchProtoMarshal-8 5000000 353 ns/op 692.18 MB/s -BenchmarkAndBranchProtoMarshal-8 5000000 348 ns/op 703.45 MB/s -BenchmarkLeafProtoMarshal-8 20000000 118 ns/op 820.16 MB/s -BenchmarkDeepTreeProtoMarshal-8 5000000 251 ns/op 576.84 MB/s -BenchmarkADeepBranchProtoMarshal-8 5000000 308 ns/op 594.07 MB/s -BenchmarkAndDeepBranchProtoMarshal-8 2000000 604 ns/op 549.21 MB/s -BenchmarkDeepLeafProtoMarshal-8 10000000 213 ns/op 654.76 MB/s -BenchmarkNilProtoMarshal-8 30000000 50.1 ns/op 698.93 MB/s -BenchmarkNidOptEnumProtoMarshal-8 20000000 61.7 ns/op 599.27 MB/s -BenchmarkNinOptEnumProtoMarshal-8 20000000 77.8 ns/op 527.05 MB/s -BenchmarkNidRepEnumProtoMarshal-8 10000000 186 ns/op 316.64 MB/s -BenchmarkNinRepEnumProtoMarshal-8 10000000 183 ns/op 321.59 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 77.9 ns/op 526.44 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 78.9 ns/op 519.95 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 78.6 ns/op 521.58 MB/s -BenchmarkTimerProtoMarshal-8 20000000 103 ns/op 1011.39 MB/s -BenchmarkMyExtendableProtoMarshal-8 3000000 515 ns/op 157.02 MB/s -BenchmarkOtherExtenableProtoMarshal-8 2000000 1000 ns/op 157.91 MB/s -BenchmarkNestedDefinitionProtoMarshal-8 5000000 285 ns/op 811.76 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 142 ns/op 837.36 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 93.3 ns/op 878.69 MB/s -BenchmarkNestedScopeProtoMarshal-8 5000000 260 ns/op 854.95 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 277 ns/op 752.14 MB/s -BenchmarkCustomContainerProtoMarshal-8 10000000 141 ns/op 772.49 MB/s -BenchmarkCustomNameNidOptNativeProtoMarshal-8 5000000 242 ns/op 947.27 MB/s -BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 276 ns/op 754.67 MB/s -BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1043 ns/op 785.18 MB/s -BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1294 ns/op 740.75 MB/s -BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 298 ns/op 715.82 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 255 ns/op 583.23 MB/s -BenchmarkCustomNameEnumProtoMarshal-8 20000000 102 ns/op 441.00 MB/s -BenchmarkNoExtensionsMapProtoMarshal-8 20000000 118 ns/op 684.15 MB/s -BenchmarkUnrecognizedProtoMarshal-8 20000000 66.4 ns/op 677.96 MB/s -BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 168 ns/op 557.06 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 43.4 ns/op 115.08 MB/s -BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 126 ns/op 704.09 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 43.7 ns/op 114.32 MB/s -BenchmarkNodeProtoMarshal-8 10000000 121 ns/op 833.02 MB/s -BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 641.79 MB/s -BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 130 ns/op 633.95 MB/s -BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 124 ns/op 636.74 MB/s -BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 5000000 387 ns/op 592.85 MB/s -BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 5000000 390 ns/op 589.05 MB/s -BenchmarkProtoTypeProtoMarshal-8 20000000 94.1 ns/op 871.54 MB/s -PASS -ok github.com/gogo/protobuf/test/combos/both 139.443s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go b/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go deleted file mode 100644 index 316afa99c..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/mixbench.go +++ /dev/null @@ -1,58 +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 main - -import ( - "fmt" - "io/ioutil" - "os/exec" -) - -func bench(folder, rgx string, outFileName string) { - var test = exec.Command("go", "test", "-test.timeout=20m", "-test.v", "-test.run=XXX", "-test.bench="+rgx, folder) - 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) - } -} - -func main() { - bench("./test/combos/both/", "ProtoMarshal", "./test/mixbench/marshaler.txt") - bench("./test/", "ProtoMarshal", "./test/mixbench/marshal.txt") - bench("./test/combos/both/", "ProtoUnmarshal", "./test/mixbench/unmarshaler.txt") - bench("./test/", "ProtoUnmarshal", "./test/mixbench/unmarshal.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("benchcmp ./test/mixbench/marshal.txt ./test/mixbench/marshaler.txt") - fmt.Println("benchcmp ./test/mixbench/unmarshal.txt ./test/mixbench/unmarshaler.txt") -} diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt deleted file mode 100644 index a0cd56a7b..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/oldmarshaler.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test/combos/both -BenchmarkNidOptNativeProtoMarshal-8 5000000 255 ns/op 898.51 MB/s -BenchmarkNinOptNativeProtoMarshal-8 5000000 292 ns/op 714.19 MB/s -BenchmarkNidRepNativeProtoMarshal-8 1000000 1215 ns/op 673.78 MB/s -BenchmarkNinRepNativeProtoMarshal-8 1000000 1129 ns/op 724.87 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-8 1000000 1070 ns/op 348.30 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-8 1000000 1126 ns/op 331.05 MB/s -BenchmarkNidOptStructProtoMarshal-8 1000000 1090 ns/op 775.47 MB/s -BenchmarkNinOptStructProtoMarshal-8 1000000 1077 ns/op 711.02 MB/s -BenchmarkNidRepStructProtoMarshal-8 500000 2826 ns/op 627.36 MB/s -BenchmarkNinRepStructProtoMarshal-8 500000 2585 ns/op 685.69 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-8 2000000 661 ns/op 729.67 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-8 2000000 612 ns/op 747.51 MB/s -BenchmarkNidNestedStructProtoMarshal-8 200000 8685 ns/op 475.50 MB/s -BenchmarkNinNestedStructProtoMarshal-8 200000 7278 ns/op 534.43 MB/s -BenchmarkNidOptCustomProtoMarshal-8 20000000 99.3 ns/op 715.23 MB/s -BenchmarkCustomDashProtoMarshal-8 20000000 94.7 ns/op 866.23 MB/s -BenchmarkNinOptCustomProtoMarshal-8 20000000 100 ns/op 663.46 MB/s -BenchmarkNidRepCustomProtoMarshal-8 5000000 275 ns/op 661.13 MB/s -BenchmarkNinRepCustomProtoMarshal-8 5000000 274 ns/op 662.53 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 74.9 ns/op 213.63 MB/s -BenchmarkNinOptStructUnionProtoMarshal-8 10000000 150 ns/op 417.38 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 273 ns/op 545.04 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 239 ns/op 325.57 MB/s -BenchmarkTreeProtoMarshal-8 10000000 164 ns/op 627.52 MB/s -BenchmarkOrBranchProtoMarshal-8 5000000 384 ns/op 637.63 MB/s -BenchmarkAndBranchProtoMarshal-8 5000000 386 ns/op 633.51 MB/s -BenchmarkLeafProtoMarshal-8 10000000 123 ns/op 786.11 MB/s -BenchmarkDeepTreeProtoMarshal-8 5000000 258 ns/op 561.33 MB/s -BenchmarkADeepBranchProtoMarshal-8 5000000 327 ns/op 559.19 MB/s -BenchmarkAndDeepBranchProtoMarshal-8 2000000 650 ns/op 510.35 MB/s -BenchmarkDeepLeafProtoMarshal-8 10000000 219 ns/op 638.44 MB/s -BenchmarkNilProtoMarshal-8 30000000 51.0 ns/op 686.29 MB/s -BenchmarkNidOptEnumProtoMarshal-8 20000000 62.5 ns/op 591.74 MB/s -BenchmarkNinOptEnumProtoMarshal-8 20000000 78.7 ns/op 521.09 MB/s -BenchmarkNidRepEnumProtoMarshal-8 10000000 186 ns/op 316.21 MB/s -BenchmarkNinRepEnumProtoMarshal-8 10000000 179 ns/op 328.20 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 81.4 ns/op 503.41 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 85.7 ns/op 478.31 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 83.6 ns/op 490.49 MB/s -BenchmarkTimerProtoMarshal-8 20000000 110 ns/op 952.31 MB/s -BenchmarkMyExtendableProtoMarshal-8 3000000 508 ns/op 159.38 MB/s -BenchmarkOtherExtenableProtoMarshal-8 1000000 1090 ns/op 144.83 MB/s -BenchmarkNestedDefinitionProtoMarshal-8 5000000 302 ns/op 765.71 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 147 ns/op 805.16 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 94.4 ns/op 868.83 MB/s -BenchmarkNestedScopeProtoMarshal-8 5000000 275 ns/op 809.77 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 283 ns/op 737.12 MB/s -BenchmarkCustomContainerProtoMarshal-8 10000000 142 ns/op 765.46 MB/s -BenchmarkCustomNameNidOptNativeProtoMarshal-8 5000000 255 ns/op 900.47 MB/s -BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 284 ns/op 735.53 MB/s -BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1056 ns/op 775.01 MB/s -BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1471 ns/op 651.55 MB/s -BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 304 ns/op 703.60 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 268 ns/op 554.35 MB/s -BenchmarkCustomNameEnumProtoMarshal-8 20000000 103 ns/op 435.03 MB/s -BenchmarkNoExtensionsMapProtoMarshal-8 20000000 115 ns/op 702.08 MB/s -BenchmarkUnrecognizedProtoMarshal-8 20000000 67.0 ns/op 671.64 MB/s -BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 175 ns/op 536.86 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 47.6 ns/op 105.15 MB/s -BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 134 ns/op 659.48 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 47.1 ns/op 106.07 MB/s -BenchmarkNodeProtoMarshal-8 10000000 125 ns/op 804.09 MB/s -BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 131 ns/op 602.08 MB/s -BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 133 ns/op 623.02 MB/s -BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 134 ns/op 588.03 MB/s -BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 3000000 402 ns/op 570.96 MB/s -BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 3000000 394 ns/op 583.29 MB/s -BenchmarkProtoTypeProtoMarshal-8 20000000 94.3 ns/op 869.83 MB/s -PASS -ok github.com/gogo/protobuf/test/combos/both 140.308s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt deleted file mode 100644 index 9ad44dce5..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/oldunmarshaler.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test/combos/both -BenchmarkNidOptNativeProtoUnmarshal-8 3000000 441 ns/op 520.98 MB/s -BenchmarkNinOptNativeProtoUnmarshal-8 2000000 638 ns/op 327.14 MB/s -BenchmarkNidRepNativeProtoUnmarshal-8 500000 2830 ns/op 289.36 MB/s -BenchmarkNinRepNativeProtoUnmarshal-8 500000 2859 ns/op 286.37 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1813 ns/op 205.67 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1793 ns/op 207.96 MB/s -BenchmarkNidOptStructProtoUnmarshal-8 1000000 1876 ns/op 450.92 MB/s -BenchmarkNinOptStructProtoUnmarshal-8 1000000 1992 ns/op 384.38 MB/s -BenchmarkNidRepStructProtoUnmarshal-8 300000 5234 ns/op 338.72 MB/s -BenchmarkNinRepStructProtoUnmarshal-8 300000 5097 ns/op 347.79 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1077 ns/op 448.06 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1088 ns/op 420.67 MB/s -BenchmarkNidNestedStructProtoUnmarshal-8 100000 11850 ns/op 348.52 MB/s -BenchmarkNinNestedStructProtoUnmarshal-8 200000 11242 ns/op 346.02 MB/s -BenchmarkNidOptCustomProtoUnmarshal-8 10000000 196 ns/op 361.07 MB/s -BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 359.22 MB/s -BenchmarkNinOptCustomProtoUnmarshal-8 5000000 243 ns/op 275.11 MB/s -BenchmarkNidRepCustomProtoUnmarshal-8 2000000 811 ns/op 224.17 MB/s -BenchmarkNinRepCustomProtoUnmarshal-8 2000000 812 ns/op 223.94 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 78.0 ns/op 205.18 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 198 ns/op 318.01 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 465 ns/op 320.00 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 329 ns/op 236.72 MB/s -BenchmarkTreeProtoUnmarshal-8 5000000 301 ns/op 341.52 MB/s -BenchmarkOrBranchProtoUnmarshal-8 2000000 788 ns/op 310.72 MB/s -BenchmarkAndBranchProtoUnmarshal-8 2000000 809 ns/op 302.61 MB/s -BenchmarkLeafProtoUnmarshal-8 10000000 226 ns/op 428.13 MB/s -BenchmarkDeepTreeProtoUnmarshal-8 3000000 564 ns/op 256.96 MB/s -BenchmarkADeepBranchProtoUnmarshal-8 2000000 746 ns/op 244.98 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1262 ns/op 263.05 MB/s -BenchmarkDeepLeafProtoUnmarshal-8 3000000 474 ns/op 294.99 MB/s -BenchmarkNilProtoUnmarshal-8 10000000 139 ns/op 251.16 MB/s -BenchmarkNidOptEnumProtoUnmarshal-8 10000000 145 ns/op 254.37 MB/s -BenchmarkNinOptEnumProtoUnmarshal-8 10000000 204 ns/op 200.49 MB/s -BenchmarkNidRepEnumProtoUnmarshal-8 3000000 453 ns/op 130.01 MB/s -BenchmarkNinRepEnumProtoUnmarshal-8 3000000 444 ns/op 132.65 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 199 ns/op 205.24 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 208 ns/op 196.86 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 201 ns/op 203.57 MB/s -BenchmarkTimerProtoUnmarshal-8 10000000 235 ns/op 444.92 MB/s -BenchmarkMyExtendableProtoUnmarshal-8 2000000 649 ns/op 124.62 MB/s -BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1348 ns/op 117.15 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 932 ns/op 248.80 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 431 ns/op 275.75 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 219 ns/op 373.17 MB/s -BenchmarkNestedScopeProtoUnmarshal-8 2000000 907 ns/op 245.63 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 663 ns/op 315.15 MB/s -BenchmarkCustomContainerProtoUnmarshal-8 5000000 350 ns/op 310.78 MB/s -BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 483 ns/op 475.48 MB/s -BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 689 ns/op 303.07 MB/s -BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2845 ns/op 287.79 MB/s -BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2730 ns/op 351.21 MB/s -BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 934 ns/op 229.08 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 475 ns/op 313.63 MB/s -BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 271 ns/op 166.03 MB/s -BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 344 ns/op 234.94 MB/s -BenchmarkUnrecognizedProtoUnmarshal-8 20000000 86.3 ns/op 521.53 MB/s -BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 411 ns/op 228.40 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 43.9 ns/op 113.80 MB/s -BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 261 ns/op 340.84 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.9 ns/op 113.92 MB/s -BenchmarkNodeProtoUnmarshal-8 5000000 312 ns/op 323.19 MB/s -BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 306 ns/op 257.52 MB/s -BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 292 ns/op 283.61 MB/s -BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 307 ns/op 257.00 MB/s -BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1057 ns/op 217.49 MB/s -BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1043 ns/op 220.36 MB/s -BenchmarkProtoTypeProtoUnmarshal-8 10000000 221 ns/op 369.64 MB/s -PASS -ok github.com/gogo/protobuf/test/combos/both 152.331s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt deleted file mode 100644 index 00f352180..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshal.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test -BenchmarkNidOptNativeProtoUnmarshal-8 2000000 742 ns/op 309.65 MB/s -BenchmarkNinOptNativeProtoUnmarshal-8 2000000 892 ns/op 234.06 MB/s -BenchmarkNidRepNativeProtoUnmarshal-8 300000 3762 ns/op 217.69 MB/s -BenchmarkNinRepNativeProtoUnmarshal-8 500000 3750 ns/op 218.40 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 2423 ns/op 153.89 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 2356 ns/op 158.30 MB/s -BenchmarkNidOptStructProtoUnmarshal-8 500000 2595 ns/op 326.01 MB/s -BenchmarkNinOptStructProtoUnmarshal-8 500000 2679 ns/op 285.91 MB/s -BenchmarkNidRepStructProtoUnmarshal-8 200000 7477 ns/op 237.11 MB/s -BenchmarkNinRepStructProtoUnmarshal-8 200000 6672 ns/op 265.70 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1634 ns/op 295.59 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1655 ns/op 276.61 MB/s -BenchmarkNidNestedStructProtoUnmarshal-8 100000 16742 ns/op 246.68 MB/s -BenchmarkNinNestedStructProtoUnmarshal-8 100000 14573 ns/op 266.92 MB/s -BenchmarkNidOptCustomProtoUnmarshal-8 2000000 840 ns/op 84.48 MB/s -BenchmarkCustomDashProtoUnmarshal-8 3000000 573 ns/op 142.95 MB/s -BenchmarkNinOptCustomProtoUnmarshal-8 2000000 668 ns/op 100.17 MB/s -BenchmarkNidRepCustomProtoUnmarshal-8 500000 3945 ns/op 46.12 MB/s -BenchmarkNinRepCustomProtoUnmarshal-8 500000 3939 ns/op 46.20 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-8 5000000 248 ns/op 64.30 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-8 3000000 432 ns/op 145.55 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 2000000 767 ns/op 194.07 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-8 2000000 636 ns/op 122.51 MB/s -BenchmarkTreeProtoUnmarshal-8 2000000 649 ns/op 158.50 MB/s -BenchmarkOrBranchProtoUnmarshal-8 1000000 1312 ns/op 186.65 MB/s -BenchmarkAndBranchProtoUnmarshal-8 1000000 1301 ns/op 188.29 MB/s -BenchmarkLeafProtoUnmarshal-8 3000000 490 ns/op 197.62 MB/s -BenchmarkDeepTreeProtoUnmarshal-8 1000000 1059 ns/op 136.83 MB/s -BenchmarkADeepBranchProtoUnmarshal-8 1000000 1253 ns/op 145.96 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 2041 ns/op 162.62 MB/s -BenchmarkDeepLeafProtoUnmarshal-8 2000000 894 ns/op 156.51 MB/s -BenchmarkNilProtoUnmarshal-8 5000000 362 ns/op 96.48 MB/s -BenchmarkNidOptEnumProtoUnmarshal-8 5000000 382 ns/op 96.84 MB/s -BenchmarkNinOptEnumProtoUnmarshal-8 3000000 448 ns/op 91.37 MB/s -BenchmarkNidRepEnumProtoUnmarshal-8 2000000 796 ns/op 74.10 MB/s -BenchmarkNinRepEnumProtoUnmarshal-8 2000000 799 ns/op 73.79 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-8 3000000 452 ns/op 90.59 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-8 3000000 446 ns/op 91.74 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 3000000 451 ns/op 90.73 MB/s -BenchmarkTimerProtoUnmarshal-8 3000000 528 ns/op 198.78 MB/s -BenchmarkMyExtendableProtoUnmarshal-8 1000000 1295 ns/op 62.54 MB/s -BenchmarkOtherExtenableProtoUnmarshal-8 1000000 2420 ns/op 65.28 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-8 1000000 1501 ns/op 154.48 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 2000000 861 ns/op 138.09 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 3000000 490 ns/op 167.26 MB/s -BenchmarkNestedScopeProtoUnmarshal-8 1000000 1469 ns/op 151.78 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 933 ns/op 223.93 MB/s -BenchmarkCustomContainerProtoUnmarshal-8 1000000 1141 ns/op 95.48 MB/s -BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 2000000 771 ns/op 298.02 MB/s -BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 938 ns/op 222.66 MB/s -BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 3820 ns/op 214.37 MB/s -BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 3613 ns/op 265.38 MB/s -BenchmarkCustomNameCustomTypeProtoUnmarshal-8 300000 4301 ns/op 49.76 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 2000000 772 ns/op 192.86 MB/s -BenchmarkCustomNameEnumProtoUnmarshal-8 3000000 569 ns/op 79.04 MB/s -BenchmarkNoExtensionsMapProtoUnmarshal-8 2000000 850 ns/op 95.19 MB/s -BenchmarkUnrecognizedProtoUnmarshal-8 5000000 269 ns/op 166.93 MB/s -BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 2000000 858 ns/op 109.44 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 10000000 221 ns/op 22.56 MB/s -BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 2000000 605 ns/op 146.89 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 10000000 222 ns/op 22.45 MB/s -BenchmarkNodeProtoUnmarshal-8 2000000 664 ns/op 152.10 MB/s -BenchmarkNonByteCustomTypeProtoUnmarshal-8 2000000 880 ns/op 89.67 MB/s -BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 2000000 953 ns/op 87.07 MB/s -BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 2000000 893 ns/op 88.46 MB/s -BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 500000 3460 ns/op 66.47 MB/s -BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 500000 3452 ns/op 66.63 MB/s -BenchmarkProtoTypeProtoUnmarshal-8 3000000 510 ns/op 160.64 MB/s -PASS -ok github.com/gogo/protobuf/test 160.971s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt deleted file mode 100644 index 69ca32d62..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unmarshaler.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test/combos/both -BenchmarkNidOptNativeProtoUnmarshal-8 3000000 437 ns/op 525.94 MB/s -BenchmarkNinOptNativeProtoUnmarshal-8 2000000 648 ns/op 322.37 MB/s -BenchmarkNidRepNativeProtoUnmarshal-8 500000 2864 ns/op 285.90 MB/s -BenchmarkNinRepNativeProtoUnmarshal-8 500000 2820 ns/op 290.41 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1801 ns/op 207.09 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1813 ns/op 205.70 MB/s -BenchmarkNidOptStructProtoUnmarshal-8 1000000 1839 ns/op 459.88 MB/s -BenchmarkNinOptStructProtoUnmarshal-8 1000000 2018 ns/op 379.50 MB/s -BenchmarkNidRepStructProtoUnmarshal-8 300000 5149 ns/op 344.29 MB/s -BenchmarkNinRepStructProtoUnmarshal-8 300000 5018 ns/op 353.26 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1065 ns/op 453.50 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1079 ns/op 424.46 MB/s -BenchmarkNidNestedStructProtoUnmarshal-8 100000 11788 ns/op 350.34 MB/s -BenchmarkNinNestedStructProtoUnmarshal-8 200000 11113 ns/op 350.03 MB/s -BenchmarkNidOptCustomProtoUnmarshal-8 10000000 199 ns/op 355.77 MB/s -BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 359.40 MB/s -BenchmarkNinOptCustomProtoUnmarshal-8 5000000 246 ns/op 271.79 MB/s -BenchmarkNidRepCustomProtoUnmarshal-8 2000000 801 ns/op 227.02 MB/s -BenchmarkNinRepCustomProtoUnmarshal-8 2000000 810 ns/op 224.64 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 80.9 ns/op 197.77 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 201 ns/op 311.92 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 460 ns/op 323.74 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 318 ns/op 245.16 MB/s -BenchmarkTreeProtoUnmarshal-8 5000000 308 ns/op 333.66 MB/s -BenchmarkOrBranchProtoUnmarshal-8 2000000 801 ns/op 305.77 MB/s -BenchmarkAndBranchProtoUnmarshal-8 2000000 786 ns/op 311.55 MB/s -BenchmarkLeafProtoUnmarshal-8 10000000 221 ns/op 437.02 MB/s -BenchmarkDeepTreeProtoUnmarshal-8 3000000 564 ns/op 256.77 MB/s -BenchmarkADeepBranchProtoUnmarshal-8 2000000 734 ns/op 249.07 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1259 ns/op 263.56 MB/s -BenchmarkDeepLeafProtoUnmarshal-8 3000000 473 ns/op 295.86 MB/s -BenchmarkNilProtoUnmarshal-8 10000000 138 ns/op 252.17 MB/s -BenchmarkNidOptEnumProtoUnmarshal-8 10000000 143 ns/op 258.45 MB/s -BenchmarkNinOptEnumProtoUnmarshal-8 10000000 203 ns/op 201.75 MB/s -BenchmarkNidRepEnumProtoUnmarshal-8 3000000 461 ns/op 127.85 MB/s -BenchmarkNinRepEnumProtoUnmarshal-8 3000000 445 ns/op 132.38 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 199 ns/op 205.22 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 199 ns/op 205.47 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 203 ns/op 201.78 MB/s -BenchmarkTimerProtoUnmarshal-8 10000000 224 ns/op 468.19 MB/s -BenchmarkMyExtendableProtoUnmarshal-8 2000000 653 ns/op 123.97 MB/s -BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1349 ns/op 117.08 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 936 ns/op 247.70 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 421 ns/op 282.31 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 224 ns/op 364.55 MB/s -BenchmarkNestedScopeProtoUnmarshal-8 2000000 918 ns/op 242.79 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 663 ns/op 315.02 MB/s -BenchmarkCustomContainerProtoUnmarshal-8 5000000 360 ns/op 302.50 MB/s -BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 455 ns/op 504.73 MB/s -BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 667 ns/op 313.20 MB/s -BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2908 ns/op 281.59 MB/s -BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2668 ns/op 359.44 MB/s -BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 926 ns/op 231.07 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 471 ns/op 316.30 MB/s -BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 267 ns/op 168.48 MB/s -BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 341 ns/op 237.47 MB/s -BenchmarkUnrecognizedProtoUnmarshal-8 20000000 85.0 ns/op 529.53 MB/s -BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 408 ns/op 230.38 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 45.5 ns/op 109.87 MB/s -BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 261 ns/op 340.78 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.2 ns/op 115.70 MB/s -BenchmarkNodeProtoUnmarshal-8 5000000 310 ns/op 325.74 MB/s -BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 310 ns/op 254.37 MB/s -BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 294 ns/op 281.53 MB/s -BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 308 ns/op 256.49 MB/s -BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1040 ns/op 221.03 MB/s -BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1039 ns/op 221.20 MB/s -BenchmarkProtoTypeProtoUnmarshal-8 10000000 220 ns/op 372.18 MB/s -PASS -ok github.com/gogo/protobuf/test/combos/both 153.117s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt deleted file mode 100644 index 424080a83..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_marshaler.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test/combos/unsafeboth -BenchmarkNidOptNativeProtoMarshal-8 10000000 235 ns/op 976.65 MB/s -BenchmarkNinOptNativeProtoMarshal-8 5000000 265 ns/op 788.37 MB/s -BenchmarkNidRepNativeProtoMarshal-8 1000000 1011 ns/op 810.06 MB/s -BenchmarkNinRepNativeProtoMarshal-8 1000000 1004 ns/op 815.63 MB/s -BenchmarkNidRepPackedNativeProtoMarshal-8 2000000 958 ns/op 389.24 MB/s -BenchmarkNinRepPackedNativeProtoMarshal-8 2000000 968 ns/op 385.16 MB/s -BenchmarkNidOptStructProtoMarshal-8 2000000 979 ns/op 863.95 MB/s -BenchmarkNinOptStructProtoMarshal-8 2000000 946 ns/op 808.91 MB/s -BenchmarkNidRepStructProtoMarshal-8 500000 2495 ns/op 710.38 MB/s -BenchmarkNinRepStructProtoMarshal-8 500000 2265 ns/op 782.62 MB/s -BenchmarkNidEmbeddedStructProtoMarshal-8 3000000 561 ns/op 860.52 MB/s -BenchmarkNinEmbeddedStructProtoMarshal-8 3000000 538 ns/op 849.81 MB/s -BenchmarkNidNestedStructProtoMarshal-8 200000 7308 ns/op 565.10 MB/s -BenchmarkNinNestedStructProtoMarshal-8 200000 6016 ns/op 646.61 MB/s -BenchmarkNidOptCustomProtoMarshal-8 20000000 97.3 ns/op 729.87 MB/s -BenchmarkCustomDashProtoMarshal-8 20000000 92.5 ns/op 886.05 MB/s -BenchmarkNinOptCustomProtoMarshal-8 20000000 97.4 ns/op 687.82 MB/s -BenchmarkNidRepCustomProtoMarshal-8 5000000 258 ns/op 705.25 MB/s -BenchmarkNinRepCustomProtoMarshal-8 5000000 258 ns/op 704.21 MB/s -BenchmarkNinOptNativeUnionProtoMarshal-8 20000000 69.0 ns/op 231.80 MB/s -BenchmarkNinOptStructUnionProtoMarshal-8 10000000 138 ns/op 453.62 MB/s -BenchmarkNinEmbeddedStructUnionProtoMarshal-8 5000000 251 ns/op 591.44 MB/s -BenchmarkNinNestedStructUnionProtoMarshal-8 10000000 208 ns/op 373.73 MB/s -BenchmarkTreeProtoMarshal-8 10000000 154 ns/op 664.72 MB/s -BenchmarkOrBranchProtoMarshal-8 5000000 343 ns/op 712.72 MB/s -BenchmarkAndBranchProtoMarshal-8 5000000 344 ns/op 710.24 MB/s -BenchmarkLeafProtoMarshal-8 20000000 117 ns/op 824.42 MB/s -BenchmarkDeepTreeProtoMarshal-8 5000000 247 ns/op 585.23 MB/s -BenchmarkADeepBranchProtoMarshal-8 5000000 301 ns/op 606.06 MB/s -BenchmarkAndDeepBranchProtoMarshal-8 3000000 595 ns/op 557.97 MB/s -BenchmarkDeepLeafProtoMarshal-8 10000000 206 ns/op 676.59 MB/s -BenchmarkNilProtoMarshal-8 30000000 51.2 ns/op 682.93 MB/s -BenchmarkNidOptEnumProtoMarshal-8 20000000 62.0 ns/op 596.44 MB/s -BenchmarkNinOptEnumProtoMarshal-8 20000000 78.6 ns/op 521.93 MB/s -BenchmarkNidRepEnumProtoMarshal-8 10000000 184 ns/op 320.25 MB/s -BenchmarkNinRepEnumProtoMarshal-8 10000000 184 ns/op 319.78 MB/s -BenchmarkNinOptEnumDefaultProtoMarshal-8 20000000 78.1 ns/op 525.05 MB/s -BenchmarkAnotherNinOptEnumProtoMarshal-8 20000000 77.6 ns/op 528.30 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoMarshal-8 20000000 79.1 ns/op 518.59 MB/s -BenchmarkTimerProtoMarshal-8 20000000 103 ns/op 1011.16 MB/s -BenchmarkMyExtendableProtoMarshal-8 3000000 465 ns/op 174.04 MB/s -BenchmarkOtherExtenableProtoMarshal-8 2000000 1028 ns/op 153.66 MB/s -BenchmarkNestedDefinitionProtoMarshal-8 5000000 283 ns/op 818.76 MB/s -BenchmarkNestedDefinition_NestedMessageProtoMarshal-8 10000000 141 ns/op 838.57 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal-8 20000000 94.1 ns/op 871.31 MB/s -BenchmarkNestedScopeProtoMarshal-8 5000000 259 ns/op 857.99 MB/s -BenchmarkNinOptNativeDefaultProtoMarshal-8 5000000 272 ns/op 768.10 MB/s -BenchmarkCustomContainerProtoMarshal-8 10000000 141 ns/op 769.72 MB/s -BenchmarkCustomNameNidOptNativeProtoMarshal-8 10000000 237 ns/op 968.65 MB/s -BenchmarkCustomNameNinOptNativeProtoMarshal-8 5000000 290 ns/op 719.58 MB/s -BenchmarkCustomNameNinRepNativeProtoMarshal-8 1000000 1006 ns/op 813.87 MB/s -BenchmarkCustomNameNinStructProtoMarshal-8 1000000 1296 ns/op 739.54 MB/s -BenchmarkCustomNameCustomTypeProtoMarshal-8 5000000 300 ns/op 712.96 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal-8 5000000 247 ns/op 601.55 MB/s -BenchmarkCustomNameEnumProtoMarshal-8 20000000 107 ns/op 417.49 MB/s -BenchmarkNoExtensionsMapProtoMarshal-8 20000000 116 ns/op 695.54 MB/s -BenchmarkUnrecognizedProtoMarshal-8 20000000 66.8 ns/op 673.51 MB/s -BenchmarkUnrecognizedWithInnerProtoMarshal-8 10000000 171 ns/op 548.84 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoMarshal-8 30000000 46.7 ns/op 107.10 MB/s -BenchmarkUnrecognizedWithEmbedProtoMarshal-8 10000000 126 ns/op 700.99 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal-8 30000000 43.8 ns/op 114.23 MB/s -BenchmarkNodeProtoMarshal-8 10000000 119 ns/op 844.78 MB/s -BenchmarkNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 639.73 MB/s -BenchmarkNidOptNonByteCustomTypeProtoMarshal-8 10000000 126 ns/op 657.86 MB/s -BenchmarkNinOptNonByteCustomTypeProtoMarshal-8 10000000 123 ns/op 641.02 MB/s -BenchmarkNidRepNonByteCustomTypeProtoMarshal-8 5000000 386 ns/op 595.49 MB/s -BenchmarkNinRepNonByteCustomTypeProtoMarshal-8 5000000 382 ns/op 601.83 MB/s -BenchmarkProtoTypeProtoMarshal-8 20000000 94.3 ns/op 869.89 MB/s -PASS -ok github.com/gogo/protobuf/test/combos/unsafeboth 147.234s diff --git a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt b/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt deleted file mode 100644 index 751009e50..000000000 --- a/vendor/github.com/gogo/protobuf/test/mixbench/unsafe_unmarshaler.txt +++ /dev/null @@ -1,73 +0,0 @@ -goos: darwin -goarch: amd64 -pkg: github.com/gogo/protobuf/test/combos/unsafeboth -BenchmarkNidOptNativeProtoUnmarshal-8 3000000 425 ns/op 540.14 MB/s -BenchmarkNinOptNativeProtoUnmarshal-8 2000000 612 ns/op 341.01 MB/s -BenchmarkNidRepNativeProtoUnmarshal-8 500000 2884 ns/op 283.98 MB/s -BenchmarkNinRepNativeProtoUnmarshal-8 500000 2809 ns/op 291.49 MB/s -BenchmarkNidRepPackedNativeProtoUnmarshal-8 1000000 1806 ns/op 206.53 MB/s -BenchmarkNinRepPackedNativeProtoUnmarshal-8 1000000 1769 ns/op 210.78 MB/s -BenchmarkNidOptStructProtoUnmarshal-8 1000000 1820 ns/op 464.71 MB/s -BenchmarkNinOptStructProtoUnmarshal-8 1000000 1932 ns/op 396.30 MB/s -BenchmarkNidRepStructProtoUnmarshal-8 300000 5074 ns/op 349.42 MB/s -BenchmarkNinRepStructProtoUnmarshal-8 300000 4891 ns/op 362.49 MB/s -BenchmarkNidEmbeddedStructProtoUnmarshal-8 1000000 1034 ns/op 466.75 MB/s -BenchmarkNinEmbeddedStructProtoUnmarshal-8 1000000 1061 ns/op 431.37 MB/s -BenchmarkNidNestedStructProtoUnmarshal-8 200000 11579 ns/op 356.66 MB/s -BenchmarkNinNestedStructProtoUnmarshal-8 200000 10862 ns/op 358.12 MB/s -BenchmarkNidOptCustomProtoUnmarshal-8 10000000 202 ns/op 350.76 MB/s -BenchmarkCustomDashProtoUnmarshal-8 10000000 228 ns/op 358.70 MB/s -BenchmarkNinOptCustomProtoUnmarshal-8 5000000 245 ns/op 272.41 MB/s -BenchmarkNidRepCustomProtoUnmarshal-8 2000000 810 ns/op 224.66 MB/s -BenchmarkNinRepCustomProtoUnmarshal-8 2000000 812 ns/op 224.11 MB/s -BenchmarkNinOptNativeUnionProtoUnmarshal-8 20000000 73.2 ns/op 218.58 MB/s -BenchmarkNinOptStructUnionProtoUnmarshal-8 10000000 194 ns/op 323.57 MB/s -BenchmarkNinEmbeddedStructUnionProtoUnmarshal-8 3000000 459 ns/op 324.42 MB/s -BenchmarkNinNestedStructUnionProtoUnmarshal-8 5000000 315 ns/op 247.13 MB/s -BenchmarkTreeProtoUnmarshal-8 5000000 307 ns/op 335.37 MB/s -BenchmarkOrBranchProtoUnmarshal-8 2000000 782 ns/op 313.01 MB/s -BenchmarkAndBranchProtoUnmarshal-8 2000000 776 ns/op 315.38 MB/s -BenchmarkLeafProtoUnmarshal-8 10000000 218 ns/op 443.71 MB/s -BenchmarkDeepTreeProtoUnmarshal-8 3000000 565 ns/op 256.61 MB/s -BenchmarkADeepBranchProtoUnmarshal-8 2000000 734 ns/op 249.27 MB/s -BenchmarkAndDeepBranchProtoUnmarshal-8 1000000 1263 ns/op 262.80 MB/s -BenchmarkDeepLeafProtoUnmarshal-8 3000000 476 ns/op 294.03 MB/s -BenchmarkNilProtoUnmarshal-8 10000000 137 ns/op 254.01 MB/s -BenchmarkNidOptEnumProtoUnmarshal-8 10000000 141 ns/op 260.58 MB/s -BenchmarkNinOptEnumProtoUnmarshal-8 10000000 200 ns/op 204.30 MB/s -BenchmarkNidRepEnumProtoUnmarshal-8 3000000 449 ns/op 131.35 MB/s -BenchmarkNinRepEnumProtoUnmarshal-8 3000000 459 ns/op 128.30 MB/s -BenchmarkNinOptEnumDefaultProtoUnmarshal-8 10000000 203 ns/op 201.59 MB/s -BenchmarkAnotherNinOptEnumProtoUnmarshal-8 10000000 201 ns/op 203.75 MB/s -BenchmarkAnotherNinOptEnumDefaultProtoUnmarshal-8 10000000 205 ns/op 199.16 MB/s -BenchmarkTimerProtoUnmarshal-8 10000000 223 ns/op 469.62 MB/s -BenchmarkMyExtendableProtoUnmarshal-8 2000000 654 ns/op 123.72 MB/s -BenchmarkOtherExtenableProtoUnmarshal-8 1000000 1353 ns/op 116.72 MB/s -BenchmarkNestedDefinitionProtoUnmarshal-8 2000000 919 ns/op 252.43 MB/s -BenchmarkNestedDefinition_NestedMessageProtoUnmarshal-8 3000000 427 ns/op 278.50 MB/s -BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoUnmarshal-8 10000000 216 ns/op 378.01 MB/s -BenchmarkNestedScopeProtoUnmarshal-8 2000000 893 ns/op 249.72 MB/s -BenchmarkNinOptNativeDefaultProtoUnmarshal-8 2000000 671 ns/op 311.36 MB/s -BenchmarkCustomContainerProtoUnmarshal-8 5000000 351 ns/op 310.13 MB/s -BenchmarkCustomNameNidOptNativeProtoUnmarshal-8 3000000 446 ns/op 514.92 MB/s -BenchmarkCustomNameNinOptNativeProtoUnmarshal-8 2000000 652 ns/op 320.55 MB/s -BenchmarkCustomNameNinRepNativeProtoUnmarshal-8 500000 2841 ns/op 288.23 MB/s -BenchmarkCustomNameNinStructProtoUnmarshal-8 500000 2639 ns/op 363.30 MB/s -BenchmarkCustomNameCustomTypeProtoUnmarshal-8 2000000 919 ns/op 232.73 MB/s -BenchmarkCustomNameNinEmbeddedStructUnionProtoUnmarshal-8 3000000 461 ns/op 322.60 MB/s -BenchmarkCustomNameEnumProtoUnmarshal-8 5000000 270 ns/op 166.20 MB/s -BenchmarkNoExtensionsMapProtoUnmarshal-8 5000000 353 ns/op 228.99 MB/s -BenchmarkUnrecognizedProtoUnmarshal-8 20000000 85.7 ns/op 525.21 MB/s -BenchmarkUnrecognizedWithInnerProtoUnmarshal-8 3000000 415 ns/op 226.40 MB/s -BenchmarkUnrecognizedWithInner_InnerProtoUnmarshal-8 30000000 42.6 ns/op 117.47 MB/s -BenchmarkUnrecognizedWithEmbedProtoUnmarshal-8 5000000 259 ns/op 343.44 MB/s -BenchmarkUnrecognizedWithEmbed_EmbeddedProtoUnmarshal-8 30000000 43.2 ns/op 115.84 MB/s -BenchmarkNodeProtoUnmarshal-8 5000000 306 ns/op 329.03 MB/s -BenchmarkNonByteCustomTypeProtoUnmarshal-8 5000000 308 ns/op 256.11 MB/s -BenchmarkNidOptNonByteCustomTypeProtoUnmarshal-8 5000000 292 ns/op 284.10 MB/s -BenchmarkNinOptNonByteCustomTypeProtoUnmarshal-8 5000000 306 ns/op 258.01 MB/s -BenchmarkNidRepNonByteCustomTypeProtoUnmarshal-8 1000000 1049 ns/op 219.19 MB/s -BenchmarkNinRepNonByteCustomTypeProtoUnmarshal-8 1000000 1046 ns/op 219.68 MB/s -BenchmarkProtoTypeProtoUnmarshal-8 10000000 221 ns/op 370.99 MB/s -PASS -ok github.com/gogo/protobuf/test/combos/unsafeboth 151.728s diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile b/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile deleted file mode 100644 index 0d4f698dd..000000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. md.proto) diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go b/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go deleted file mode 100644 index 044f00c51..000000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/md.pb.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: md.proto - -/* - 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 - -// 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 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 (*MoreDefaultsB) Descriptor() ([]byte, []int) { return fileDescriptorMd, []int{0} } - -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() {} -func (*MoreDefaultsA) Descriptor() ([]byte, []int) { return fileDescriptorMd, []int{1} } - -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 { - return this == nil - } - - that1, ok := that.(*MoreDefaultsB) - if !ok { - that2, ok := that.(MoreDefaultsB) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*MoreDefaultsA) - if !ok { - that2, ok := that.(MoreDefaultsA) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 := string(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 -} - -func init() { proto.RegisterFile("md.proto", fileDescriptorMd) } - -var fileDescriptorMd = []byte{ - // 258 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc8, 0x4d, 0xd1, 0x2b, - 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0xc9, 0xcd, 0x2f, 0x4a, 0x4d, 0x49, 0x4d, 0x4b, 0x2c, 0xcd, - 0x29, 0x29, 0x96, 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, 0xca, 0x18, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0xfd, 0xd4, 0x8a, 0xc4, 0xdc, 0x82, 0x9c, - 0x54, 0x18, 0x0d, 0xd1, 0xa4, 0xa4, 0xce, 0xc5, 0xeb, 0x9b, 0x5f, 0x94, 0xea, 0x02, 0xb5, 0xd3, - 0x49, 0x48, 0x8c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5, 0x50, 0x82, 0x51, 0x81, 0x51, 0x83, - 0x33, 0x08, 0xca, 0x53, 0x7a, 0xcc, 0x88, 0xaa, 0xd2, 0x51, 0x48, 0x06, 0x45, 0x25, 0xb3, 0x15, - 0x8b, 0xa1, 0x91, 0xb1, 0x09, 0x4c, 0x3d, 0x5c, 0xd6, 0x48, 0x82, 0x09, 0x24, 0xeb, 0xc4, 0x72, - 0xe2, 0x9e, 0x3c, 0x03, 0x54, 0xd6, 0x48, 0x48, 0x9b, 0x8b, 0xc9, 0xc9, 0x50, 0x82, 0x59, 0x81, - 0x51, 0x83, 0xdb, 0x48, 0x5a, 0x0f, 0xd9, 0xd7, 0x7a, 0x28, 0xce, 0x09, 0x62, 0x72, 0x32, 0x14, - 0x32, 0xe4, 0x62, 0x72, 0x32, 0x92, 0x60, 0x21, 0xa8, 0x18, 0x6a, 0x07, 0x93, 0x93, 0x91, 0x90, - 0x38, 0x17, 0x93, 0xa3, 0xa1, 0x04, 0x2b, 0x58, 0x0b, 0xbb, 0x1e, 0xc8, 0xff, 0x7a, 0x8e, 0x41, - 0x4c, 0x8e, 0x86, 0x42, 0xb2, 0x5c, 0x4c, 0x8e, 0x46, 0x12, 0x6c, 0x28, 0x12, 0x30, 0x7d, 0x8e, - 0x46, 0x4e, 0x02, 0x27, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, - 0x8e, 0x47, 0x72, 0x8c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf2, 0xf0, 0x3f, 0xeb, 0x9d, 0x01, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto b/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto deleted file mode 100644 index 7f5b2190c..000000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/md.proto +++ /dev/null @@ -1,53 +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 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/github.com/gogo/protobuf/test/moredefaults/md_test.go b/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go deleted file mode 100644 index 45a8eac56..000000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/md_test.go +++ /dev/null @@ -1,61 +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 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/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go b/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go deleted file mode 100644 index 4ca8445d7..000000000 --- a/vendor/github.com/gogo/protobuf/test/moredefaults/mdpb_test.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: md.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsB{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMoreDefaultsAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsA{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMoreDefaultsBJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsB{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MoreDefaultsA{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MoreDefaultsB{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsB(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MoreDefaultsB{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MoreDefaultsA{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMoreDefaultsA(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MoreDefaultsA{} - if err := 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/github.com/gogo/protobuf/test/nopackage/Makefile b/vendor/github.com/gogo/protobuf/test/nopackage/Makefile deleted file mode 100644 index 0aa49e25b..000000000 --- a/vendor/github.com/gogo/protobuf/test/nopackage/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc-min-version --version="3.0.0" --proto_path=../../../../../:../../protobuf/:. --gogofast_out=. nopackage.proto) diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go deleted file mode 100644 index 721fe1b55..000000000 --- a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.pb.go +++ /dev/null @@ -1,392 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: nopackage.proto - -/* -Package nopackage is a generated protocol buffer package. - -It is generated from these files: - nopackage.proto - -It has these top-level messages: - M -*/ -package nopackage - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" - -import binary "encoding/binary" - -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 M struct { - F map[string]float64 `protobuf:"bytes,1,rep,name=f" json:"f,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` -} - -func (m *M) Reset() { *m = M{} } -func (m *M) String() string { return proto.CompactTextString(m) } -func (*M) ProtoMessage() {} -func (*M) Descriptor() ([]byte, []int) { return fileDescriptorNopackage, []int{0} } - -func (m *M) GetF() map[string]float64 { - if m != nil { - return m.F - } - return nil -} - -func init() { - proto.RegisterType((*M)(nil), "M") -} -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.F) > 0 { - for k := range m.F { - dAtA[i] = 0xa - i++ - v := m.F[k] - mapSize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 - i = encodeVarintNopackage(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintNopackage(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - return i, nil -} - -func encodeVarintNopackage(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 *M) Size() (n int) { - var l int - _ = l - if len(m.F) > 0 { - for k, v := range m.F { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovNopackage(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovNopackage(uint64(mapEntrySize)) - } - } - return n -} - -func sovNopackage(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozNopackage(x uint64) (n int) { - return sovNopackage(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 ErrIntOverflowNopackage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 F", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNopackage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthNopackage - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.F == nil { - m.F = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNopackage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNopackage - } - 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 ErrInvalidLengthNopackage - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipNopackage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNopackage - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.F[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipNopackage(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthNopackage - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipNopackage(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, ErrIntOverflowNopackage - } - 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, ErrIntOverflowNopackage - } - 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, ErrIntOverflowNopackage - } - 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, ErrInvalidLengthNopackage - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowNopackage - } - 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 := skipNopackage(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 ( - ErrInvalidLengthNopackage = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowNopackage = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("nopackage.proto", fileDescriptorNopackage) } - -var fileDescriptorNopackage = []byte{ - // 134 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0xcb, 0x2f, 0x48, - 0x4c, 0xce, 0x4e, 0x4c, 0x4f, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x0a, 0xe2, 0x62, 0xf4, - 0x15, 0x12, 0xe7, 0x62, 0x4c, 0x93, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0xe2, 0xd4, 0xf3, 0xd5, - 0x73, 0x73, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0x62, 0x4c, 0x93, 0x32, 0xe1, 0x62, 0x83, 0x70, 0x84, - 0x04, 0xb8, 0x98, 0xb3, 0x53, 0x2b, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, - 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc6, 0x20, 0x08, - 0xc7, 0x8a, 0xc9, 0x82, 0xd1, 0x89, 0xe7, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, - 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x5b, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x62, 0x62, - 0xb2, 0xed, 0x7b, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto deleted file mode 100644 index cfaed76ba..000000000 --- a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage.proto +++ /dev/null @@ -1,33 +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 = "proto3"; - -message M { - map f = 1; -} diff --git a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go b/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go deleted file mode 100644 index 3318a29cd..000000000 --- a/vendor/github.com/gogo/protobuf/test/nopackage/nopackage_test.go +++ /dev/null @@ -1,38 +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 nopackage - -import ( - "testing" -) - -func TestNoPackage(t *testing.T) { - //should compile - _ = (&M{}).Marshal -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/Makefile b/vendor/github.com/gogo/protobuf/test/oneof/Makefile deleted file mode 100644 index d9c0c4c36..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/Makefile +++ /dev/null @@ -1,32 +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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-gen-combo --version="2.6.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. one.proto diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go deleted file mode 100644 index 65794aa01..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.pb.go +++ /dev/null @@ -1,5440 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/one.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import binary "encoding/binary" - -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 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() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []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 - } -} - -func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *AllTypesOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *AllTypesOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *AllTypesOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *AllTypesOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *AllTypesOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } - -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,json=subMessage2,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), func(msg proto.Message) (n int), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []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 - } -} - -func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *TwoOneofs_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *TwoOneofs_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field34))) - n += len(x.Field34) - case *TwoOneofs_Field35: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field35))) - n += len(x.Field35) - case *TwoOneofs_SubMessage2: - s := proto.Size(x.SubMessage2) - n += proto.SizeVarint(36<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } - -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), func(msg proto.Message) (n int), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []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 _CustomOneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Stringy))) - n += len(x.Stringy) - case *CustomOneof_CustomType: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(x.CustomType.Size())) - n += x.CustomType.Size() - case *CustomOneof_CastType: - n += proto.SizeVarint(36<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - n += proto.SizeVarint(37<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.MyCustomName)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4152 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x6b, 0x6c, 0x1c, 0xd7, - 0x75, 0xe6, 0xec, 0x83, 0xdc, 0x3d, 0xbb, 0x5c, 0x0e, 0x2f, 0x69, 0x69, 0x45, 0xc7, 0x2b, 0x69, - 0x6d, 0x47, 0xb4, 0x1d, 0x93, 0x36, 0x45, 0xea, 0xb1, 0x6a, 0xe2, 0x2e, 0xc9, 0x15, 0x45, 0x95, - 0xe4, 0x32, 0x43, 0x32, 0x7e, 0x04, 0xc5, 0x60, 0x38, 0x7b, 0xb9, 0x1c, 0x69, 0x76, 0x66, 0x32, - 0x33, 0x2b, 0x99, 0x42, 0x7f, 0xa8, 0x70, 0x1f, 0x08, 0x8a, 0xbe, 0xd2, 0x02, 0x49, 0x5c, 0xc7, - 0x7d, 0x00, 0xad, 0xd3, 0xf4, 0x95, 0x34, 0x6d, 0x9a, 0xf6, 0x57, 0xff, 0xa4, 0xf5, 0xaf, 0xc2, - 0xf9, 0x57, 0x14, 0x85, 0x61, 0x31, 0x06, 0x9a, 0xb6, 0x6e, 0xe3, 0xb6, 0x2e, 0x60, 0xd4, 0x7f, - 0x8a, 0xfb, 0x9a, 0x99, 0x7d, 0x50, 0xb3, 0x0c, 0x62, 0xe7, 0x17, 0x39, 0xe7, 0x9c, 0xef, 0x9b, - 0x73, 0xcf, 0x3d, 0xf7, 0x9c, 0x7b, 0xef, 0x0e, 0xfc, 0xe0, 0x32, 0x9c, 0x69, 0xda, 0x76, 0xd3, - 0xc4, 0xb3, 0x8e, 0x6b, 0xfb, 0xf6, 0x6e, 0x7b, 0x6f, 0xb6, 0x81, 0x3d, 0xdd, 0x35, 0x1c, 0xdf, - 0x76, 0x67, 0xa8, 0x0c, 0x8d, 0x31, 0x8b, 0x19, 0x61, 0x51, 0x5e, 0x87, 0xf1, 0xab, 0x86, 0x89, - 0x97, 0x03, 0xc3, 0x2d, 0xec, 0xa3, 0x4b, 0x90, 0xda, 0x33, 0x4c, 0x5c, 0x94, 0xce, 0x24, 0xa7, - 0x73, 0x73, 0x8f, 0xcc, 0x74, 0x81, 0x66, 0x3a, 0x11, 0x9b, 0x44, 0xac, 0x50, 0x44, 0xf9, 0xed, - 0x14, 0x4c, 0xf4, 0xd1, 0x22, 0x04, 0x29, 0x4b, 0x6b, 0x11, 0x46, 0x69, 0x3a, 0xab, 0xd0, 0xff, - 0x51, 0x11, 0x46, 0x1c, 0x4d, 0xbf, 0xa9, 0x35, 0x71, 0x31, 0x41, 0xc5, 0xe2, 0x11, 0x95, 0x00, - 0x1a, 0xd8, 0xc1, 0x56, 0x03, 0x5b, 0xfa, 0x41, 0x31, 0x79, 0x26, 0x39, 0x9d, 0x55, 0x22, 0x12, - 0xf4, 0x04, 0x8c, 0x3b, 0xed, 0x5d, 0xd3, 0xd0, 0xd5, 0x88, 0x19, 0x9c, 0x49, 0x4e, 0xa7, 0x15, - 0x99, 0x29, 0x96, 0x43, 0xe3, 0x73, 0x30, 0x76, 0x1b, 0x6b, 0x37, 0xa3, 0xa6, 0x39, 0x6a, 0x5a, - 0x20, 0xe2, 0x88, 0xe1, 0x12, 0xe4, 0x5b, 0xd8, 0xf3, 0xb4, 0x26, 0x56, 0xfd, 0x03, 0x07, 0x17, - 0x53, 0x74, 0xf4, 0x67, 0x7a, 0x46, 0xdf, 0x3d, 0xf2, 0x1c, 0x47, 0x6d, 0x1f, 0x38, 0x18, 0x55, - 0x21, 0x8b, 0xad, 0x76, 0x8b, 0x31, 0xa4, 0x8f, 0x88, 0x5f, 0xcd, 0x6a, 0xb7, 0xba, 0x59, 0x32, - 0x04, 0xc6, 0x29, 0x46, 0x3c, 0xec, 0xde, 0x32, 0x74, 0x5c, 0x1c, 0xa6, 0x04, 0xe7, 0x7a, 0x08, - 0xb6, 0x98,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6, 0x0c, - 0xec, 0xf2, 0x0b, 0x1b, 0x76, 0xa0, 0x18, 0x0b, 0xe5, 0xec, 0xce, 0xe6, 0x13, 0x80, 0x1c, 0xdb, - 0x33, 0x7c, 0xe3, 0x16, 0x56, 0x0d, 0x4b, 0xdc, 0xee, 0x90, 0x03, 0x46, 0x4a, 0x91, 0x85, 0x66, - 0xd5, 0xf2, 0x03, 0x6b, 0x0b, 0x37, 0xb5, 0x2e, 0x6b, 0x52, 0xc0, 0x93, 0x8a, 0x2c, 0x34, 0x81, - 0xf5, 0x59, 0xc8, 0x37, 0xec, 0x36, 0xd9, 0x75, 0x31, 0x3b, 0xd2, 0x2f, 0x24, 0x25, 0xc7, 0x64, - 0x81, 0x09, 0xdf, 0x4f, 0x87, 0xd7, 0x4a, 0x79, 0x25, 0xc7, 0x64, 0xcc, 0xe4, 0x1c, 0x8c, 0x69, - 0xcd, 0xa6, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0x14, 0x02, 0x31, 0x35, 0x9c, 0xba, 0x0e, 0x19, - 0x11, 0x07, 0xd2, 0x92, 0x49, 0x24, 0x54, 0x87, 0x1d, 0x7b, 0x13, 0xd3, 0x59, 0x25, 0x63, 0x09, - 0xe5, 0x59, 0xc8, 0x1b, 0x9e, 0x1a, 0xde, 0x92, 0x27, 0xce, 0x24, 0xa6, 0x33, 0x4a, 0xce, 0xf0, - 0x82, 0x1b, 0xc6, 0xf2, 0x6b, 0x09, 0x28, 0x74, 0xde, 0xf2, 0xa3, 0x65, 0xc8, 0x98, 0xb6, 0xae, - 0xd1, 0xd4, 0x62, 0x3f, 0x31, 0x4d, 0xc7, 0xfc, 0x30, 0x30, 0xb3, 0xc6, 0xed, 0x95, 0x00, 0x39, - 0xf5, 0x0f, 0x12, 0x64, 0x84, 0x18, 0x9d, 0x80, 0x94, 0xa3, 0xf9, 0xfb, 0x94, 0x2e, 0xbd, 0x98, - 0x90, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0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, 0x15, 0x03, 0x70, 0xbe, 0xcc, 0x39, 0x27, 0x7b, 0x32, 0x83, 0xd0, 0x6e, - 0x82, 0x90, 0x07, 0x73, 0x39, 0x00, 0xe7, 0x6f, 0x71, 0x4e, 0xc4, 0xb1, 0x62, 0x4a, 0x09, 0xe3, - 0x75, 0x18, 0xbf, 0x85, 0xdd, 0x5d, 0xdb, 0xe3, 0xb7, 0x34, 0x03, 0xd0, 0xbd, 0xc2, 0xe9, 0xc6, - 0x38, 0x90, 0x5e, 0xdb, 0x10, 0xae, 0xcb, 0x90, 0xd9, 0xd3, 0x74, 0x3c, 0x00, 0xc5, 0x57, 0x38, - 0xc5, 0x08, 0xb1, 0x27, 0xd0, 0x2a, 0xe4, 0x9b, 0x36, 0xef, 0x4c, 0xf1, 0xf0, 0x57, 0x39, 0x3c, - 0x27, 0x30, 0x9c, 0xc2, 0xb1, 0x9d, 0xb6, 0x49, 0xda, 0x56, 0x3c, 0xc5, 0x6f, 0x0b, 0x0a, 0x81, - 0xe1, 0x14, 0xc7, 0x08, 0xeb, 0xef, 0x08, 0x0a, 0x2f, 0x12, 0xcf, 0x67, 0x20, 0x67, 0x5b, 0xe6, - 0x81, 0x6d, 0x0d, 0xe2, 0xc4, 0xef, 0x72, 0x06, 0xe0, 0x10, 0x42, 0x70, 0x05, 0xb2, 0x83, 0x4e, - 0xc4, 0xef, 0xbf, 0x23, 0x96, 0x87, 0x98, 0x81, 0x15, 0x18, 0x13, 0x05, 0xca, 0xb0, 0xad, 0x01, - 0x28, 0xfe, 0x80, 0x53, 0x14, 0x22, 0x30, 0x3e, 0x0c, 0x1f, 0x7b, 0x7e, 0x13, 0x0f, 0x42, 0xf2, - 0x9a, 0x18, 0x06, 0x87, 0xf0, 0x50, 0xee, 0x62, 0x4b, 0xdf, 0x1f, 0x8c, 0xe1, 0xab, 0x22, 0x94, - 0x02, 0x43, 0x28, 0x96, 0x60, 0xb4, 0xa5, 0xb9, 0xde, 0xbe, 0x66, 0x0e, 0x34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89, - 0x04, 0x38, 0x64, 0x41, 0x3b, 0x90, 0x59, 0xd2, 0x3c, 0xfa, 0x29, 0x1c, 0x75, 0x3d, 0xb5, 0x78, - 0xf1, 0xff, 0xde, 0x3c, 0x7d, 0x3e, 0x86, 0x91, 0x57, 0xc6, 0x99, 0xf5, 0x03, 0xc2, 0x7a, 0x61, - 0x9e, 0xc0, 0xaf, 0x0d, 0x29, 0x01, 0x15, 0x9a, 0x13, 0xae, 0x6e, 0x68, 0x2d, 0xf6, 0xe5, 0x4e, - 0x72, 0x51, 0x3e, 0x7c, 0xf3, 0x74, 0x7e, 0xfd, 0x20, 0x94, 0x87, 0xae, 0x90, 0xa7, 0xc5, 0x0c, - 0x0c, 0x33, 0x57, 0x17, 0x97, 0x5f, 0xbf, 0x57, 0x1a, 0x7a, 0xe3, 0x5e, 0x69, 0xe8, 0x1f, 0xef, - 0x95, 0x86, 0xde, 0xba, 0x57, 0x92, 0xde, 0xbd, 0x57, 0x92, 0xde, 0xbf, 0x57, 0x92, 0xee, 0x1e, - 0x96, 0xa4, 0xaf, 0x1e, 0x96, 0xa4, 0xaf, 0x1f, 0x96, 0xa4, 0x6f, 0x1f, 0x96, 0xa4, 0xd7, 0x0f, - 0x4b, 0xd2, 0x1b, 0x87, 0x25, 0xe9, 0xad, 0xc3, 0x92, 0xf4, 0xfd, 0xc3, 0xd2, 0xd0, 0xbb, 0x87, - 0x25, 0xe9, 0xfd, 0xc3, 0xd2, 0xd0, 0xdd, 0xef, 0x95, 0x86, 0xfe, 0x3f, 0x00, 0x00, 0xff, 0xff, - 0xbb, 0x8f, 0xfb, 0x36, 0x04, 0x35, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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 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 := string(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 = string(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 = string(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 = string(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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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") -) - -func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 596 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x4f, 0xdb, 0x40, - 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0xb8, 0x84, 0x92, 0x5a, 0xaa, 0x74, 0x65, 0x38, 0x4e, 0x69, - 0x2b, 0xdd, 0x50, 0x12, 0xe2, 0xd8, 0xfc, 0x19, 0x6b, 0xaa, 0x2a, 0x0b, 0x45, 0x32, 0x30, 0xa3, - 0x98, 0x9a, 0x10, 0x89, 0xf8, 0x10, 0x77, 0x16, 0xf2, 0xc6, 0x67, 0xe8, 0xa7, 0xe8, 0xd8, 0xb1, - 0x1f, 0x81, 0x31, 0x63, 0xd5, 0x21, 0xc2, 0xee, 0xd2, 0x91, 0x11, 0x75, 0xaa, 0xce, 0x26,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, 0x7f, 0xfd, 0xd7, 0x1b, 0xa4, - 0xbe, 0x5d, 0xf7, 0xb4, 0x58, 0xd3, 0x39, 0x1e, 0xc7, 0xb2, 0xe7, 0xec, 0xa8, 0x0f, 0x6c, 0xaa, - 0xd8, 0xc7, 0xa8, 0xbe, 0x37, 0x14, 0xb2, 0xa8, 0xa8, 0x5a, 0x5f, 0xf4, 0xb7, 0x7f, 0xce, 0xd6, - 0xfb, 0xff, 0xa8, 0x38, 0x14, 0x52, 0xa6, 0x97, 0x51, 0x67, 0x3f, 0x55, 0x55, 0xb7, 0x5c, 0xb5, - 0x7c, 0x60, 0x05, 0xba, 0x94, 0xed, 0xcc, 0x5b, 0x7d, 0x3f, 0x9c, 0x44, 0xf8, 0x95, 0xba, 0x2e, - 0x7e, 0x2b, 0x9f, 0xad, 0x37, 0xf7, 0x53, 0x93, 0x37, 0xad, 0xa8, 0xc8, 0xaf, 0xa3, 0x5a, 0xd9, - 0xaa, 0xff, 0xf6, 0x36, 0x23, 0xd6, 0x34, 0x23, 0xd6, 0xd7, 0x8c, 0x58, 0x77, 0x19, 0x81, 0xfb, - 0x8c, 0xc0, 0x43, 0x46, 0xe0, 0x26, 0x27, 0xf0, 0x29, 0x27, 0xf0, 0x39, 0x27, 0xf0, 0x25, 0x27, - 0x70, 0x9b, 0x13, 0x98, 0xe6, 0x04, 0xee, 0x72, 0x02, 0x3f, 0x72, 0x62, 0xdd, 0xe7, 0x04, 0x1e, - 0x72, 0x62, 0xdd, 0x7c, 0x27, 0xd6, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x65, 0xb5, 0xca, - 0x75, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto deleted file mode 100644 index a72dde02f..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/one.proto +++ /dev/null @@ -1,103 +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 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/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go deleted file mode 100644 index 82925d0cf..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/both/onepb_test.go +++ /dev/null @@ -1,741 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go deleted file mode 100644 index cd8cb3db3..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.pb.go +++ /dev/null @@ -1,4565 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/one.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import binary "encoding/binary" - -// 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 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() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []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 - } -} - -func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *AllTypesOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *AllTypesOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *AllTypesOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *AllTypesOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *AllTypesOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } - -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,json=subMessage2,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), func(msg proto.Message) (n int), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []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 - } -} - -func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *TwoOneofs_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *TwoOneofs_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field34))) - n += len(x.Field34) - case *TwoOneofs_Field35: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field35))) - n += len(x.Field35) - case *TwoOneofs_SubMessage2: - s := proto.Size(x.SubMessage2) - n += proto.SizeVarint(36<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } - -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), func(msg proto.Message) (n int), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []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 _CustomOneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Stringy))) - n += len(x.Stringy) - case *CustomOneof_CustomType: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(x.CustomType.Size())) - n += x.CustomType.Size() - case *CustomOneof_CastType: - n += proto.SizeVarint(36<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - n += proto.SizeVarint(37<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.MyCustomName)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4151 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x6b, 0x6c, 0x1c, 0xd7, - 0x75, 0xe6, 0xec, 0x83, 0xdc, 0x3d, 0xbb, 0x5c, 0x0e, 0x2f, 0x69, 0x69, 0x45, 0xc7, 0x2b, 0x69, - 0x6d, 0x47, 0xb4, 0x1d, 0x93, 0x36, 0x45, 0xea, 0xb1, 0x6a, 0xe2, 0x2e, 0xc9, 0x15, 0x45, 0x95, - 0xe4, 0x32, 0x43, 0x32, 0x7e, 0x04, 0xc5, 0x60, 0x38, 0x7b, 0xb9, 0x1c, 0x69, 0x76, 0x66, 0x32, - 0x33, 0x2b, 0x99, 0x42, 0x7f, 0xa8, 0x70, 0x1f, 0x08, 0x8a, 0xbe, 0xd2, 0x02, 0x49, 0x5c, 0xc7, - 0x7d, 0x00, 0xad, 0xd3, 0xf4, 0x95, 0x34, 0x6d, 0x9a, 0xf6, 0x57, 0xff, 0xa4, 0xf5, 0xaf, 0xc2, - 0xf9, 0x57, 0x14, 0x85, 0x61, 0x31, 0x06, 0x9a, 0xb6, 0x6e, 0xe3, 0xb6, 0xfe, 0x61, 0xc4, 0x7f, - 0x8a, 0xfb, 0x9a, 0x99, 0x7d, 0x50, 0xb3, 0x0c, 0x62, 0xe7, 0x17, 0x39, 0xe7, 0x9c, 0xef, 0x9b, - 0x73, 0xcf, 0x3d, 0xf7, 0x9c, 0x7b, 0xef, 0x0e, 0xfc, 0xe0, 0x32, 0x9c, 0x69, 0xda, 0x76, 0xd3, - 0xc4, 0xb3, 0x8e, 0x6b, 0xfb, 0xf6, 0x6e, 0x7b, 0x6f, 0xb6, 0x81, 0x3d, 0xdd, 0x35, 0x1c, 0xdf, - 0x76, 0x67, 0xa8, 0x0c, 0x8d, 0x31, 0x8b, 0x19, 0x61, 0x51, 0x5e, 0x87, 0xf1, 0xab, 0x86, 0x89, - 0x97, 0x03, 0xc3, 0x2d, 0xec, 0xa3, 0x4b, 0x90, 0xda, 0x33, 0x4c, 0x5c, 0x94, 0xce, 0x24, 0xa7, - 0x73, 0x73, 0x8f, 0xcc, 0x74, 0x81, 0x66, 0x3a, 0x11, 0x9b, 0x44, 0xac, 0x50, 0x44, 0xf9, 0xed, - 0x14, 0x4c, 0xf4, 0xd1, 0x22, 0x04, 0x29, 0x4b, 0x6b, 0x11, 0x46, 0x69, 0x3a, 0xab, 0xd0, 0xff, - 0x51, 0x11, 0x46, 0x1c, 0x4d, 0xbf, 0xa9, 0x35, 0x71, 0x31, 0x41, 0xc5, 0xe2, 0x11, 0x95, 0x00, - 0x1a, 0xd8, 0xc1, 0x56, 0x03, 0x5b, 0xfa, 0x41, 0x31, 0x79, 0x26, 0x39, 0x9d, 0x55, 0x22, 0x12, - 0xf4, 0x04, 0x8c, 0x3b, 0xed, 0x5d, 0xd3, 0xd0, 0xd5, 0x88, 0x19, 0x9c, 0x49, 0x4e, 0xa7, 0x15, - 0x99, 0x29, 0x96, 0x43, 0xe3, 0x73, 0x30, 0x76, 0x1b, 0x6b, 0x37, 0xa3, 0xa6, 0x39, 0x6a, 0x5a, - 0x20, 0xe2, 0x88, 0xe1, 0x12, 0xe4, 0x5b, 0xd8, 0xf3, 0xb4, 0x26, 0x56, 0xfd,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 0xae, 0x6e, 0xad, 0x2e, 0xd7, 0xd4, - 0xda, 0xd5, 0xab, 0xb5, 0xa5, 0xed, 0x2d, 0x76, 0x03, 0x11, 0x58, 0x6f, 0x77, 0x2e, 0xea, 0x97, - 0x93, 0x30, 0xd1, 0xc7, 0x13, 0x54, 0xe5, 0x67, 0x07, 0x76, 0x9c, 0x79, 0x72, 0x10, 0xef, 0x67, - 0x48, 0xcb, 0xdf, 0xd4, 0x5c, 0x9f, 0x1f, 0x35, 0x1e, 0x03, 0x12, 0x25, 0xcb, 0x37, 0xf6, 0x0c, - 0xec, 0xf2, 0x0b, 0x1b, 0x76, 0xa0, 0x18, 0x0b, 0xe5, 0xec, 0xce, 0xe6, 0x13, 0x80, 0x1c, 0xdb, - 0x33, 0x7c, 0xe3, 0x16, 0x56, 0x0d, 0x4b, 0xdc, 0xee, 0x90, 0x03, 0x46, 0x4a, 0x91, 0x85, 0x66, - 0xd5, 0xf2, 0x03, 0x6b, 0x0b, 0x37, 0xb5, 0x2e, 0x6b, 0x52, 0xc0, 0x93, 0x8a, 0x2c, 0x34, 0x81, - 0xf5, 0x59, 0xc8, 0x37, 0xec, 0x36, 0xd9, 0x75, 0x31, 0x3b, 0xd2, 0x2f, 0x24, 0x25, 0xc7, 0x64, - 0x81, 0x09, 0xdf, 0x4f, 0x87, 0xd7, 0x4a, 0x79, 0x25, 0xc7, 0x64, 0xcc, 0xe4, 0x1c, 0x8c, 0x69, - 0xcd, 0xa6, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0x14, 0x02, 0x31, 0x35, 0x9c, 0xba, 0x0e, 0x19, - 0x11, 0x07, 0xd2, 0x92, 0x49, 0x24, 0x54, 0x87, 0x1d, 0x7b, 0x13, 0xd3, 0x59, 0x25, 0x63, 0x09, - 0xe5, 0x59, 0xc8, 0x1b, 0x9e, 0x1a, 0xde, 0x92, 0x27, 0xce, 0x24, 0xa6, 0x33, 0x4a, 0xce, 0xf0, - 0x82, 0x1b, 0xc6, 0xf2, 0x6b, 0x09, 0x28, 0x74, 0xde, 0xf2, 0xa3, 0x65, 0xc8, 0x98, 0xb6, 0xae, - 0xd1, 0xd4, 0x62, 0x3f, 0x31, 0x4d, 0xc7, 0xfc, 0x30, 0x30, 0xb3, 0xc6, 0xed, 0x95, 0x00, 0x39, - 0xf5, 0x4f, 0x12, 0x64, 0x84, 0x18, 0x9d, 0x80, 0x94, 0xa3, 0xf9, 0xfb, 0x94, 0x2e, 0xbd, 0x98, - 0x90, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0x68, 0x16, 0x4d, 0x01, 0x2e, 0x27, 0xcf, 0x64, 0x5e, - 0x4d, 0xac, 0x35, 0xe8, 0xf1, 0xc3, 0x6e, 0xb5, 0xb0, 0xe5, 0x7b, 0x62, 0x5e, 0xb9, 0x7c, 0x89, - 0x8b, 0xd1, 0x13, 0x30, 0xee, 0xbb, 0x9a, 0x61, 0x76, 0xd8, 0xa6, 0xa8, 0xad, 0x2c, 0x14, 0x81, - 0x71, 0x05, 0x4e, 0x09, 0xde, 0x06, 0xf6, 0x35, 0x7d, 0x1f, 0x37, 0x42, 0xd0, 0x30, 0xbd, 0x66, - 0x38, 0xc9, 0x0d, 0x96, 0xb9, 0x5e, 0x60, 0xcb, 0xdf, 0x95, 0x60, 0x5c, 0x1c, 0x98, 0x1a, 0x41, - 0xb0, 0xd6, 0x01, 0x34, 0xcb, 0xb2, 0xfd, 0x68, 0xb8, 0x7a, 0x53, 0xb9, 0x07, 0x37, 0x53, 0x0d, - 0x40, 0x4a, 0x84, 0x60, 0xaa, 0x05, 0x10, 0x6a, 0x8e, 0x0c, 0xdb, 0x69, 0xc8, 0xf1, 0x9f, 0x70, - 0xe8, 0xef, 0x80, 0xec, 0x88, 0x0d, 0x4c, 0x44, 0x4e, 0x56, 0x68, 0x12, 0xd2, 0xbb, 0xb8, 0x69, - 0x58, 0xfc, 0x62, 0x96, 0x3d, 0x88, 0x8b, 0x90, 0x54, 0x70, 0x11, 0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58, 0x1a, 0xba, 0xfb, 0xbd, 0xd2, 0xd0, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x22, - 0xda, 0x5f, 0x5b, 0x09, 0x35, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) - i += 4 - return i, nil -} -func (m *AllTypesOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) - i += 8 - return i, nil -} -func (m *AllTypesOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - return i, nil -} -func (m *TwoOneofs_Field2) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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 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 := string(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 = string(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 = string(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 = string(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 init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 601 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x4f, 0xdb, 0x4e, - 0x14, 0x00, 0xf0, 0x7b, 0x84, 0x84, 0x70, 0x09, 0x5f, 0xf2, 0xf5, 0x74, 0x65, 0x38, 0x4e, 0x69, - 0x2b, 0xdd, 0x50, 0x12, 0xe2, 0x24, 0xfc, 0x18, 0x6b, 0xaa, 0x2a, 0x0b, 0x45, 0x32, 0x30, 0xa3, - 0x98, 0x1e, 0x21, 0x52, 0xe2, 0x43, 0x39, 0x5b, 0xc8, 0x1b, 0x7f, 0x43, 0xff, 0x8a, 0x8e, 0x1d, - 0xfb, 0x27, 0x30, 0x32, 0x56, 0x1d, 0x22, 0xec, 0x2e, 0x1d, 0x19, 0x51, 0xa7, 0xea, 0x6c, 0x72, - 0x57, 0xa9, 0xaa, 0xba, 0x74, 0x8a, 0xdf, 0xfb, 0xf8, 0x5e, 0xde, 0xf3, 0xdd, 0xe1, 0x8d, 0x73, - 0x39, 0x0d, 0xa4, 0x6a, 0x4f, 0x87, 0x33, 0x75, 0x39, 0x9c, 0x88, 0x59, 0x5b, 0x86, 0xa2, 0x75, - 0x35, 0x93, 0x91, 0x74, 0x4a, 0x32, 0x14, 0x1b, 0x5b, 0xa3, 0x71, 0x74, 0x19, 0x07, 0xad, 0x73, - 0x39, 0x6d, 0x8f, 0xe4, 0x48, 0xb6, 0x73, 0x0b, 0xe2, 0x8b, 0x3c, 0xca, 0x83, 0xfc, 0xa9, 0x58, - 0xd3, 0x7c, 0x86, 0xcb, 0xc7, 0x71, 0x10, 0x24, 0x4e, 0x03, 0x97, 0x54, 0x1c, 0x10, 0x60, 0xc0, - 0x57, 0x7d, 0xfd, 0xd8, 0x9c, 0x97, 0xf0, 0xda, 0xeb, 0xc9, 0xe4, 0x24, 0xb9, 0x12, 0xea, 0x28, - 0x14, 0x47, 0x17, 0x0e, 0xc1, 0x95, 0xb7, 0x63, 0x31, 0x79, 0xdf, 0xc9, 0x5f, 0x83, 0x01, 0xf2, - 0x9f, 0x62, 0x23, 0x2e, 0x59, 0x62, 0xc0, 0x97, 0x8c, 0xb8, 0x46, 0xba, 0xa4, 0xc4, 0x80, 0x97, - 0x8d, 0x74, 0x8d, 0xf4, 0xc8, 0x32, 0x03, 0x5e, 0x32, 0xd2, 0x33, 0xd2, 0x27, 0x65, 0x06, 0x7c, - 0xcd, 0x48, 0xdf, 0xc8, 0x0e, 0xa9, 0x30, 0xe0, 0xcb, 0x46, 0x76, 0x8c, 0xec, 0x92, 0x15, 0x06, - 0xfc, 0x7f, 0x23, 0xbb, 0x46, 0xf6, 0x48, 0x95, 0x01, 0x77, 0x8c, 0xec, 0x19, 0xd9, 0x27, 0xab, - 0x0c, 0xf8, 0x8a, 0x91, 0x7d, 0x67, 0x03, 0xaf, 0x14, 0x93, 0x6d, 0x13, 0xcc, 0x80, 0xaf, 0x0f, - 0x90, 0xbf, 0x48, 0x58, 0xeb, 0x90, 0x1a, 0x03, 0x5e, 0xb1, 0xd6, 0xb1, 0xe6, 0x92, 0x3a, 0x03, - 0xde, 0xb0, 0xe6, 0x5a, 0xeb, 0x92, 0x35, 0x06, 0xbc, 0x6a, 0xad, 0x6b, 0xad, 0x47, 0xfe, 0xd3, - 0x3b, 0x60, 0xad, 0x67, 0xad, 0x4f, 0xd6, 0x19, 0xf0, 0xba, 0xb5, 0xbe, 0xb3, 0x85, 0x6b, 0x2a, - 0x0e, 0xce, 0xa6, 0x42, 0xa9, 0xe1, 0x48, 0x90, 0x06, 0x03, 0x5e, 0x73, 0x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x41, 0x5e, 0xea, 0xeb, 0xe2, 0x35, 0xb2, 0xf9, 0x66, 0xfd, 0x30, 0xb1, 0x79, 0xdb, 0x8a, - 0x8e, 0xbc, 0x2a, 0xae, 0x14, 0xad, 0x7a, 0x6f, 0x6e, 0x53, 0x8a, 0xee, 0x52, 0x8a, 0xbe, 0xa4, - 0x14, 0xdd, 0xa7, 0x14, 0x1e, 0x52, 0x0a, 0x8f, 0x29, 0x85, 0x9b, 0x8c, 0xc2, 0xc7, 0x8c, 0xc2, - 0xa7, 0x8c, 0xc2, 0xe7, 0x8c, 0xc2, 0x6d, 0x46, 0xe1, 0x2e, 0xa3, 0xe8, 0x3e, 0xa3, 0xf0, 0x3d, - 0xa3, 0xe8, 0x21, 0xa3, 0xf0, 0x98, 0x51, 0x74, 0xf3, 0x8d, 0xa2, 0x9f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0xcf, 0xa5, 0xfc, 0x33, 0x7a, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto deleted file mode 100644 index d9a8204e2..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/one.proto +++ /dev/null @@ -1,103 +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 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/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go deleted file mode 100644 index 4e8b9e773..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/marshaler/onepb_test.go +++ /dev/null @@ -1,741 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go deleted file mode 100644 index c0e2b5164..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.pb.go +++ /dev/null @@ -1,4193 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/one.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -// 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 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() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []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 - } -} - -func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *AllTypesOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *AllTypesOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *AllTypesOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *AllTypesOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *AllTypesOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } - -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,json=subMessage2,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), func(msg proto.Message) (n int), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []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 - } -} - -func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *TwoOneofs_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *TwoOneofs_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field34))) - n += len(x.Field34) - case *TwoOneofs_Field35: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field35))) - n += len(x.Field35) - case *TwoOneofs_SubMessage2: - s := proto.Size(x.SubMessage2) - n += proto.SizeVarint(36<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } - -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), func(msg proto.Message) (n int), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []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 _CustomOneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Stringy))) - n += len(x.Stringy) - case *CustomOneof_CustomType: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(x.CustomType.Size())) - n += x.CustomType.Size() - case *CustomOneof_CastType: - n += proto.SizeVarint(36<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - n += proto.SizeVarint(37<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.MyCustomName)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4154 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 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, - 0x73, 0x73, 0x8f, 0xcc, 0x74, 0x81, 0x66, 0x3a, 0x11, 0x9b, 0x44, 0xac, 0x50, 0x44, 0xf9, 0xed, - 0x14, 0x4c, 0xf4, 0xd1, 0x22, 0x04, 0x29, 0x4b, 0x6b, 0x11, 0x46, 0x69, 0x3a, 0xab, 0xd0, 0xff, - 0x51, 0x11, 0x46, 0x1c, 0x4d, 0xbf, 0xa9, 0x35, 0x71, 0x31, 0x41, 0xc5, 0xe2, 0x11, 0x95, 0x00, - 0x1a, 0xd8, 0xc1, 0x56, 0x03, 0x5b, 0xfa, 0x41, 0x31, 0x79, 0x26, 0x39, 0x9d, 0x55, 0x22, 0x12, - 0xf4, 0x04, 0x8c, 0x3b, 0xed, 0x5d, 0xd3, 0xd0, 0xd5, 0x88, 0x19, 0x9c, 0x49, 0x4e, 0xa7, 0x15, - 0x99, 0x29, 0x96, 0x43, 0xe3, 0x73, 0x30, 0x76, 0x1b, 0x6b, 0x37, 0xa3, 0xa6, 0x39, 0x6a, 0x5a, - 0x20, 0xe2, 0x88, 0xe1, 0x12, 0xe4, 0x5b, 0xd8, 0xf3, 0xb4, 0x26, 0x56, 0xfd, 0x03, 0x07, 0x17, - 0x53, 0x74, 0xf4, 0x67, 0x7a, 0x46, 0xdf, 0x3d, 0xf2, 0x1c, 0x47, 0x6d, 0x1f, 0x38, 0x18, 0x55, - 0x21, 0x8b, 0xad, 0x76, 0x8b, 0x31, 0xa4, 0x8f, 0x88, 0x5f, 0xcd, 0x6a, 0xb7, 0xba, 0x59, 0x32, - 0x04, 0xc6, 0x29, 0x46, 0x3c, 0xec, 0xde, 0x32, 0x74, 0x5c, 0x1c, 0xa6, 0x04, 0xe7, 0x7a, 0x08, - 0xb6, 0x98, 0xbe, 0x9b, 0x43, 0xe0, 0xd0, 0x12, 0x64, 0xf1, 0x8b, 0x3e, 0xb6, 0x3c, 0xc3, 0xb6, - 0x8a, 0x23, 0x94, 0xe4, 0xd1, 0x3e, 0xb3, 0x88, 0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 0x7f, 0xdf, 0x3c, 0x7d, 0x3e, 0x86, 0x91, 0x17, 0xc7, 0x99, 0xf5, 0x03, 0xc2, 0x7a, - 0x61, 0x9e, 0xc0, 0xaf, 0x0d, 0x29, 0x01, 0x15, 0x9a, 0x13, 0xae, 0x6e, 0x68, 0x2d, 0xf6, 0xf1, - 0x4e, 0x72, 0x51, 0x3e, 0x7c, 0xf3, 0x74, 0x7e, 0xfd, 0x20, 0x94, 0x87, 0xae, 0x90, 0xa7, 0xc5, - 0x0c, 0x0c, 0x33, 0x57, 0x17, 0x97, 0x5f, 0xbf, 0x57, 0x1a, 0x7a, 0xe3, 0x5e, 0x69, 0xe8, 0x1f, - 0xef, 0x95, 0x86, 0xde, 0xba, 0x57, 0x92, 0xde, 0xbd, 0x57, 0x92, 0xde, 0xbf, 0x57, 0x92, 0xee, - 0x1e, 0x96, 0xa4, 0xaf, 0x1f, 0x96, 0xa4, 0x6f, 0x1e, 0x96, 0xa4, 0xef, 0x1e, 0x96, 0xa4, 0xd7, - 0x0f, 0x4b, 0x43, 0x6f, 0x1c, 0x96, 0x86, 0xde, 0x3a, 0x2c, 0x49, 0x3f, 0x3c, 0x2c, 0x0d, 0xbd, - 0x7b, 0x58, 0x92, 0xde, 0x3f, 0x2c, 0x0d, 0xdd, 0xfd, 0x41, 0x69, 0xe8, 0xff, 0x02, 0x00, 0x00, - 0xff, 0xff, 0x9f, 0x8a, 0x0d, 0x05, 0x07, 0x35, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := string(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 = string(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 = string(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 = string(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 init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 598 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0xbf, 0x4f, 0x1b, 0x3f, - 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0x70, 0xc2, 0x97, 0x7c, 0x6f, 0x72, 0x19, 0x8c, 0x95, 0xb6, - 0x92, 0x87, 0x92, 0x90, 0x4b, 0xc2, 0x8f, 0xb1, 0x47, 0x55, 0x65, 0xa1, 0x48, 0x07, 0xcc, 0x28, - 0x47, 0x4d, 0x88, 0x44, 0xce, 0x08, 0xfb, 0x84, 0xb2, 0xf1, 0x37, 0xf4, 0xaf, 0xe8, 0xd8, 0xb1, - 0x7f, 0x02, 0x23, 0x63, 0xd5, 0x21, 0xe2, 0xae, 0x4b, 0x47, 0x46, 0xd4, 0xa9, 0xf2, 0x1d, 0xb1, - 0x2b, 0x55, 0x55, 0x97, 0x4e, 0xb9, 0xf7, 0x3e, 0xe7, 0x97, 0xf7, 0xce, 0x36, 0x26, 0xa7, 0x72, - 0x12, 0x49, 0xd5, 0x8e, 0xc5, 0x58, 0x9f, 0x8b, 0xab, 0xb6, 0x8c, 0x45, 0xeb, 0xf2, 0x4a, 0x6a, - 0xe9, 0x95, 0x64, 0x2c, 0xd6, 0x36, 0x46, 0x63, 0x7d, 0x9e, 0x44,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 0x8a, 0x43, 0xa5, 0xf5, 0xf4, 0x52, 0xb4, 0xf6, 0xa7, 0xa6, 0xea, - 0x56, 0xcf, 0x2c, 0x1f, 0xa0, 0xd0, 0x96, 0xf2, 0xfc, 0x79, 0xab, 0xef, 0x86, 0x13, 0x41, 0x5e, - 0x9a, 0xeb, 0x12, 0x34, 0xb2, 0xd9, 0x7a, 0x7d, 0x7f, 0xea, 0xf2, 0xae, 0x15, 0x13, 0x05, 0x55, - 0x5c, 0x29, 0x5a, 0x0d, 0xde, 0xdc, 0xa6, 0x14, 0xdd, 0xa5, 0x14, 0x7d, 0x49, 0x29, 0xba, 0x4f, - 0x29, 0x3c, 0xa4, 0x14, 0x1e, 0x53, 0x0a, 0x37, 0x19, 0x85, 0x8f, 0x19, 0x85, 0x4f, 0x19, 0x85, - 0xcf, 0x19, 0x85, 0xdb, 0x8c, 0xa2, 0xbb, 0x8c, 0xa2, 0xfb, 0x8c, 0xc2, 0xf7, 0x8c, 0xa2, 0x87, - 0x8c, 0xc2, 0x63, 0x46, 0xd1, 0xcd, 0x37, 0x8a, 0x7e, 0x06, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x27, - 0x4d, 0xb9, 0x78, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto deleted file mode 100644 index 66d4b4496..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/one.proto +++ /dev/null @@ -1,103 +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 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/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go deleted file mode 100644 index 14b202521..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/neither/onepb_test.go +++ /dev/null @@ -1,629 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go deleted file mode 100644 index 8c0f6c592..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.pb.go +++ /dev/null @@ -1,5069 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/one.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import io "io" -import binary "encoding/binary" - -// 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 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() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*AllTypesOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _AllTypesOneOf_OneofMarshaler, _AllTypesOneOf_OneofUnmarshaler, _AllTypesOneOf_OneofSizer, []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 - } -} - -func _AllTypesOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*AllTypesOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *AllTypesOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *AllTypesOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *AllTypesOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *AllTypesOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *AllTypesOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *AllTypesOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *AllTypesOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *AllTypesOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *AllTypesOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *AllTypesOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *AllTypesOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *AllTypesOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*TwoOneofs) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{2} } - -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,json=subMessage2,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), func(msg proto.Message) (n int), []interface{}) { - return _TwoOneofs_OneofMarshaler, _TwoOneofs_OneofUnmarshaler, _TwoOneofs_OneofSizer, []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 - } -} - -func _TwoOneofs_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TwoOneofs) - // one - switch x := m.One.(type) { - case *TwoOneofs_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *TwoOneofs_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *TwoOneofs_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // two - switch x := m.Two.(type) { - case *TwoOneofs_Field34: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field34))) - n += len(x.Field34) - case *TwoOneofs_Field35: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field35))) - n += len(x.Field35) - case *TwoOneofs_SubMessage2: - s := proto.Size(x.SubMessage2) - n += proto.SizeVarint(36<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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() {} -func (*CustomOneof) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{3} } - -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), func(msg proto.Message) (n int), []interface{}) { - return _CustomOneof_OneofMarshaler, _CustomOneof_OneofUnmarshaler, _CustomOneof_OneofSizer, []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 _CustomOneof_OneofSizer(msg proto.Message) (n int) { - m := msg.(*CustomOneof) - // custom - switch x := m.Custom.(type) { - case *CustomOneof_Stringy: - n += proto.SizeVarint(34<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Stringy))) - n += len(x.Stringy) - case *CustomOneof_CustomType: - n += proto.SizeVarint(35<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(x.CustomType.Size())) - n += x.CustomType.Size() - case *CustomOneof_CastType: - n += proto.SizeVarint(36<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.CastType)) - case *CustomOneof_MyCustomName: - n += proto.SizeVarint(37<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.MyCustomName)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 4154 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x7a, 0x6b, 0x6c, 0x1c, 0xd7, - 0x75, 0x3f, 0x67, 0x1f, 0xe4, 0xee, 0xd9, 0xe5, 0x72, 0x78, 0x49, 0x4b, 0x2b, 0xda, 0x5e, 0x49, - 0x6b, 0x3b, 0xa2, 0xed, 0x98, 0xb4, 0x29, 0x52, 0x8f, 0xd5, 0x3f, 0xf1, 0x7f, 0x49, 0xae, 0x28, - 0xaa, 0x24, 0x97, 0x19, 0x92, 0xf1, 0x23, 0x28, 0x06, 0xc3, 0xd9, 0xcb, 0xe5, 0x48, 0xb3, 0x33, - 0x93, 0x99, 0x59, 0xc9, 0x14, 0xfa, 0x41, 0x85, 0xfb, 0x40, 0x50, 0xf4, 0x95, 0x16, 0x48, 0xe2, - 0x3a, 0xee, 0x03, 0x68, 0x9d, 0xa6, 0xaf, 0xa4, 0x69, 0xd3, 0xb4, 0x9f, 0xfa, 0x25, 0xad, 0x3f, - 0x15, 0xce, 0xb7, 0xa2, 0x28, 0x0c, 0x8b, 0x31, 0xd0, 0xb4, 0x75, 0x1b, 0xb7, 0xf5, 0x07, 0xa3, - 0xee, 0x87, 0xe2, 0xbe, 0x66, 0x66, 0x1f, 0xd4, 0x2c, 0x83, 0xda, 0xf9, 0x44, 0xce, 0x39, 0xe7, - 0xf7, 0x9b, 0x73, 0xcf, 0x3d, 0xf7, 0x9c, 0x7b, 0xef, 0x0e, 0xfc, 0xf0, 0x32, 0x9c, 0x69, 0xda, - 0x76, 0xd3, 0xc4, 0xb3, 0x8e, 0x6b, 0xfb, 0xf6, 0x6e, 0x7b, 0x6f, 0xb6, 0x81, 0x3d, 0xdd, 0x35, - 0x1c, 0xdf, 0x76, 0x67, 0xa8, 0x0c, 0x8d, 0x31, 0x8b, 0x19, 0x61, 0x51, 0x5e, 0x87, 0xf1, 0xab, - 0x86, 0x89, 0x97, 0x03, 0xc3, 0x2d, 0xec, 0xa3, 0x4b, 0x90, 0xda, 0x33, 0x4c, 0x5c, 0x94, 0xce, - 0x24, 0xa7, 0x73, 0x73, 0x8f, 0xce, 0x74, 0x81, 0x66, 0x3a, 0x11, 0x9b, 0x44, 0xac, 0x50, 0x44, - 0xf9, 0x9d, 0x14, 0x4c, 0xf4, 0xd1, 0x22, 0x04, 0x29, 0x4b, 0x6b, 0x11, 0x46, 0x69, 0x3a, 0xab, - 0xd0, 0xff, 0x51, 0x11, 0x46, 0x1c, 0x4d, 0xbf, 0xa9, 0x35, 0x71, 0x31, 0x41, 0xc5, 0xe2, 0x11, - 0x95, 0x00, 0x1a, 0xd8, 0xc1, 0x56, 0x03, 0x5b, 0xfa, 0x41, 0x31, 0x79, 0x26, 0x39, 0x9d, 0x55, - 0x22, 0x12, 0xf4, 0x24, 0x8c, 0x3b, 0xed, 0x5d, 0xd3, 0xd0, 0xd5, 0x88, 0x19, 0x9c, 0x49, 0x4e, - 0xa7, 0x15, 0x99, 0x29, 0x96, 0x43, 0xe3, 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 0x29, 0x76, - 0x05, 0xd2, 0x7b, 0x64, 0x94, 0xc5, 0xc4, 0x71, 0x62, 0xc0, 0x30, 0x9d, 0x41, 0x1c, 0xfe, 0x11, - 0x83, 0x58, 0x85, 0x9c, 0x85, 0x3d, 0x1f, 0x37, 0x58, 0x46, 0x24, 0x07, 0xcc, 0x29, 0x60, 0xa0, - 0xde, 0x94, 0x4a, 0xfd, 0x48, 0x29, 0xf5, 0x3c, 0x8c, 0x05, 0x2e, 0xa9, 0xae, 0x66, 0x35, 0x45, - 0x6e, 0xce, 0xc6, 0x79, 0x32, 0x53, 0x13, 0x38, 0x85, 0xc0, 0x94, 0x02, 0xee, 0x78, 0x46, 0xcb, - 0x00, 0xb6, 0x85, 0xed, 0x3d, 0xb5, 0x81, 0x75, 0xb3, 0x98, 0x39, 0x22, 0x4a, 0x75, 0x62, 0xd2, - 0x13, 0x25, 0x9b, 0x49, 0x75, 0x13, 0x5d, 0x0e, 0x53, 0x6d, 0xe4, 0x88, 0x4c, 0x59, 0x67, 0x8b, - 0xac, 0x27, 0xdb, 0x76, 0xa0, 0xe0, 0x62, 0x92, 0xf7, 0xb8, 0xc1, 0x47, 0x96, 0xa5, 0x4e, 0xcc, - 0xc4, 0x8e, 0x4c, 0xe1, 0x30, 0x36, 0xb0, 0x51, 0x37, 0xfa, 0x88, 0x1e, 0x81, 0x40, 0xa0, 0xd2, - 0xb4, 0x02, 0x5a, 0x85, 0xf2, 0x42, 0xb8, 0xa1, 0xb5, 0xf0, 0xd4, 0x1d, 0x28, 0x74, 0x86, 0x07, - 0x4d, 0x42, 0xda, 0xf3, 0x35, 0xd7, 0xa7, 0x59, 0x98, 0x56, 0xd8, 0x03, 0x92, 0x21, 0x89, 0xad, - 0x06, 0xad, 0x72, 0x69, 0x85, 0xfc, 0x8b, 0xfe, 0x7f, 0x38, 0xe0, 0x24, 0x1d, 0xf0, 0x27, 0x7a, - 0x67, 0xb4, 0x83, 0xb9, 0x7b, 0xdc, 0x53, 0x17, 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, 0x74, 0x99, 0x7d, 0x84, 0x4b, 0x7d, 0x13, 0xe4, 0x6e, - 0xa7, 0xd0, 0x49, 0xe8, 0xe7, 0x96, 0x3c, 0x84, 0x26, 0x60, 0x6c, 0xa3, 0xae, 0x6e, 0xad, 0x2e, - 0xd7, 0xd4, 0xda, 0xd5, 0xab, 0xb5, 0xa5, 0xed, 0x2d, 0x76, 0x03, 0x11, 0x58, 0x6f, 0x77, 0x2e, - 0xea, 0x57, 0x92, 0x30, 0xd1, 0xc7, 0x13, 0x54, 0xe5, 0x67, 0x07, 0x76, 0x9c, 0x79, 0x6a, 0x10, - 0xef, 0x67, 0x48, 0xcb, 0xdf, 0xd4, 0x5c, 0x9f, 0x1f, 0x35, 0x1e, 0x07, 0x12, 0x25, 0xcb, 0x37, - 0xf6, 0x0c, 0xec, 0xf2, 0x0b, 0x1b, 0x76, 0xa0, 0x18, 0x0b, 0xe5, 0xec, 0xce, 0xe6, 0x93, 0x80, - 0x1c, 0xdb, 0x33, 0x7c, 0xe3, 0x16, 0x56, 0x0d, 0x4b, 0xdc, 0xee, 0x90, 0x03, 0x46, 0x4a, 0x91, - 0x85, 0x66, 0xd5, 0xf2, 0x03, 0x6b, 0x0b, 0x37, 0xb5, 0x2e, 0x6b, 0x52, 0xc0, 0x93, 0x8a, 0x2c, - 0x34, 0x81, 0xf5, 0x59, 0xc8, 0x37, 0xec, 0x36, 0xd9, 0x75, 0x31, 0x3b, 0xd2, 0x2f, 0x24, 0x25, - 0xc7, 0x64, 0x81, 0x09, 0xdf, 0x4f, 0x87, 0xd7, 0x4a, 0x79, 0x25, 0xc7, 0x64, 0xcc, 0xe4, 0x1c, - 0x8c, 0x69, 0xcd, 0xa6, 0x4b, 0xc8, 0x05, 0x11, 0x3b, 0x21, 0x14, 0x02, 0x31, 0x35, 0x9c, 0xba, - 0x0e, 0x19, 0x11, 0x07, 0xd2, 0x92, 0x49, 0x24, 0x54, 0x87, 0x1d, 0x7b, 0x13, 0xd3, 0x59, 0x25, - 0x63, 0x09, 0xe5, 0x59, 0xc8, 0x1b, 0x9e, 0x1a, 0xde, 0x92, 0x27, 0xce, 0x24, 0xa6, 0x33, 0x4a, - 0xce, 0xf0, 0x82, 0x1b, 0xc6, 0xf2, 0xeb, 0x09, 0x28, 0x74, 0xde, 0xf2, 0xa3, 0x65, 0xc8, 0x98, - 0xb6, 0xae, 0xd1, 0xd4, 0x62, 0x3f, 0x31, 0x4d, 0xc7, 0xfc, 0x30, 0x30, 0xb3, 0xc6, 0xed, 0x95, - 0x00, 0x39, 0xf5, 0x77, 0x12, 0x64, 0x84, 0x18, 0x9d, 0x80, 0x94, 0xa3, 0xf9, 0xfb, 0x94, 0x2e, - 0xbd, 0x98, 0x90, 0x25, 0x85, 0x3e, 0x13, 0xb9, 0xe7, 0x68, 0x16, 0x4d, 0x01, 0x2e, 0x27, 0xcf, - 0x64, 0x5e, 0x4d, 0xac, 0x35, 0xe8, 0xf1, 0xc3, 0x6e, 0xb5, 0xb0, 0xe5, 0x7b, 0x62, 0x5e, 0xb9, - 0x7c, 0x89, 0x8b, 0xd1, 0x93, 0x30, 0xee, 0xbb, 0x9a, 0x61, 0x76, 0xd8, 0xa6, 0xa8, 0xad, 0x2c, - 0x14, 0x81, 0x71, 0x05, 0x4e, 0x09, 0xde, 0x06, 0xf6, 0x35, 0x7d, 0x1f, 0x37, 0x42, 0xd0, 0x30, - 0xbd, 0x66, 0x38, 0xc9, 0x0d, 0x96, 0xb9, 0x5e, 0x60, 0xcb, 0xdf, 0x93, 0x60, 0x5c, 0x1c, 0x98, - 0x1a, 0x41, 0xb0, 0xd6, 0x01, 0x34, 0xcb, 0xb2, 0xfd, 0x68, 0xb8, 0x7a, 0x53, 0xb9, 0x07, 0x37, - 0x53, 0x0d, 0x40, 0x4a, 0x84, 0x60, 0xaa, 0x05, 0x10, 0x6a, 0x8e, 0x0c, 0xdb, 0x69, 0xc8, 0xf1, - 0x9f, 0x70, 0xe8, 0xef, 0x80, 0xec, 0x88, 0x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0x2c, 0x49, 0x6f, - 0x1c, 0x96, 0x86, 0xde, 0x3c, 0x2c, 0x49, 0x6f, 0x1f, 0x96, 0xa4, 0x1f, 0x1c, 0x96, 0x86, 0xde, - 0x3b, 0x2c, 0x49, 0x1f, 0x1c, 0x96, 0x86, 0xee, 0x7e, 0xbf, 0x34, 0xf4, 0xbf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0x32, 0x01, 0xeb, 0xca, 0x0b, 0x35, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf) - if !ok { - that2, ok := that.(AllTypesOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field1) - if !ok { - that2, ok := that.(AllTypesOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field2) - if !ok { - that2, ok := that.(AllTypesOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field3) - if !ok { - that2, ok := that.(AllTypesOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field4) - if !ok { - that2, ok := that.(AllTypesOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field5) - if !ok { - that2, ok := that.(AllTypesOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field6) - if !ok { - that2, ok := that.(AllTypesOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field7) - if !ok { - that2, ok := that.(AllTypesOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field8) - if !ok { - that2, ok := that.(AllTypesOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field9) - if !ok { - that2, ok := that.(AllTypesOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field10) - if !ok { - that2, ok := that.(AllTypesOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field11) - if !ok { - that2, ok := that.(AllTypesOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field12) - if !ok { - that2, ok := that.(AllTypesOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field13) - if !ok { - that2, ok := that.(AllTypesOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field14) - if !ok { - that2, ok := that.(AllTypesOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_Field15) - if !ok { - that2, ok := that.(AllTypesOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllTypesOneOf_SubMessage) - if !ok { - that2, ok := that.(AllTypesOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs) - if !ok { - that2, ok := that.(TwoOneofs) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field1) - if !ok { - that2, ok := that.(TwoOneofs_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field2) - if !ok { - that2, ok := that.(TwoOneofs_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field3) - if !ok { - that2, ok := that.(TwoOneofs_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field34) - if !ok { - that2, ok := that.(TwoOneofs_Field34) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_Field35) - if !ok { - that2, ok := that.(TwoOneofs_Field35) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*TwoOneofs_SubMessage2) - if !ok { - that2, ok := that.(TwoOneofs_SubMessage2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof) - if !ok { - that2, ok := that.(CustomOneof) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_Stringy) - if !ok { - that2, ok := that.(CustomOneof_Stringy) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CustomType) - if !ok { - that2, ok := that.(CustomOneof_CustomType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_CastType) - if !ok { - that2, ok := that.(CustomOneof_CastType) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*CustomOneof_MyCustomName) - if !ok { - that2, ok := that.(CustomOneof_MyCustomName) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - if r.Intn(10) != 0 { - v1 := string(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 = string(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 = string(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 = string(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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0xd3, 0x3f, 0x4f, 0x1b, 0x31, - 0x14, 0x00, 0x70, 0x3f, 0x42, 0x42, 0x70, 0x42, 0x49, 0x6f, 0x72, 0x51, 0x65, 0xac, 0xb4, 0x95, - 0x3c, 0x94, 0x84, 0x5c, 0x12, 0xfe, 0x8c, 0x3d, 0xaa, 0x2a, 0x0b, 0x45, 0x3a, 0x60, 0x46, 0x39, - 0x6a, 0x42, 0xa4, 0xe4, 0x8c, 0xe2, 0x3b, 0xa1, 0x6c, 0x7c, 0x86, 0x7e, 0x8a, 0x8e, 0x1d, 0xfb, - 0x11, 0x18, 0x33, 0x56, 0x1d, 0x22, 0xee, 0xba, 0x74, 0x64, 0x44, 0x9d, 0x2a, 0xdf, 0x11, 0xbb, - 0x52, 0x55, 0x75, 0xe9, 0x94, 0x7b, 0xef, 0x77, 0x7e, 0x79, 0xef, 0x6c, 0xe3, 0xe7, 0xe7, 0x72, - 0x1c, 0x48, 0xd5, 0x8c, 0xc3, 0x71, 0x7f, 0xa2, 0x2e, 0xfb, 0x23, 0x31, 0x69, 0xca, 0x50, 0x34, - 0xae, 0x26, 0x32, 0x92, 0x4e, 0x41, 0x86, 0x62, 0x63, 0x6b, 0x30, 0x8c, 0x2e, 0xe3, 0xa0, 0x71, - 0x2e, 0xc7, 0xcd, 0x81, 0x1c, 0xc8, 0x66, 0x66, 0x41, 0x7c, 0x91, 0x45, 0x59, 0x90, 0x3d, 0xe5, - 0x6b, 0xea, 0xcf, 0x70, 0xf1, 0x38, 0x0e, 0x82, 0xa9, 0x53, 0xc3, 0x05, 0x15, 0x07, 0x04, 0x18, - 0xf0, 0x55, 0x5f, 0x3f, 0xd6, 0xe7, 0x05, 0xbc, 0xf6, 0x66, 0x34, 0x3a, 0x99, 0x5e, 0x09, 0x75, - 0x14, 0x8a, 0xa3, 0x0b, 0x87, 0xe0, 0xd2, 0xbb, 0xa1, 0x18, 0x7d, 0x68, 0x65, 0xaf, 0x41, 0x0f, - 0xf9, 0x8f, 0xb1, 0x11, 0x97, 0x2c, 0x31, 0xe0, 0x4b, 0x46, 0x5c, 0x23, 0x6d, 0x52, 0x60, 0xc0, - 0x8b, 0x46, 0xda, 0x46, 0x3a, 0x64, 0x99, 0x01, 0x2f, 0x18, 0xe9, 0x18, 0xe9, 0x92, 0x22, 0x03, - 0xbe, 0x66, 0xa4, 0x6b, 0x64, 0x87, 0x94, 0x18, 0xf0, 0x65, 0x23, 0x3b, 0x46, 0x76, 0xc9, 0x0a, - 0x03, 0xfe, 0xd4, 0xc8, 0xae, 0x91, 0x3d, 0x52, 0x66, 0xc0, 0x1d, 0x23, 0x7b, 0x46, 0xf6, 0xc9, - 0x2a, 0x03, 0xbe, 0x62, 0x64, 0xdf, 0xd9, 0xc0, 0x2b, 0xf9, 0x64, 0xdb, 0x04, 0x33, 0xe0, 0xeb, - 0x3d, 0xe4, 0x2f, 0x12, 0xd6, 0x5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0x69, 0x9c, 0x0e, 0xc3, 0xa8, - 0xe5, 0xee, 0xe9, 0x0f, 0x6c, 0xab, 0x38, 0xa7, 0xb8, 0x7c, 0xd0, 0x57, 0x51, 0x56, 0x51, 0xb7, - 0xbe, 0xec, 0xed, 0xfe, 0x9c, 0x6f, 0xb6, 0xff, 0x51, 0xb1, 0xaf, 0xa2, 0x68, 0x7a, 0x25, 0x1a, - 0x87, 0x53, 0x5d, 0x75, 0xa7, 0xa3, 0x97, 0xf7, 0x90, 0x6f, 0x4a, 0x39, 0xee, 0xa2, 0xd5, 0xf7, - 0xfd, 0xb1, 0x20, 0xaf, 0xf4, 0x75, 0xf1, 0x6a, 0xe9, 0x7c, 0xb3, 0x7a, 0x38, 0xb5, 0x79, 0xdb, - 0x8a, 0x8e, 0xbc, 0x32, 0x2e, 0xe5, 0xad, 0x7a, 0x6f, 0x6f, 0x13, 0x8a, 0x66, 0x09, 0x45, 0x5f, - 0x13, 0x8a, 0xee, 0x12, 0x0a, 0xf7, 0x09, 0x85, 0x87, 0x84, 0xc2, 0x4d, 0x4a, 0xe1, 0x53, 0x4a, - 0xe1, 0x73, 0x4a, 0xe1, 0x4b, 0x4a, 0xe1, 0x36, 0xa5, 0x68, 0x96, 0x52, 0xb8, 0x4b, 0x29, 0xfc, - 0x48, 0x29, 0xba, 0x4f, 0x29, 0x3c, 0xa4, 0x14, 0xdd, 0x7c, 0xa7, 0xe8, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xdd, 0x1c, 0x58, 0x6c, 0x7c, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto deleted file mode 100644 index 633f01224..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/one.proto +++ /dev/null @@ -1,103 +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 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/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go deleted file mode 100644 index fa343d463..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/combos/unmarshaler/onepb_test.go +++ /dev/null @@ -1,629 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllTypesOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestTwoOneofsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCustomOneofProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllTypesOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &TwoOneofs{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomOneof{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllTypesOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - dAtA := proto.CompactTextString(p) - msg := &TwoOneofs{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomOneof{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllTypesOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllTypesOneOf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTwoOneofs(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &TwoOneofs{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomOneof(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomOneof{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllTypesOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTwoOneofsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomOneofGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllTypesOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTwoOneofs(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomOneof(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof/doc.go b/vendor/github.com/gogo/protobuf/test/oneof/doc.go deleted file mode 100644 index b9f2ff176..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/doc.go +++ /dev/null @@ -1 +0,0 @@ -package one diff --git a/vendor/github.com/gogo/protobuf/test/oneof/one.proto b/vendor/github.com/gogo/protobuf/test/oneof/one.proto deleted file mode 100644 index 66d4b4496..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof/one.proto +++ /dev/null @@ -1,103 +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 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/github.com/gogo/protobuf/test/oneof3/Makefile b/vendor/github.com/gogo/protobuf/test/oneof3/Makefile deleted file mode 100644 index b42ef60ee..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/Makefile +++ /dev/null @@ -1,32 +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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. one.proto diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go deleted file mode 100644 index 65180aa81..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.pb.go +++ /dev/null @@ -1,3274 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/one.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import binary "encoding/binary" - -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 Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []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 _SampleOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *SampleOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *SampleOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *SampleOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *SampleOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *SampleOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3973 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0x1b, 0xe7, - 0x75, 0xe6, 0xe2, 0x46, 0xe0, 0x00, 0x04, 0x97, 0x4b, 0x4a, 0x82, 0xe8, 0x18, 0xa2, 0x68, 0x3b, - 0xa2, 0xed, 0x9a, 0xb4, 0x29, 0x51, 0x17, 0xa8, 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69, 0x13, 0x44, 0xd7, 0xea, 0x3a, 0x1a, 0x52, 0x34, 0xab, 0x89, 0x14, - 0xdd, 0x6c, 0x59, 0x85, 0x0c, 0x21, 0x38, 0x33, 0x38, 0x11, 0x62, 0xb8, 0x66, 0x35, 0xd1, 0xa6, - 0xd9, 0xb2, 0xe4, 0xbc, 0xdb, 0xf3, 0x2c, 0x9d, 0x84, 0x94, 0x7b, 0x60, 0x7a, 0xea, 0x2b, 0x85, - 0x1c, 0x89, 0x10, 0xf6, 0x34, 0xff, 0x0f, 0x29, 0x98, 0x1c, 0x25, 0xc4, 0xae, 0x42, 0xb2, 0x85, - 0x67, 0x59, 0x88, 0x1d, 0xc7, 0x07, 0x14, 0xd3, 0xeb, 0xc4, 0xd4, 0x4f, 0xe9, 0xc4, 0x32, 0x64, - 0x4d, 0xe4, 0x7a, 0xa8, 0x49, 0x23, 0x22, 0x3e, 0x62, 0x4c, 0x01, 0x05, 0x0d, 0x86, 0x54, 0xe2, - 0xa7, 0x0a, 0xa9, 0x17, 0x61, 0xd2, 0x1f, 0x92, 0xe2, 0xa8, 0x66, 0x9b, 0xc7, 0xe6, 0x52, 0xd4, - 0x48, 0x16, 0x2b, 0x1c, 0x27, 0x63, 0x98, 0x9c, 0x47, 0x3d, 0xcf, 0xd2, 0x3a, 0x80, 0x65, 0x22, - 0xab, 0xa5, 0x34, 0x91, 0x66, 0x14, 0xd2, 0x47, 0x78, 0xa9, 0x8a, 0x4d, 0x06, 0xbc, 0x64, 0x51, - 0xa9, 0x66, 0x48, 0x57, 0x82, 0x50, 0x1b, 0x3f, 0x22, 0x52, 0xb6, 0xe9, 0x26, 0x1b, 0x88, 0xb6, - 0x3d, 0xc8, 0x3b, 0x08, 0xc7, 0x3d, 0x6a, 0xb2, 0x99, 0x65, 0xc8, 0x20, 0x16, 0x23, 0x67, 0x26, - 0x33, 0x18, 0x9d, 0xd8, 0x84, 0x13, 0x7e, 0x94, 0x1e, 0x03, 0x5f, 0xa0, 0x90, 0xb0, 0x02, 0x92, - 0x85, 0x72, 0x5c, 0xb8, 0xa3, 0x76, 0xd0, 0xec, 0x5d, 0xc8, 0xf7, 0xba, 0x47, 0x9a, 0x81, 0xa4, - 0xeb, 0xa9, 0x8e, 0x47, 0xa2, 0x30, 0x29, 0xd3, 0x07, 0x49, 0x84, 0x38, 0x32, 0x9b, 0x24, 0xcb, - 0x25, 0x65, 0xfc, 0xaf, 0xf4, 0x73, 0xc1, 0x84, 0xe3, 0x64, 0xc2, 0x9f, 0x1c, 0x5c, 0xd1, 0x1e, - 0xe6, 0xfe, 0x79, 0xcf, 0x5e, 0x82, 0x89, 0x9e, 0x09, 0x8c, 0xfa, 0xea, 0xf9, 0x5f, 0x84, 0x13, - 0x43, 0xa9, 0xa5, 0x17, 0x61, 0xa6, 0x6b, 0xea, 0xa6, 0x87, 0x1c, 0xdb, 0x41, 0x38, 0x62, 0xe9, - 0xab, 0x0a, 0xff, 0x3e, 0x7e, 0x44, 0xcc, 0xed, 0x85, 0xad, 0x29, 0x8b, 0x3c, 0xdd, 0x1d, 0x14, - 0x3e, 0x95, 0x49, 0xff, 0x68, 0x5c, 0xbc, 0x77, 0xef, 0xde, 0xbd, 0xd8, 0xfc, 0x97, 0x53, 0x30, - 0x33, 0x6c, 0xcf, 0x0c, 0xdd, 0xbe, 0x27, 0x21, 0x65, 0x76, 0x3b, 0x0d, 0xe4, 0x10, 0x27, 0x25, - 0x65, 0xf6, 0x24, 0x95, 0x21, 0x69, 0xa8, 0x0d, 0x64, 0x14, 0x12, 0x73, 0xc2, 0x42, 0x7e, 0xf9, - 0xe9, 0x91, 0x76, 0xe5, 0xe2, 0x16, 0x86, 0xc8, 0x14, 0x29, 0x7d, 0x1a, 0x12, 0x2c, 0x45, 0x63, - 0x86, 0xa7, 0x46, 0x63, 0xc0, 0x7b, 0x49, 0x26, 0x38, 0xe9, 0x11, 0xc8, 0xe0, 0xbf, 0x34, 0x36, - 0x52, 0x64, 0xcc, 0x69, 0x2c, 0xc0,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, 0x3e, 0x26, 0x83, 0xdb, 0x6d, 0xb0, - 0xe4, 0xb9, 0x9a, 0x03, 0x72, 0xd7, 0xa0, 0x90, 0x6f, 0x5d, 0x57, 0xd7, 0xdf, 0xba, 0x5f, 0x1c, - 0xfb, 0xde, 0xfd, 0xe2, 0xd8, 0xbf, 0xdd, 0x2f, 0x8e, 0xbd, 0x7d, 0xbf, 0x28, 0xbc, 0x77, 0xbf, - 0x28, 0x7c, 0x70, 0xbf, 0x28, 0xdc, 0x3b, 0x2c, 0x0a, 0x5f, 0x3b, 0x2c, 0x0a, 0xdf, 0x38, 0x2c, - 0x0a, 0xdf, 0x39, 0x2c, 0x0a, 0x6f, 0x1d, 0x16, 0x85, 0xef, 0x1d, 0x16, 0x85, 0xb7, 0x0f, 0x8b, - 0xc2, 0x8f, 0x0e, 0x8b, 0x63, 0xef, 0x1d, 0x16, 0x85, 0x0f, 0x0e, 0x8b, 0x63, 0xf7, 0x7e, 0x58, - 0x1c, 0x6b, 0xa4, 0x48, 0x18, 0x9d, 0xff, 0x49, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5c, 0xa6, 0x37, - 0xb3, 0x22, 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) - i += 4 - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) - i += 4 - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) - i += 8 - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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 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 = string(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 = string(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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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") -) - -func init() { proto.RegisterFile("combos/both/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 404 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, - 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0x9e, 0x54, 0xe9, 0x95, 0xe1, 0xc9, 0x62, - 0xf2, 0x42, 0xd2, 0xdc, 0x25, 0xfc, 0x58, 0x51, 0x55, 0x65, 0xa9, 0x90, 0xc2, 0x1f, 0x80, 0x30, - 0x75, 0x0e, 0x24, 0xee, 0x8c, 0x7a, 0x77, 0x43, 0x37, 0xfe, 0x9c, 0x8e, 0x1d, 0xfb, 0x27, 0x30, - 0x32, 0x76, 0xe8, 0xc0, 0xb9, 0x4b, 0x47, 0x46, 0xc6, 0x2a, 0x97, 0xf2, 0xbc, 0xbd, 0xaf, 0x3f, - 0xf6, 0x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0x12, 0x2c, 0xc1, 0x81, 0x02, 0x3d, 0x0c, 0x96, 0x04, - 0x4b, 0x71, 0x47, 0x81, 0xde, 0x0a, 0x96, 0x06, 0x9b, 0xe2, 0x9b, 0xd5, 0xfb, 0x07, 0x9b, 0x06, - 0x9b, 0xe1, 0xae, 0x02, 0x3d, 0x08, 0x36, 0x8b, 0x0f, 0x64, 0xbf, 0xac, 0xcd, 0x45, 0x6e, 0xcb, - 0xf2, 0x32, 0xb3, 0x38, 0x54, 0xa0, 0xfb, 0x89, 0x1c, 0xad, 0x1a, 0xd1, 0x7e, 0xea, 0x5c, 0x2c, - 0x64, 0x59, 0x9b, 0xcf, 0x6b, 0x3f, 0x1d, 0x48, 0x59, 0xd9, 0xb2, 0xba, 0x70, 0x85, 0x75, 0xcb, - 0xd3, 0x8f, 0x0f, 0x0d, 0x89, 0xc7, 0x86, 0xc4, 0xaf, 0x86, 0xc4, 0x53, 0x43, 0xf0, 0xdc, 0x10, - 0xbc, 0x34, 0x04, 0xf7, 0x9e, 0xe0, 0xbb, 0x27, 0xf8, 0xe1, 0x09, 0x7e, 0x7a, 0x82, 0x07, 0x4f, - 0xf0, 0xe8, 0x09, 0x9e, 0x3c, 0xc1, 0x5f, 0x4f, 0xe2, 0xd9, 0x13, 0xbc, 0x78, 0x12, 0xf7, 0x7f, - 0x48, 0x98, 0x6e, 0x5b, 0xa3, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x42, 0xd6, 0x88, - 0x93, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto deleted file mode 100644 index 51876e235..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/one.proto +++ /dev/null @@ -1,82 +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 = "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/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go deleted file mode 100644 index 663f7c9d8..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/both/onepb_test.go +++ /dev/null @@ -1,387 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go deleted file mode 100644 index b843135bb..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.pb.go +++ /dev/null @@ -1,2739 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/one.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import binary "encoding/binary" - -// 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 Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []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 _SampleOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *SampleOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *SampleOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *SampleOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *SampleOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *SampleOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3971 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0x1b, 0xd7, - 0x79, 0x26, 0xae, 0x04, 0x7e, 0x80, 0xe0, 0xf2, 0x90, 0x96, 0x20, 0x3a, 0x86, 0x24, 0xda, 0x8e, - 0x68, 0xbb, 0x26, 0x6d, 0x4a, 0xd4, 0x05, 0x6a, 0xe2, 0x82, 0x24,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 0x95, 0x62, 0xa4, 0x59, 0x59, 0xad, 0xad, 0x91, 0x36, - 0xe3, 0xa5, 0xaa, 0x14, 0x27, 0xed, 0xce, 0xe6, 0xc6, 0x6e, 0x55, 0x91, 0xf7, 0xb6, 0x77, 0x37, - 0xb6, 0xaa, 0x52, 0x22, 0xdc, 0x57, 0x7f, 0x37, 0x0e, 0x85, 0xde, 0x23, 0x12, 0xfa, 0x69, 0x38, - 0x29, 0xee, 0x33, 0x5c, 0xec, 0x29, 0x77, 0x74, 0x87, 0x6e, 0x99, 0x8e, 0xca, 0xca, 0x97, 0xbf, - 0x68, 0x33, 0xdc, 0xaa, 0x8e, 0xbd, 0xe7, 0x75, 0x87, 0x6c, 0x88, 0x8e, 0xea, 0xa1, 0x4d, 0x38, - 0x6d, 0x5a, 0x8a, 0xeb, 0xa9, 0x66, 0x53, 0x75, 0x9a, 0x4a, 0x70, 0x93, 0xa4, 0xa8, 0x9a, 0x86, - 0x5d, 0xd7, 0x62, 0xa5, 0xca, 0x67, 0xf9, 0x94, 0x69, 0xd5, 0xb9, 0x71, 0x90, 0xc3, 0x2b, 0xdc, - 0xb4, 0x2f, 0xc0, 0x12, 0x47, 0x05, 0xd8, 0xc3, 0x90, 0xed, 0xa8, 0xb6, 0x82, 0x4d, 0xcf, 0x39, - 0xa0, 0x8d, 0x71, 0x46, 0xce, 0x74, 0x54, 0xbb, 0x4a, 0x9e, 0x3f, 0x9e, 0xf3, 0xc9, 0x0f, 0x12, - 0x90, 0x0f, 0x37, 0xc7, 0xe4, 0xac, 0xa1, 0xd1, 0x3a, 0x12, 0xa3, 0x99, 0xe6, 0xd1, 0x07, 0xb6, - 0xd2, 0x0b, 0xab, 0xa4, 0xc0, 0x94, 0xd3, 0xac, 0x65, 0x95, 0x19, 0x92, 0x14, 0x77, 0x92, 0x5b, - 0x30, 0x6b, 0x11, 0x32, 0x32, 0x7f, 0x42, 0xeb, 0x90, 0xbe, 0xe9, 0x52, 0xee, 0x34, 0xe5, 0x7e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0xc6, 0x89, 0x3d, - 0x81, 0x56, 0x20, 0xdf, 0xb6, 0x78, 0x65, 0x8a, 0x86, 0xbf, 0xc1, 0xe1, 0x39, 0x81, 0xe1, 0x14, - 0xb6, 0x65, 0x77, 0x0d, 0x52, 0xb6, 0xa2, 0x29, 0x7e, 0x5f, 0x50, 0x08, 0x0c, 0xa7, 0x38, 0x86, - 0x5b, 0xff, 0x40, 0x50, 0xb8, 0x21, 0x7f, 0x3e, 0x07, 0x39, 0xcb, 0x34, 0x0e, 0x2c, 0x73, 0x94, - 0x41, 0xfc, 0x21, 0x67, 0x00, 0x0e, 0x21, 0x04, 0x57, 0x21, 0x3b, 0xea, 0x42, 0xfc, 0xf1, 0xbb, - 0x62, 0x7b, 0x88, 0x15, 0x58, 0x87, 0x49, 0x91, 0xa0, 0x74, 0xcb, 0x1c, 0x81, 0xe2, 0x4f, 0x38, - 0x45, 0x21, 0x04, 0xe3, 0xd3, 0xf0, 0xb0, 0xeb, 0xb5, 0xf1, 0x28, 0x24, 0x6f, 0x8a, 0x69, 0x70, - 0x08, 0x77, 0x65, 0x03, 0x9b, 0xda, 0xfe, 0x68, 0x0c, 0x5f, 0x13, 0xae, 0x14, 0x18, 0x42, 0xb1, - 0x0a, 0x13, 0x1d, 0xd5, 0x71, 0xf7, 0x55, 0x63, 0xa4, 0xe5, 0xf8, 0x53, 0xce, 0x91, 0xf7, 0x41, - 0xdc, 0x23, 0x5d, 0xf3, 0x38, 0x34, 0x5f, 0x17, 0x1e, 0x09, 0xc1, 0xf8, 0xd6, 0x73, 0x3d, 0x7a, - 0xa5, 0x75, 0x1c, 0xb6, 0x3f, 0x13, 0x5b, 0x8f, 0x61, 0xb7, 0xc2, 0x8c, 0x57, 0x21, 0xeb, 0xea, - 0x77, 0x47, 0xa2, 0xf9, 0x73, 0xb1, 0xd2, 0x14, 0x40, 0xc0, 0x2f, 0xc2, 0xa9, 0xa1, 0x65, 0x62, - 0x04, 0xb2, 0xbf, 0xe0, 0x64, 0x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, 0x28, 0xf4, 0x83, 0xd7, 0x95, 0xb5, 0xb7, 0xee, 0x97, 0xc6, 0xbe, 0x77, 0xbf, - 0x34, 0xf6, 0xaf, 0xf7, 0x4b, 0x63, 0x6f, 0xdf, 0x2f, 0xc5, 0xde, 0xbb, 0x5f, 0x8a, 0x7d, 0x70, - 0xbf, 0x14, 0xbb, 0x77, 0x58, 0x8a, 0x7d, 0xed, 0xb0, 0x14, 0xfb, 0xc6, 0x61, 0x29, 0xf6, 0x9d, - 0xc3, 0x52, 0xec, 0xad, 0xc3, 0x52, 0xec, 0x7b, 0x87, 0xa5, 0xb1, 0xb7, 0x0f, 0x4b, 0xb1, 0x1f, - 0x1d, 0x96, 0xc6, 0xde, 0x3b, 0x2c, 0xc5, 0x3e, 0x38, 0x2c, 0x8d, 0xdd, 0xfb, 0x61, 0x69, 0xac, - 0x91, 0xa6, 0x61, 0x74, 0xfe, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x7e, 0x5a, 0x08, 0x8b, 0x27, - 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - return i, nil -} -func (m *SampleOneOf_Field2) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) - i += 4 - return i, nil -} -func (m *SampleOneOf_Field10) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) - i += 4 - return i, nil -} -func (m *SampleOneOf_Field11) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) - i += 8 - return i, nil -} -func (m *SampleOneOf_Field12) MarshalTo(dAtA []byte) (int, error) { - i := 0 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(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 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 = string(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 = string(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 init() { proto.RegisterFile("combos/marshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 407 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, - 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0x9a, 0xe1, 0xc9, 0x62, 0xf2, - 0x42, 0xd2, 0xdc, 0x25, 0xfc, 0x58, 0x51, 0x55, 0x65, 0xa9, 0x90, 0xc2, 0x1f, 0x80, 0x62, 0xea, - 0x04, 0xa4, 0x5c, 0x8c, 0x72, 0x77, 0x43, 0x37, 0xfe, 0x9c, 0x8e, 0x1d, 0xfb, 0x27, 0x30, 0x32, - 0x76, 0xe8, 0xc0, 0xb9, 0x4b, 0x47, 0x46, 0xc6, 0x2a, 0x97, 0xf2, 0xbc, 0xbd, 0xaf, 0x3f, 0xf6, - 0x60, 0xfb, 0x2b, 0x7b, 0x37, 0x2e, 0x33, 0x2e, 0x1f, 0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, 0xba, - 0x1b, 0x2c, 0x09, 0x96, 0xe2, 0x81, 0x02, 0xbd, 0x17, 0x2c, 0x0d, 0x36, 0xc2, 0x77, 0x9b, 0xf7, - 0x0f, 0x36, 0x0a, 0x36, 0xc6, 0x43, 0x05, 0xba, 0x13, 0x6c, 0x1c, 0x1f, 0xcb, 0x76, 0x5e, 0x9a, - 0xeb, 0xcc, 0xe6, 0xf9, 0x6c, 0x61, 0xb1, 0xab, 0x40, 0xb7, 0x13, 0xd9, 0xdf, 0x34, 0xa2, 0xfe, - 0xd4, 0x89, 0x98, 0xca, 0xbc, 0x34, 0x5f, 0xb6, 0x7e, 0xd1, 0x91, 0xb2, 0xb0, 0x79, 0x71, 0xed, - 0x56, 0xd6, 0xcd, 0x2f, 0x3e, 0x3d, 0x56, 0x24, 0x9e, 0x2a, 0x12, 0xbf, 0x2a, 0x12, 0xcf, 0x15, - 0xc1, 0x4b, 0x45, 0xf0, 0x5a, 0x11, 0x3c, 0x78, 0x82, 0xef, 0x9e, 0xe0, 0x87, 0x27, 0xf8, 0xe9, - 0x09, 0x1e, 0x3d, 0xc1, 0x93, 0x27, 0xf1, 0xec, 0x09, 0xfe, 0x7a, 0x12, 0x2f, 0x9e, 0xe0, 0xd5, - 0x93, 0x78, 0xf8, 0x43, 0xc2, 0x34, 0xeb, 0x1a, 0xa5, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x34, - 0x55, 0x0b, 0x2b, 0x98, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto deleted file mode 100644 index 32ea8482c..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/one.proto +++ /dev/null @@ -1,82 +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 = "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/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go deleted file mode 100644 index db9c7982f..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/marshaler/onepb_test.go +++ /dev/null @@ -1,387 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go deleted file mode 100644 index b39382f9d..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.pb.go +++ /dev/null @@ -1,2542 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/one.proto - -/* -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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -// 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 Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []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 _SampleOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *SampleOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *SampleOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *SampleOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *SampleOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *SampleOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3974 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0x1b, 0xd7, - 0x79, 0x26, 0xae, 0x04, 0x7e, 0x80, 0xe0, 0xf2, 0x90, 0x96, 0x20, 0x3a, 0x86, 0x24, 0xda, 0x8e, - 0x68, 0xbb, 0x26, 0x6d, 0x4a, 0xd4, 0x05, 0x6a, 0xe2, 0x82, 0x24, 0x44, 0x51, 0x25, 0x09, 0x66, - 0x41, 0xc6, 0x97, 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 0x49, 0x9a, 0xf0, 0x5f, 0x51, 0xdd, 0xde, 0xdb, 0x92, 0x0a, 0x68, - 0x0a, 0x26, 0xd8, 0x2b, 0xc4, 0x20, 0x26, 0xfb, 0x44, 0x17, 0x2f, 0x48, 0x52, 0x30, 0x10, 0xc6, - 0x32, 0xd5, 0x23, 0xb8, 0x78, 0x41, 0x42, 0x73, 0xab, 0x90, 0xa2, 0xd1, 0x85, 0x10, 0x14, 0x36, - 0x2b, 0x2b, 0xd5, 0x4d, 0xa5, 0xb6, 0xb3, 0xbb, 0x51, 0xdb, 0xae, 0x6c, 0x4a, 0xb1, 0x40, 0x26, - 0x57, 0x3f, 0xb3, 0xb7, 0x21, 0x57, 0xd7, 0xa4, 0x78, 0x58, 0xb6, 0x53, 0xad, 0xec, 0x56, 0xd7, - 0xa4, 0xc4, 0x9c, 0x06, 0x33, 0xc3, 0xf2, 0xe4, 0xd0, 0x9d, 0x11, 0x5a, 0xe2, 0xf8, 0x11, 0x4b, - 0x4c, 0xb9, 0x06, 0x96, 0xf8, 0x07, 0x71, 0x98, 0x1e, 0x52, 0x2b, 0x86, 0xbe, 0xe4, 0x39, 0x48, - 0xb1, 0x10, 0x65, 0xd5, 0xf3, 0x89, 0xa1, 0x45, 0x87, 0x06, 0xec, 0x40, 0x05, 0xa5, 0xb8, 0x70, - 0x07, 0x91, 0x38, 0xa2, 0x83, 0x20, 0x14, 0x03, 0x39, 0xfd, 0xe7, 0x06, 0x72, 0x3a, 0x2b, 0x7b, - 0x17, 0x47, 0x29, 0x7b, 0x54, 0x76, 0xbc, 0xdc, 0x9e, 0x1a, 0x92, 0xdb, 0xaf, 0xc2, 0xd4, 0x00, - 0xd1, 0xc8, 0x39, 0xf6, 0x95, 0x18, 0x14, 0x8f, 0x72, 0x4e, 0x44, 0xa6, 0x8b, 0xf7, 0x64, 0xba, - 0xab, 0xfd, 0x1e, 0x3c, 0x7b, 0xf4, 0x22, 0x0c, 0xac, 0xf5, 0x1b, 0x31, 0x38, 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xa5, 0xaa, 0x14, 0x27, 0xed, 0xce, 0xe6, 0xc6, 0x6e, 0x55, 0x91, 0xf7, 0xb6, 0x77, 0x37, - 0xb6, 0xaa, 0x52, 0x22, 0xdc, 0x57, 0x7f, 0x27, 0x0e, 0x85, 0xde, 0x23, 0x12, 0xfa, 0x69, 0x38, - 0x29, 0xee, 0x33, 0x5c, 0xec, 0x29, 0x77, 0x74, 0x87, 0x6e, 0x99, 0x8e, 0xca, 0xca, 0x97, 0xbf, - 0x68, 0x33, 0xdc, 0xaa, 0x8e, 0xbd, 0xe7, 0x75, 0x87, 0x6c, 0x88, 0x8e, 0xea, 0xa1, 0x4d, 0x38, - 0x6d, 0x5a, 0x8a, 0xeb, 0xa9, 0x66, 0x53, 0x75, 0x9a, 0x4a, 0x70, 0x93, 0xa4, 0xa8, 0x9a, 0x86, - 0x5d, 0xd7, 0x62, 0xa5, 0xca, 0x67, 0xf9, 0x84, 0x69, 0xd5, 0xb9, 0x71, 0x90, 0xc3, 0x2b, 0xdc, - 0xb4, 0x2f, 0xc0, 0x12, 0x47, 0x05, 0xd8, 0xc3, 0x90, 0xed, 0xa8, 0xb6, 0x82, 0x4d, 0xcf, 0x39, - 0xa0, 0x8d, 0x71, 0x46, 0xce, 0x74, 0x54, 0xbb, 0x4a, 0x9e, 0x3f, 0x9a, 0xf3, 0xc9, 0xf7, 0x13, - 0x90, 0x0f, 0x37, 0xc7, 0xe4, 0xac, 0xa1, 0xd1, 0x3a, 0x12, 0xa3, 0x99, 0xe6, 0xd1, 0x07, 0xb6, - 0xd2, 0x0b, 0xab, 0xa4, 0xc0, 0x94, 0xd3, 0xac, 0x65, 0x95, 0x19, 0x92, 0x14, 0x77, 0x92, 0x5b, - 0x30, 0x6b, 0x11, 0x32, 0x32, 0x7f, 0x42, 0xeb, 0x90, 0xbe, 0xe9, 0x52, 0xee, 0x34, 0xe5, 0x7e, - 0xec, 0xc1, 0xdc, 0x37, 0xea, 0x94, 0x3c, 0x7b, 0xa3, 0x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, 0x8a, 0x86, 0xbf, 0xce, 0xe1, 0x39, 0x81, 0xe1, 0x14, - 0xb6, 0x65, 0x77, 0x0d, 0x52, 0xb6, 0xa2, 0x29, 0xfe, 0x40, 0x50, 0x08, 0x0c, 0xa7, 0x38, 0x86, - 0x5b, 0xff, 0x50, 0x50, 0xb8, 0x21, 0x7f, 0x3e, 0x07, 0x39, 0xcb, 0x34, 0x0e, 0x2c, 0x73, 0x94, - 0x41, 0xfc, 0x11, 0x67, 0x00, 0x0e, 0x21, 0x04, 0x57, 0x21, 0x3b, 0xea, 0x42, 0xfc, 0xc9, 0x3b, - 0x62, 0x7b, 0x88, 0x15, 0x58, 0x87, 0x49, 0x91, 0xa0, 0x74, 0xcb, 0x1c, 0x81, 0xe2, 0x4f, 0x39, - 0x45, 0x21, 0x04, 0xe3, 0xd3, 0xf0, 0xb0, 0xeb, 0xb5, 0xf1, 0x28, 0x24, 0x6f, 0x88, 0x69, 0x70, - 0x08, 0x77, 0x65, 0x03, 0x9b, 0xda, 0xfe, 0x68, 0x0c, 0x5f, 0x15, 0xae, 0x14, 0x18, 0x42, 0xb1, - 0x0a, 0x13, 0x1d, 0xd5, 0x71, 0xf7, 0x55, 0x63, 0xa4, 0xe5, 0xf8, 0x33, 0xce, 0x91, 0xf7, 0x41, - 0xdc, 0x23, 0x5d, 0xf3, 0x38, 0x34, 0x5f, 0x13, 0x1e, 0x09, 0xc1, 0xf8, 0xd6, 0x73, 0x3d, 0x7a, - 0xa5, 0x75, 0x1c, 0xb6, 0x3f, 0x17, 0x5b, 0x8f, 0x61, 0xb7, 0xc2, 0x8c, 0x57, 0x21, 0xeb, 0xea, - 0x77, 0x47, 0xa2, 0xf9, 0x0b, 0xb1, 0xd2, 0x14, 0x40, 0xc0, 0x2f, 0xc2, 0xa9, 0xa1, 0x65, 0x62, - 0x04, 0xb2, 0xbf, 0xe4, 0x64, 0x27, 0x86, 0x94, 0x0a, 0x9e, 0x12, 0x8e, 0x4b, 0xf9, 0x57, 0x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0xae, 0x2b, 0x6b, 0x6f, 0xde, 0x2f, 0x8d, - 0x7d, 0xf7, 0x7e, 0x69, 0xec, 0xdf, 0xee, 0x97, 0xc6, 0xde, 0xba, 0x5f, 0x8a, 0xbd, 0x7b, 0xbf, - 0x14, 0x7b, 0xff, 0x7e, 0x29, 0x76, 0xef, 0xb0, 0x14, 0xfb, 0xea, 0x61, 0x29, 0xf6, 0xf5, 0xc3, - 0x52, 0xec, 0xdb, 0x87, 0xa5, 0xd8, 0x9b, 0x87, 0xa5, 0xb1, 0xef, 0x1e, 0x96, 0xc6, 0xde, 0x3a, - 0x2c, 0xc5, 0x7e, 0x78, 0x58, 0x1a, 0x7b, 0xf7, 0xb0, 0x14, 0x7b, 0xff, 0xb0, 0x34, 0x76, 0xef, - 0x07, 0xa5, 0xb1, 0x46, 0x9a, 0x86, 0xd1, 0xf9, 0x1f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x85, - 0x64, 0x08, 0x25, 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = string(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 = string(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 init() { proto.RegisterFile("combos/neither/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 405 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, - 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0xca, 0xf0, 0x64, 0x31, 0x79, - 0x21, 0x69, 0xee, 0x12, 0x7e, 0xac, 0xa8, 0xaa, 0xb2, 0x54, 0x48, 0xe1, 0x0f, 0x40, 0x98, 0x3a, - 0x21, 0x12, 0x77, 0x46, 0xdc, 0xdd, 0xd0, 0x8d, 0x3f, 0xa7, 0x63, 0xc7, 0xfe, 0x09, 0x8c, 0x8c, - 0x1d, 0x3a, 0x70, 0xee, 0xd2, 0x91, 0x31, 0x63, 0x95, 0x4b, 0x79, 0xde, 0xde, 0xd7, 0x1f, 0x7b, - 0xb0, 0xfd, 0x95, 0x78, 0xe3, 0x32, 0xe3, 0x8a, 0x61, 0x6e, 0x97, 0xe5, 0xad, 0x7d, 0x18, 0xba, - 0xdc, 0x0e, 0xee, 0x1f, 0x5c, 0xe9, 0xe2, 0xc8, 0xe5, 0xf6, 0xe0, 0x68, 0xb1, 0x2c, 0x6f, 0x2b, - 0x33, 0xb8, 0x71, 0xd9, 0x70, 0xe1, 0x16, 0x6e, 0xd8, 0x98, 0xa9, 0xe6, 0x4d, 0x6a, 0x42, 0x33, - 0x6d, 0xce, 0x1c, 0x7e, 0x90, 0xad, 0xcb, 0xca, 0x98, 0x6f, 0x71, 0x5f, 0x46, 0x45, 0x65, 0x10, - 0x14, 0xe8, 0xdd, 0xd9, 0x7a, 0x3c, 0xfc, 0x1d, 0xc9, 0xee, 0xe5, 0x75, 0x76, 0x7f, 0x67, 0x2f, - 0x72, 0x7b, 0x31, 0x8f, 0x51, 0xb6, 0x3f, 0x2f, 0xed, 0xdd, 0xd7, 0x51,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x6a, 0x82, 0x47, 0x4f, 0xf0, 0xdd, 0x13, 0xfc, 0xf0, 0x04, 0x3f, 0x3d, 0xc1, 0x93, - 0x27, 0xf1, 0xec, 0x49, 0xbc, 0x78, 0x82, 0xbf, 0x9e, 0xc4, 0xab, 0x27, 0x58, 0x79, 0x12, 0x8f, - 0x7f, 0x48, 0x98, 0x76, 0x53, 0xa3, 0xf4, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd1, 0x04, 0xd2, - 0x98, 0x96, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto deleted file mode 100644 index 2eca9a07f..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/one.proto +++ /dev/null @@ -1,82 +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 = "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/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go deleted file mode 100644 index b846e9222..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/neither/onepb_test.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go deleted file mode 100644 index 9375d53c5..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.pb.go +++ /dev/null @@ -1,3078 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/one.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import io "io" -import binary "encoding/binary" - -// 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 Subby struct { - Sub string `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub,omitempty"` -} - -func (m *Subby) Reset() { *m = Subby{} } -func (*Subby) ProtoMessage() {} -func (*Subby) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{0} } - -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() {} -func (*SampleOneOf) Descriptor() ([]byte, []int) { return fileDescriptorOne, []int{1} } - -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,json=subMessage,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), func(msg proto.Message) (n int), []interface{}) { - return _SampleOneOf_OneofMarshaler, _SampleOneOf_OneofUnmarshaler, _SampleOneOf_OneofSizer, []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 _SampleOneOf_OneofSizer(msg proto.Message) (n int) { - m := msg.(*SampleOneOf) - // test_oneof - switch x := m.TestOneof.(type) { - case *SampleOneOf_Field1: - n += proto.SizeVarint(1<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field2: - n += proto.SizeVarint(2<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field3: - n += proto.SizeVarint(3<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field3)) - case *SampleOneOf_Field4: - n += proto.SizeVarint(4<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field4)) - case *SampleOneOf_Field5: - n += proto.SizeVarint(5<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field5)) - case *SampleOneOf_Field6: - n += proto.SizeVarint(6<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(x.Field6)) - case *SampleOneOf_Field7: - n += proto.SizeVarint(7<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64((uint32(x.Field7) << 1) ^ uint32((int32(x.Field7) >> 31)))) - case *SampleOneOf_Field8: - n += proto.SizeVarint(8<<3 | proto.WireVarint) - n += proto.SizeVarint(uint64(uint64(x.Field8<<1) ^ uint64((int64(x.Field8) >> 63)))) - case *SampleOneOf_Field9: - n += proto.SizeVarint(9<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field10: - n += proto.SizeVarint(10<<3 | proto.WireFixed32) - n += 4 - case *SampleOneOf_Field11: - n += proto.SizeVarint(11<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field12: - n += proto.SizeVarint(12<<3 | proto.WireFixed64) - n += 8 - case *SampleOneOf_Field13: - n += proto.SizeVarint(13<<3 | proto.WireVarint) - n += 1 - case *SampleOneOf_Field14: - n += proto.SizeVarint(14<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field14))) - n += len(x.Field14) - case *SampleOneOf_Field15: - n += proto.SizeVarint(15<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(len(x.Field15))) - n += len(x.Field15) - case *SampleOneOf_SubMessage: - s := proto.Size(x.SubMessage) - n += proto.SizeVarint(16<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3971 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0x1b, 0xd7, - 0x79, 0x26, 0xae, 0x04, 0x7e, 0x80, 0xe0, 0xf2, 0x90, 0x96, 0x20, 0xda, 0x86, 0x24, 0xda, 0x8e, - 0x68, 0xbb, 0x26, 0x6d, 0x4a, 0xd4, 0x05, 0x6a, 0xe2, 0x82, 0x24, 0x44, 0x51, 0x25, 0x09, 0x66, - 0x41, 0xc6, 0x97, 0x4c, 0x67, 0x67, 0xb1, 0x38, 0x00, 0x57, 0x5a, 0xec, 0x6e, 0x76, 0x17, 0x92, - 0xa9, 0xe9, 0x83, 0x3a, 0xee, 0x65, 0x32, 0x9d, 0xde, 0x3b, 0x93, 0xc4, 0x75, 0xdc, 0xcb, 0x4c, - 0xeb, 0x34, 0xbd, 0x25, 0x4d, 0x9b, 0xa6, 0x7d, 0xea, 0x4b, 0x5a, 0x3f, 0x75, 0x92, 0xb7, 0x3e, - 0xe4, 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8b, 0x20, 0x69, 0x9a, 0x82, 0x4d, 0xb5, 0x61, 0x60, 0x45, - 0x75, 0xb0, 0xa9, 0xba, 0xc5, 0xd3, 0x61, 0xe3, 0x82, 0xa6, 0x55, 0xa9, 0xb6, 0x42, 0x95, 0xe8, - 0x29, 0x98, 0xb2, 0x1a, 0x37, 0x35, 0x16, 0x92, 0x8a, 0xed, 0xe0, 0x96, 0xfe, 0x4a, 0xf1, 0x71, - 0xea, 0xdf, 0x49, 0xa2, 0xa0, 0x01, 0xb9, 0x43, 0xc5, 0xe8, 0x49, 0x90, 0x34, 0x77, 0x5f, 0x75, - 0x6c, 0x9a, 0x93, 0x5d, 0x5b, 0xd5, 0x70, 0xf1, 0x09, 0x66, 0xca, 0xe4, 0xdb, 0x42, 0x4c, 0xb6, - 0x84, 0x7b, 0x47, 0x6f, 0x79, 0x82, 0xf1, 0x1c, 0xdb, 0x12, 0x54, 0xc6, 0xd9, 0xe6, 0x41, 0x22, - 0xae, 0xe8, 0x79, 0xf1, 0x3c, 0x35, 0x2b, 0xd8, 0xfb, 0x76, 0xf8, 0xbd, 0x8f, 0xc1, 0x04, 0xb1, - 0x0c, 0x5e, 0xfa, 0x24, 0x6b, 0xc8, 0xec, 0xfd, 0xd0, 0x1b, 0x3f, 0xb2, 0xde, 0x78, 0xae, 0x0c, - 0xf9, 0x70, 0x7c, 0xa2, 0x2c, 0xb0, 0x08, 0x95, 0x62, 0xa4, 0x59, 0x59, 0xad, 0xad, 0x91, 0x36, - 0xe3, 0xe5, 0xaa, 0x14, 0x27, 0xed, 0xce, 0xe6, 0xc6, 0x6e, 0x55, 0x91, 0xf7, 0xb6, 0x77, 0x37, - 0xb6, 0xaa, 0x52, 0x22, 0xdc, 0x57, 0x7f, 0x37, 0x0e, 0x85, 0xde, 0x23, 0x12, 0xfa, 0x69, 0x38, - 0x29, 0xee, 0x33, 0x5c, 0xec, 0x29, 0x77, 0x74, 0x87, 0x6e, 0x99, 0x8e, 0xca, 0xca, 0x97, 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d, 0x79, 0xfc, 0x4c, 0x7c, 0x3e, 0x23, 0xe7, 0x74, 0xd7, 0xbf, 0x61, 0x9c, 0x7b, - 0x33, 0x0e, 0x85, 0xde, 0x5b, 0x7e, 0xb4, 0x06, 0x19, 0xc3, 0xd2, 0x54, 0x1a, 0x5a, 0xec, 0x27, - 0xa6, 0xf9, 0x88, 0x1f, 0x06, 0x16, 0x36, 0xb9, 0xbd, 0xec, 0x23, 0x67, 0xff, 0x25, 0x06, 0x19, - 0x21, 0x46, 0x27, 0x20, 0x69, 0xab, 0xde, 0x3e, 0xa5, 0x4b, 0xad, 0xc4, 0xa5, 0x98, 0x4c, 0x9f, - 0x89, 0xdc, 0xb5, 0x55, 0x93, 0x86, 0x00, 0x97, 0x93, 0x67, 0xb2, 0xae, 0x06, 0x56, 0x9b, 0xf4, - 0xf8, 0x61, 0x75, 0x3a, 0xd8, 0xf4, 0x5c, 0xb1, 0xae, 0x5c, 0xbe, 0xca, 0xc5, 0xe8, 0x69, 0x98, - 0xf2, 0x1c, 0x55, 0x37, 0x7a, 0x6c, 0x93, 0xd4, 0x56, 0x12, 0x0a, 0xdf, 0xb8, 0x0c, 0xa7, 0x04, - 0x6f, 0x13, 0x7b, 0xaa, 0xb6, 0x8f, 0x9b, 0x01, 0x28, 0x4d, 0xaf, 0x19, 0x4e, 0x72, 0x83, 0x35, - 0xae, 0x17, 0xd8, 0xb9, 0xef, 0xc7, 0x60, 0x4a, 0x1c, 0x98, 0x9a, 0xbe, 0xb3, 0xb6, 0x00, 0x54, - 0xd3, 0xb4, 0xbc, 0xb0, 0xbb, 0x06, 0x43, 0x79, 0x00, 0xb7, 0x50, 0xf1, 0x41, 0x72, 0x88, 0x60, - 0xb6, 0x03, 0x10, 0x68, 0x8e, 0x74, 0xdb, 0x69, 0xc8, 0xf1, 0x9f, 0x70, 0xe8, 0xef, 0x80, 0xec, - 0x88, 0x0d, 0x4c, 0x44, 0x4e, 0x56, 0x68, 0x06, 0x52, 0x0d, 0xdc,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4, 0xd4, - 0xc4, 0x9a, 0x11, 0xc1, 0xf0, 0x16, 0x1f, 0x88, 0x6f, 0x5f, 0xfe, 0x1c, 0xcc, 0x90, 0xff, 0x69, - 0x5a, 0x0a, 0x8f, 0x24, 0xfa, 0xc2, 0xab, 0xf8, 0xfd, 0x57, 0xd9, 0x76, 0x9c, 0xf6, 0x09, 0x42, - 0x63, 0x0a, 0xad, 0x62, 0x1b, 0x7b, 0x1e, 0x76, 0x5c, 0x45, 0x35, 0x86, 0x0d, 0x2f, 0x74, 0x63, - 0x50, 0xfc, 0xca, 0xbb, 0xbd, 0xab, 0xb8, 0xce, 0x90, 0x15, 0xc3, 0x28, 0xef, 0xc1, 0xc9, 0x21, - 0x51, 0x31, 0x02, 0xe7, 0x6b, 0x9c, 0x73, 0x66, 0x20, 0x32, 0x08, 0xed, 0x0e, 0x08, 0xb9, 0xbf, - 0x96, 0x23, 0x70, 0xfe, 0x1e, 0xe7, 0x44, 0x1c, 0x2b, 0x96, 0x94, 0x30, 0xde, 0x80, 0xa9, 0xdb, - 0xd8, 0x69, 0x58, 0x2e, 0xbf, 0xa5, 0x19, 0x81, 0xee, 0x75, 0x4e, 0x37, 0xc9, 0x81, 0xf4, 0xda, - 0x86, 0x70, 0x5d, 0x81, 0x4c, 0x4b, 0xd5, 0xf0, 0x08, 0x14, 0x5f, 0xe5, 0x14, 0xe3, 0xc4, 0x9e, - 0x40, 0x2b, 0x90, 0x6f, 0x5b, 0xbc, 0x32, 0x45, 0xc3, 0xdf, 0xe0, 0xf0, 0x9c, 0xc0, 0x70, 0x0a, - 0xdb, 0xb2, 0xbb, 0x06, 0x29, 0x5b, 0xd1, 0x14, 0xbf, 0x2f, 0x28, 0x04, 0x86, 0x53, 0x1c, 0xc3, - 0xad, 0x7f, 0x20, 0x28, 0xdc, 0x90, 0x3f, 0x9f, 0x87, 0x9c, 0x65, 0x1a, 0x07, 0x96, 0x39, 0xca, - 0x20, 0xfe, 0x90, 0x33, 0x00, 0x87, 0x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x5f, 0xe6, 0x7c, 0x53, 0x03, 0xf5, 0xb1, 0xfc, 0x02, 0x9c, - 0x18, 0x5e, 0x1c, 0xa3, 0x59, 0xbf, 0xf2, 0x7e, 0xdf, 0x71, 0x26, 0x5c, 0x1b, 0xcb, 0xbb, 0x41, - 0x96, 0x0d, 0x17, 0xc6, 0x68, 0xda, 0xd7, 0xde, 0xef, 0x4d, 0xb4, 0xe1, 0xba, 0x58, 0xae, 0x00, - 0x04, 0x35, 0x29, 0x9a, 0xeb, 0x75, 0xce, 0x15, 0x02, 0x91, 0xad, 0xc1, 0x4b, 0x52, 0x34, 0xfe, - 0xab, 0x62, 0x6b, 0x70, 0x04, 0xd9, 0x1a, 0xa2, 0x1a, 0x45, 0xa3, 0xdf, 0x10, 0x5b, 0x43, 0x40, - 0xca, 0x57, 0x21, 0x63, 0x76, 0x0d, 0x83, 0xc4, 0x16, 0x7a, 0xf0, 0x27, 0x59, 0xc5, 0x7f, 0xff, - 0x90, 0x83, 0x05, 0xa0, 0xbc, 0x0c, 0x29, 0xdc, 0x69, 0xe0, 0x66, 0x14, 0xf2, 0x3f, 0x3e, 0x14, - 0xf9, 0x84, 0x58, 0x97, 0x9f, 0x07, 0x60, 0x87, 0x69, 0xfa, 0x43, 0x51, 0x04, 0xf6, 0x3f, 0x3f, - 0xe4, 0x1f, 0x4b, 0x04, 0x90, 0x80, 0x80, 0x7d, 0x7a, 0xf1, 0x60, 0x82, 0x77, 0x7b, 0x09, 0xe8, - 0x01, 0xfc, 0x0a, 0x8c, 0xdf, 0x74, 0x2d, 0xd3, 0x53, 0xdb, 0x51, 0xe8, 0xff, 0xe2, 0x68, 0x61, - 0x4f, 0x1c, 0xd6, 0xb1, 0x1c, 0xec, 0xa9, 0x6d, 0x37, 0x0a, 0xfb, 0xdf, 0x1c, 0xeb, 0x03, 0x08, - 0x58, 0x53, 0x5d, 0x6f, 0x94, 0x79, 0xff, 0x58, 0x80, 0x05, 0x80, 0x0c, 0x9a, 0xfc, 0x7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x58, 0x8a, 0xbd, 0x7d, 0x58, 0x8a, 0xfd, - 0xe8, 0xb0, 0x34, 0xf6, 0xde, 0x61, 0x29, 0xf6, 0xc1, 0x61, 0x69, 0xec, 0xde, 0x0f, 0x4b, 0x63, - 0x8d, 0x34, 0x0d, 0xa3, 0xf3, 0xff, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x75, 0x79, 0x25, 0x04, 0x29, - 0x33, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Subby) - if !ok { - that2, ok := that.(Subby) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf) - if !ok { - that2, ok := that.(SampleOneOf) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field1) - if !ok { - that2, ok := that.(SampleOneOf_Field1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field2) - if !ok { - that2, ok := that.(SampleOneOf_Field2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field3) - if !ok { - that2, ok := that.(SampleOneOf_Field3) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field4) - if !ok { - that2, ok := that.(SampleOneOf_Field4) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field5) - if !ok { - that2, ok := that.(SampleOneOf_Field5) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field6) - if !ok { - that2, ok := that.(SampleOneOf_Field6) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field7) - if !ok { - that2, ok := that.(SampleOneOf_Field7) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field8) - if !ok { - that2, ok := that.(SampleOneOf_Field8) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field9) - if !ok { - that2, ok := that.(SampleOneOf_Field9) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field10) - if !ok { - that2, ok := that.(SampleOneOf_Field10) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field11) - if !ok { - that2, ok := that.(SampleOneOf_Field11) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field12) - if !ok { - that2, ok := that.(SampleOneOf_Field12) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field13) - if !ok { - that2, ok := that.(SampleOneOf_Field13) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field14) - if !ok { - that2, ok := that.(SampleOneOf_Field14) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_Field15) - if !ok { - that2, ok := that.(SampleOneOf_Field15) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*SampleOneOf_SubMessage) - if !ok { - that2, ok := that.(SampleOneOf_SubMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 NewPopulatedSubby(r randyOne, easy bool) *Subby { - this := &Subby{} - this.Sub = string(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 = string(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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint32(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(binary.LittleEndian.Uint64(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(binary.LittleEndian.Uint64(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 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/one.proto", fileDescriptorOne) } - -var fileDescriptorOne = []byte{ - // 409 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0xd2, 0xbf, 0x4f, 0x1b, 0x31, - 0x14, 0x07, 0x70, 0x3f, 0x8e, 0x24, 0xe0, 0x84, 0x92, 0xde, 0xf4, 0x8a, 0xaa, 0x27, 0x8b, 0xc9, - 0x0b, 0x49, 0x73, 0x97, 0xf0, 0x63, 0x45, 0x55, 0x95, 0xa5, 0x42, 0x0a, 0x7f, 0x00, 0x8a, 0xa9, - 0x13, 0x90, 0x72, 0x67, 0x94, 0xcb, 0x0d, 0xdd, 0xf8, 0x73, 0x3a, 0x76, 0xec, 0x9f, 0xc0, 0xc8, - 0xd8, 0xa1, 0x03, 0xe7, 0x2e, 0x1d, 0x19, 0x33, 0x56, 0xb9, 0xb4, 0xcf, 0xdb, 0xfb, 0xfa, 0x63, - 0x0f, 0xb6, 0xbf, 0xf2, 0xfd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 0x37, 0x83, 0x0d, 0x82, 0x25, 0xd8, - 0x51, 0xa0, 0xbb, 0xc1, 0x92, 0x60, 0x29, 0x1e, 0x28, 0xd0, 0x7b, 0xc1, 0xd2, 0x60, 0x43, 0x7c, - 0xb3, 0x79, 0xff, 0x60, 0xc3, 0x60, 0x23, 0x3c, 0x54, 0xa0, 0x3b, 0xc1, 0x46, 0xf1, 0x89, 0x6c, - 0x17, 0xa5, 0xb9, 0xc9, 0x6c, 0x51, 0x4c, 0xe7, 0x16, 0xbb, 0x0a, 0x74, 0x3b, 0x91, 0xbd, 0x4d, - 0x23, 0xea, 0x4f, 0x1d, 0x8b, 0x89, 0x2c, 0x4a, 0xf3, 0x79, 0xeb, 0x97, 0x1d, 0x29, 0x57, 0xb6, - 0x58, 0xdd, 0xb8, 0xdc, 0xba, 0xd9, 0xe5, 0xc7, 0xa7, 0x8a, 0xc4, 0x73, 0x45, 0xe2, 0x67, 0x45, - 0xe2, 0xa5, 0x22, 0x78, 0xad, 0x08, 0xd6, 0x15, 0xc1, 0xa3, 0x27, 0xf8, 0xe6, 0x09, 0xbe, 0x7b, - 0x82, 0x1f, 0x9e, 0xe0, 0xc9, 0x93, 0x78, 0xf6, 0x04, 0x2f, 0x9e, 0xe0, 0x8f, 0x27, 0xf1, 0xea, - 0x09, 0xd6, 0x9e, 0xc4, 0xe3, 0x6f, 0x12, 0xa6, 0x59, 0xd7, 0x28, 0xfd, 0x1b, 0x00, 0x00, 0xff, - 0xff, 0x3b, 0xfb, 0xd3, 0x99, 0x9a, 0x02, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto deleted file mode 100644 index d8b550438..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/one.proto +++ /dev/null @@ -1,82 +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 = "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/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go b/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go deleted file mode 100644 index 876e08161..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/combos/unmarshaler/onepb_test.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/one.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSampleOneOfProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSubbyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Subby{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SampleOneOf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Subby{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &SampleOneOf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSubby(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Subby{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSampleOneOf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &SampleOneOf{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSampleOneOfGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubbySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSubby(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSampleOneOf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/oneof3/doc.go b/vendor/github.com/gogo/protobuf/test/oneof3/doc.go deleted file mode 100644 index e668df5e0..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/doc.go +++ /dev/null @@ -1 +0,0 @@ -package oneof3 diff --git a/vendor/github.com/gogo/protobuf/test/oneof3/one.proto b/vendor/github.com/gogo/protobuf/test/oneof3/one.proto deleted file mode 100644 index 2eca9a07f..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneof3/one.proto +++ /dev/null @@ -1,82 +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 = "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/github.com/gogo/protobuf/test/oneofembed/Makefile b/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile deleted file mode 100644 index c68629fad..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneofembed/Makefile +++ /dev/null @@ -1,31 +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. - -regenerate: - protoc-min-version --proto_path=../../../../../:../../protobuf/:. --version="3.0.0" --gogo_out=. *.proto - diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go deleted file mode 100644 index 9ee4dbf69..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.pb.go +++ /dev/null @@ -1,390 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: oneofembed.proto - -/* -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 - -// 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 _ = proto1.GoGoProtoPackageIsVersion2 // please upgrade the proto package - -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() {} -func (*Foo) Descriptor() ([]byte, []int) { return fileDescriptorOneofembed, []int{0} } - -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() {} -func (*Bar) Descriptor() ([]byte, []int) { return fileDescriptorOneofembed, []int{1} } - -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), func(msg proto1.Message) (n int), []interface{}) { - return _Bar_OneofMarshaler, _Bar_OneofUnmarshaler, _Bar_OneofSizer, []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 _Bar_OneofSizer(msg proto1.Message) (n int) { - m := msg.(*Bar) - // pick - switch x := m.Pick.(type) { - case *Bar_A: - n += proto1.SizeVarint(11<<3 | proto1.WireVarint) - n += 1 - case *Bar_B: - n += proto1.SizeVarint(12<<3 | proto1.WireVarint) - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto1.RegisterType((*Foo)(nil), "proto.Foo") - proto1.RegisterType((*Bar)(nil), "proto.Bar") -} -func (this *Foo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Foo) - if !ok { - that2, ok := that.(Foo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Bar) - if !ok { - that2, ok := that.(Bar) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Bar_A) - if !ok { - that2, ok := that.(Bar_A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Bar_B) - if !ok { - that2, ok := that.(Bar_B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 -} - -func init() { proto1.RegisterFile("oneofembed.proto", fileDescriptorOneofembed) } - -var fileDescriptorOneofembed = []byte{ - // 171 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0xcf, 0x4b, 0xcd, - 0x4f, 0x4b, 0xcd, 0x4d, 0x4a, 0x4d, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, - 0x52, 0xba, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, - 0xf9, 0xfa, 0x60, 0xe1, 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0xba, 0x94, 0x34, - 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x94, 0xb8, 0x98, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, - 0x35, 0xb8, 0x8d, 0xb8, 0x20, 0x72, 0x7a, 0x4e, 0x89, 0x45, 0x4e, 0x2c, 0x17, 0xee, 0xc9, 0x33, - 0x06, 0x81, 0x24, 0x95, 0x74, 0xb9, 0x98, 0x9d, 0x12, 0x8b, 0x84, 0xf8, 0xb8, 0x18, 0x13, 0x25, - 0xb8, 0x15, 0x18, 0x35, 0x38, 0x3c, 0x18, 0x82, 0x18, 0x13, 0x41, 0xfc, 0x24, 0x09, 0x1e, 0x18, - 0x3f, 0xc9, 0x89, 0x8d, 0x8b, 0xa5, 0x20, 0x33, 0x39, 0xdb, 0x89, 0xe7, 0xc7, 0x43, 0x39, 0xc6, - 0x15, 0x8f, 0xe4, 0x18, 0x77, 0x3c, 0x92, 0x63, 0x4c, 0x62, 0x03, 0x1b, 0x69, 0x0c, 0x08, 0x00, - 0x00, 0xff, 0xff, 0x56, 0x58, 0x05, 0x27, 0xb8, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto deleted file mode 100644 index 8c1ee3835..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembed.proto +++ /dev/null @@ -1,46 +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 = "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; - } -} diff --git a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go b/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go deleted file mode 100644 index e5af25de8..000000000 --- a/vendor/github.com/gogo/protobuf/test/oneofembed/oneofembedpb_test.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: oneofembed.proto - -/* -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 rand "math/rand" -import time "time" -import proto1 "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, false) - dAtA, err := proto1.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - if err := proto1.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto1.Unmarshal(littlefuzz, msg) - } -} - -func TestBarProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedBar(popr, false) - dAtA, err := proto1.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Bar{} - if err := proto1.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto1.Unmarshal(littlefuzz, msg) - } -} - -func TestFooJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Foo{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Bar{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - dAtA := proto1.MarshalTextString(p) - msg := &Foo{} - if err := proto1.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFoo(popr, true) - dAtA := proto1.CompactTextString(p) - msg := &Foo{} - if err := proto1.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - dAtA := proto1.MarshalTextString(p) - msg := &Bar{} - if err := proto1.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBar(popr, true) - dAtA := proto1.CompactTextString(p) - msg := &Bar{} - if err := proto1.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/github.com/gogo/protobuf/test/packed/Makefile b/vendor/github.com/gogo/protobuf/test/packed/Makefile deleted file mode 100644 index 9d195810f..000000000 --- a/vendor/github.com/gogo/protobuf/test/packed/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. packed.proto) diff --git a/vendor/github.com/gogo/protobuf/test/packed/doc.go b/vendor/github.com/gogo/protobuf/test/packed/doc.go deleted file mode 100644 index e20ab1e95..000000000 --- a/vendor/github.com/gogo/protobuf/test/packed/doc.go +++ /dev/null @@ -1 +0,0 @@ -package packed diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go b/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go deleted file mode 100644 index a62dae7b2..000000000 --- a/vendor/github.com/gogo/protobuf/test/packed/packed.pb.go +++ /dev/null @@ -1,4221 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: packed.proto - -/* - 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 binary "encoding/binary" - -// 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 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 (*NinRepNative) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{0} } - -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 (*NinRepPackedNative) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{1} } - -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 (*NinRepNativeUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{2} } - -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 (*NinRepPackedNativeUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorPacked, []int{3} } - -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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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(10) - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 (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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 (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 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: 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 (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 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: 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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field1 = append(m.Field1, v2) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field2 = append(m.Field2, v2) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 == 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - case 4: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field4", wireType) - } - case 5: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field5", wireType) - } - case 6: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field6", wireType) - } - case 7: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - case 8: - 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 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 { - return fmt.Errorf("proto: wrong wireType = %d for field Field8", wireType) - } - case 9: - if wireType == 5 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field9 = append(m.Field9, v) - } else 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 - } - v = uint32(binary.LittleEndian.Uint32(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 == 5 { - var v int32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Field10 = append(m.Field10, v) - } else 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 - } - v = int32(binary.LittleEndian.Uint32(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 == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field11 = append(m.Field11, v) - } else 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 - } - v = uint64(binary.LittleEndian.Uint64(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 == 1 { - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Field12 = append(m.Field12, v) - } else 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 - } - v = int64(binary.LittleEndian.Uint64(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 == 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 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 { - 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 init() { proto.RegisterFile("packed.proto", fileDescriptorPacked) } - -var fileDescriptorPacked = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x92, 0xbf, 0x4e, 0xfa, 0x50, - 0x14, 0xc7, 0xd3, 0x9e, 0x52, 0xf8, 0xd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diff --git a/vendor/github.com/gogo/protobuf/test/packed/packed.proto b/vendor/github.com/gogo/protobuf/test/packed/packed.proto deleted file mode 100644 index f37df6e3d..000000000 --- a/vendor/github.com/gogo/protobuf/test/packed/packed.proto +++ /dev/null @@ -1,103 +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 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/github.com/gogo/protobuf/test/packed/packed_test.go b/vendor/github.com/gogo/protobuf/test/packed/packed_test.go deleted file mode 100644 index ea66292c6..000000000 --- a/vendor/github.com/gogo/protobuf/test/packed/packed_test.go +++ /dev/null @@ -1,328 +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 packed - -import ( - "bytes" - "fmt" - "github.com/gogo/protobuf/proto" - math_rand "math/rand" - "testing" - "time" - "unsafe" -) - -/* -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 { - t.Fatal(err) - } - packedmsg := &NinRepPackedNative{} - err = proto.Unmarshal(data1, packedmsg) - if err != nil { - t.Fatal(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) { - var bigendian uint32 = 0x01020304 - if *(*byte)(unsafe.Pointer(&bigendian)) == 1 { - t.Skip("unsafe does not work on big endian architectures") - } - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - msg1 := NewPopulatedNinRepNativeUnsafe(popr, true) - data1, err := proto.Marshal(msg1) - if err != nil { - t.Fatal(err) - } - packedmsg := &NinRepPackedNativeUnsafe{} - err = proto.Unmarshal(data1, packedmsg) - if err != nil { - t.Fatal(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/github.com/gogo/protobuf/test/proto3extension/Makefile b/vendor/github.com/gogo/protobuf/test/proto3extension/Makefile deleted file mode 100644 index 4477b52d3..000000000 --- a/vendor/github.com/gogo/protobuf/test/proto3extension/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2016, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - go install github.com/gogo/protobuf/protoc-min-version - protoc-min-version --version="3.0.0" --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../../:../../protobuf/:. *.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go b/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go deleted file mode 100644 index fe190bde1..000000000 --- a/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.pb.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto3ext.proto - -/* -Package proto3extension is a generated protocol buffer package. - -It is generated from these files: - proto3ext.proto - -It has these top-level messages: -*/ -package proto3extension - -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 - -// 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_Primary = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51234, - Name: "proto3extension.primary", - Tag: "varint,51234,opt,name=primary", - Filename: "proto3ext.proto", -} - -var E_Index = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51235, - Name: "proto3extension.index", - Tag: "varint,51235,opt,name=index", - Filename: "proto3ext.proto", -} - -func init() { - proto.RegisterExtension(E_Primary) - proto.RegisterExtension(E_Index) -} - -func init() { proto.RegisterFile("proto3ext.proto", fileDescriptorProto3Ext) } - -var fileDescriptorProto3Ext = []byte{ - // 137 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, - 0xc9, 0x37, 0x4e, 0xad, 0x28, 0xd1, 0x03, 0xb3, 0x84, 0x10, 0x02, 0xa9, 0x79, 0xc5, 0x99, 0xf9, - 0x79, 0x52, 0x0a, 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0xf1, 0xa4, 0xd2, 0x34, 0xfd, - 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xfc, 0x22, 0x88, 0x16, 0x2b, 0x4b, 0x2e, 0xf6, - 0x82, 0xa2, 0xcc, 0xdc, 0xc4, 0xa2, 0x4a, 0x21, 0x59, 0x3d, 0x88, 0x6a, 0x3d, 0x98, 0x6a, 0x3d, - 0xb7, 0xcc, 0xd4, 0x9c, 0x14, 0xff, 0x82, 0x92, 0xcc, 0xfc, 0xbc, 0x62, 0x89, 0x45, 0x13, 0x98, - 0x15, 0x18, 0x35, 0x38, 0x82, 0x60, 0xea, 0xad, 0x4c, 0xb9, 0x58, 0x33, 0xf3, 0x52, 0x52, 0x2b, - 0x08, 0x69, 0x5c, 0x0c, 0xd5, 0x08, 0x51, 0x9d, 0xc4, 0x06, 0x71, 0x24, 0x20, 0x00, 0x00, 0xff, - 0xff, 0xff, 0xd4, 0x32, 0x01, 0xbe, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto b/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto deleted file mode 100644 index 8249f7a99..000000000 --- a/vendor/github.com/gogo/protobuf/test/proto3extension/proto3ext.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package proto3extension; - -import "google/protobuf/descriptor.proto"; - -extend google.protobuf.FieldOptions { - bool primary = 51234; - bool index = 51235; -} - diff --git a/vendor/github.com/gogo/protobuf/test/protosize/Makefile b/vendor/github.com/gogo/protobuf/test/protosize/Makefile deleted file mode 100644 index dea154ae0..000000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. protosize.proto) diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go b/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go deleted file mode 100644 index d191e3997..000000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/protosize.pb.go +++ /dev/null @@ -1,595 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protosize.proto - -/* - Package protosize is a generated protocol buffer package. - - It is generated from these files: - protosize.proto - - It has these top-level messages: - SizeMessage -*/ -package protosize - -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 - -// 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 SizeMessage struct { - Size *int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"` - ProtoSize_ *int64 `protobuf:"varint,2,opt,name=proto_size,json=protoSize" json:"proto_size,omitempty"` - Equal_ *bool `protobuf:"varint,3,opt,name=Equal" json:"Equal,omitempty"` - String_ *string `protobuf:"bytes,4,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 (*SizeMessage) Descriptor() ([]byte, []int) { return fileDescriptorProtosize, []int{0} } - -func (m *SizeMessage) GetSize() int64 { - if m != nil && m.Size != nil { - return *m.Size - } - return 0 -} - -func (m *SizeMessage) GetProtoSize_() int64 { - if m != nil && m.ProtoSize_ != nil { - return *m.ProtoSize_ - } - 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), "protosize.SizeMessage") -} -func (this *SizeMessage) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SizeMessage) - if !ok { - that2, ok := that.(SizeMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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.ProtoSize_ != nil && that1.ProtoSize_ != nil { - if *this.ProtoSize_ != *that1.ProtoSize_ { - return false - } - } else if this.ProtoSize_ != nil { - return false - } else if that1.ProtoSize_ != 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.ProtoSize() - 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 = encodeVarintProtosize(dAtA, i, uint64(*m.Size)) - } - if m.ProtoSize_ != nil { - dAtA[i] = 0x10 - i++ - i = encodeVarintProtosize(dAtA, i, uint64(*m.ProtoSize_)) - } - if m.Equal_ != nil { - dAtA[i] = 0x18 - i++ - if *m.Equal_ { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - } - if m.String_ != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintProtosize(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 encodeVarintProtosize(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 randyProtosize, 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 := int64(r.Int63()) - if r.Intn(2) == 0 { - v2 *= -1 - } - this.ProtoSize_ = &v2 - } - if r.Intn(10) != 0 { - v3 := bool(bool(r.Intn(2) == 0)) - this.Equal_ = &v3 - } - if r.Intn(10) != 0 { - v4 := string(randStringProtosize(r)) - this.String_ = &v4 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedProtosize(r, 5) - } - return this -} - -type randyProtosize interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneProtosize(r randyProtosize) 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 randStringProtosize(r randyProtosize) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneProtosize(r) - } - return string(tmps) -} -func randUnrecognizedProtosize(r randyProtosize, 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 = randFieldProtosize(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldProtosize(dAtA []byte, r randyProtosize, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateProtosize(dAtA, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - dAtA = encodeVarintPopulateProtosize(dAtA, uint64(v6)) - case 1: - dAtA = encodeVarintPopulateProtosize(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 = encodeVarintPopulateProtosize(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateProtosize(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateProtosize(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 encodeVarintPopulateProtosize(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) ProtoSize() (n int) { - var l int - _ = l - if m.Size != nil { - n += 1 + sovProtosize(uint64(*m.Size)) - } - if m.ProtoSize_ != nil { - n += 1 + sovProtosize(uint64(*m.ProtoSize_)) - } - if m.Equal_ != nil { - n += 2 - } - if m.String_ != nil { - l = len(*m.String_) - n += 1 + l + sovProtosize(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovProtosize(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozProtosize(x uint64) (n int) { - return sovProtosize(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 ErrIntOverflowProtosize - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - 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 ErrIntOverflowProtosize - } - 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 ProtoSize_", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProtosize - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - m.ProtoSize_ = &v - case 3: - 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 ErrIntOverflowProtosize - } - 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 4: - 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 ErrIntOverflowProtosize - } - 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 ErrInvalidLengthProtosize - } - postIndex := iNdEx + intStringLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.String_ = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProtosize(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProtosize - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProtosize(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, ErrIntOverflowProtosize - } - 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, ErrIntOverflowProtosize - } - 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, ErrIntOverflowProtosize - } - 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, ErrInvalidLengthProtosize - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProtosize - } - 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 := skipProtosize(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 ( - ErrInvalidLengthProtosize = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProtosize = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("protosize.proto", fileDescriptorProtosize) } - -var fileDescriptorProtosize = []byte{ - // 182 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x28, 0xca, 0x2f, - 0xc9, 0x2f, 0xce, 0xac, 0x4a, 0xd5, 0x03, 0xb3, 0x84, 0x38, 0xe1, 0x02, 0x52, 0xba, 0xe9, 0x99, - 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0xe9, 0xf9, 0xfa, 0x60, 0xa9, - 0xa4, 0xd2, 0x34, 0x30, 0x0f, 0xcc, 0x01, 0xb3, 0x20, 0x3a, 0x95, 0xf2, 0xb8, 0xb8, 0x83, 0x33, - 0xab, 0x52, 0x7d, 0x53, 0x8b, 0x8b, 0x13, 0xd3, 0x53, 0x85, 0x84, 0xb8, 0x58, 0x40, 0xa6, 0x48, - 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0x81, 0xd9, 0x42, 0xb2, 0x5c, 0x5c, 0x60, 0xb5, 0xf1, 0x60, - 0x19, 0x26, 0xb0, 0x0c, 0xc4, 0x42, 0x90, 0x4e, 0x21, 0x11, 0x2e, 0x56, 0xd7, 0xc2, 0xd2, 0xc4, - 0x1c, 0x09, 0x66, 0x05, 0x46, 0x0d, 0x8e, 0x20, 0x08, 0x47, 0x48, 0x8c, 0x8b, 0x2d, 0xb8, 0xa4, - 0x28, 0x33, 0x2f, 0x5d, 0x82, 0x45, 0x81, 0x51, 0x83, 0x33, 0x08, 0xca, 0x73, 0x92, 0xf8, 0xf1, - 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x1d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, - 0xf0, 0x48, 0x8e, 0x71, 0xc1, 0x63, 0x39, 0x46, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xf7, - 0x87, 0xb3, 0xd5, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto b/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto deleted file mode 100644 index f2d10c1c8..000000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/protosize.proto +++ /dev/null @@ -1,46 +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 protosize; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.protosizer_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 int64 proto_size = 2; - optional bool Equal = 3; - optional string String = 4; -} diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go b/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go deleted file mode 100644 index 1a6d46768..000000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/protosize_test.go +++ /dev/null @@ -1,37 +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 protosize - -// We expect that Size field will have no suffix and ProtoSize will be present -var ( - _ = SizeMessage{}.Size - _ = (&SizeMessage{}).GetSize - - _ = (&SizeMessage{}).ProtoSize -) diff --git a/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go b/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go deleted file mode 100644 index a242d3a91..000000000 --- a/vendor/github.com/gogo/protobuf/test/protosize/protosizepb_test.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: protosize.proto - -/* -Package protosize is a generated protocol buffer package. - -It is generated from these files: - protosize.proto - -It has these top-level messages: - SizeMessage -*/ -package protosize - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSizeMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - size := p.ProtoSize() - dAtA := make([]byte, size) - for i := 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 := proto.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &SizeMessage{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &SizeMessage{} - if err := 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 TestSizeMessageProtoSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.ProtoSize() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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/github.com/gogo/protobuf/test/registration/.gitignore b/vendor/github.com/gogo/protobuf/test/registration/.gitignore deleted file mode 100644 index c6064dff9..000000000 --- a/vendor/github.com/gogo/protobuf/test/registration/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pb.go -*_test.go diff --git a/vendor/github.com/gogo/protobuf/test/registration/Makefile b/vendor/github.com/gogo/protobuf/test/registration/Makefile deleted file mode 100644 index 03a096d89..000000000 --- a/vendor/github.com/gogo/protobuf/test/registration/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2017, 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. - -test: - go install github.com/gogo/protobuf/protoc-gen-gogo - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. registration.proto) - cp registration_test.go.in registration_test.go - go test ./... diff --git a/vendor/github.com/gogo/protobuf/test/registration/registration.proto b/vendor/github.com/gogo/protobuf/test/registration/registration.proto deleted file mode 100644 index d8543a18b..000000000 --- a/vendor/github.com/gogo/protobuf/test/registration/registration.proto +++ /dev/null @@ -1,45 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; - -package registration; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.goproto_registration) = true; - -enum AnEnum { - A_VALUE = 0; - ANOTHER_VALUE = 1; -} - -message AMessage { - string a_string = 1; - uint32 a_uint = 2; -} diff --git a/vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in b/vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in deleted file mode 100644 index 93c843c73..000000000 --- a/vendor/github.com/gogo/protobuf/test/registration/registration_test.go.in +++ /dev/null @@ -1,85 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 registration - -import ( - "testing" - - gogoproto "github.com/gogo/protobuf/proto" - golangproto "github.com/golang/protobuf/proto" -) - -func TestEnumRegistered(t *testing.T) { - wantMap := map[string]int32{ - "A_VALUE": 0, - "ANOTHER_VALUE": 1, - } - gotMap := golangproto.EnumValueMap("registration.AnEnum") - for k, want := range wantMap { - got, ok := gotMap[k] - if !ok { - t.Errorf("Enum value %q was not registered with golang/protobuf", k) - } - if got != want { - t.Errorf("Enum value %q was different with golang/protobuf: want %v, got %v", k, want, got) - } - } - gotMap = gogoproto.EnumValueMap("registration.AnEnum") - for k, want := range wantMap { - got, ok := gotMap[k] - if !ok { - t.Errorf("Enum value %q was not registered with gogo/protobuf", k) - } - if got != want { - t.Errorf("Enum value %q was different with gogo/protobuf: want %v, got %v", k, want, got) - } - } -} - -func TestMessageRegistered(t *testing.T) { - got := golangproto.MessageType("registration.AMessage") - if got == nil { - t.Error(`Message "AMessage" was not registered with golang/protobuf`) - } - got = gogoproto.MessageType("registration.AMessage") - if got == nil { - t.Error(`Message "AMessage" was not registered with gogo/protobuf`) - } -} - -func TestFileRegistered(t *testing.T) { - got := golangproto.FileDescriptor("registration.proto") - if got == nil { - t.Error(`File "registration.proto" was not registered with golang/protobuf`) - } - got = gogoproto.FileDescriptor("registration.proto") - if got == nil { - t.Error(`File "registration.proto" was not registered with gogo/protobuf`) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/required/Makefile b/vendor/github.com/gogo/protobuf/test/required/Makefile deleted file mode 100644 index 34e6f70c6..000000000 --- a/vendor/github.com/gogo/protobuf/test/required/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. requiredexample.proto) diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go b/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go deleted file mode 100644 index 4427e67b8..000000000 --- a/vendor/github.com/gogo/protobuf/test/required/requiredexample.pb.go +++ /dev/null @@ -1,2148 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: requiredexample.proto - -/* - 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 binary "encoding/binary" - -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 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 (*RequiredExample) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{0} } - -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 (*NidOptNative) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{1} } - -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 (*NinOptNative) Descriptor() ([]byte, []int) { return fileDescriptorRequiredexample, []int{2} } - -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 (*NestedNinOptNative) Descriptor() ([]byte, []int) { - return fileDescriptorRequiredexample, []int{3} -} - -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, 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Field1)))) - i += 8 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Field2)))) - i += 4 - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field9)) - i += 4 - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Field10)) - i += 4 - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field11)) - i += 8 - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Field12)) - i += 8 - 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, proto.NewRequiredNotSetError("Field1") - } else { - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field1)))) - i += 8 - } - if m.Field2 == nil { - return 0, proto.NewRequiredNotSetError("Field2") - } else { - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(*m.Field2)))) - i += 4 - } - if m.Field3 == nil { - return 0, proto.NewRequiredNotSetError("Field3") - } else { - dAtA[i] = 0x18 - i++ - i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field3)) - } - if m.Field4 == nil { - return 0, proto.NewRequiredNotSetError("Field4") - } else { - dAtA[i] = 0x20 - i++ - i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field4)) - } - if m.Field5 == nil { - return 0, proto.NewRequiredNotSetError("Field5") - } else { - dAtA[i] = 0x28 - i++ - i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field5)) - } - if m.Field6 == nil { - return 0, proto.NewRequiredNotSetError("Field6") - } else { - dAtA[i] = 0x30 - i++ - i = encodeVarintRequiredexample(dAtA, i, uint64(*m.Field6)) - } - if m.Field7 == nil { - return 0, 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, 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, proto.NewRequiredNotSetError("Field9") - } else { - dAtA[i] = 0x4d - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field9)) - i += 4 - } - if m.Field10 == nil { - return 0, proto.NewRequiredNotSetError("Field10") - } else { - dAtA[i] = 0x55 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(*m.Field10)) - i += 4 - } - if m.Field11 == nil { - return 0, proto.NewRequiredNotSetError("Field11") - } else { - dAtA[i] = 0x59 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field11)) - i += 8 - } - if m.Field12 == nil { - return 0, proto.NewRequiredNotSetError("Field12") - } else { - dAtA[i] = 0x61 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(*m.Field12)) - i += 8 - } - if m.Field13 == nil { - return 0, 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, 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, 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 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 := string(randStringRequiredexample(r)) - this.TheRequiredString = &v1 - if r.Intn(10) != 0 { - v2 := string(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] = string(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 = string(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 := string(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(5) - 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 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Field9 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Field10 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Field11 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - m.Field12 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 proto.NewRequiredNotSetError("Field1") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return proto.NewRequiredNotSetError("Field2") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return proto.NewRequiredNotSetError("Field3") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return proto.NewRequiredNotSetError("Field4") - } - if hasFields[0]&uint64(0x00000010) == 0 { - return proto.NewRequiredNotSetError("Field5") - } - if hasFields[0]&uint64(0x00000020) == 0 { - return proto.NewRequiredNotSetError("Field6") - } - if hasFields[0]&uint64(0x00000040) == 0 { - return proto.NewRequiredNotSetError("Field7") - } - if hasFields[0]&uint64(0x00000080) == 0 { - return proto.NewRequiredNotSetError("Field8") - } - if hasFields[0]&uint64(0x00000100) == 0 { - return proto.NewRequiredNotSetError("Field9") - } - if hasFields[0]&uint64(0x00000200) == 0 { - return proto.NewRequiredNotSetError("Field10") - } - if hasFields[0]&uint64(0x00000400) == 0 { - return proto.NewRequiredNotSetError("Field11") - } - if hasFields[0]&uint64(0x00000800) == 0 { - return proto.NewRequiredNotSetError("Field12") - } - if hasFields[0]&uint64(0x00001000) == 0 { - return proto.NewRequiredNotSetError("Field13") - } - if hasFields[0]&uint64(0x00002000) == 0 { - return proto.NewRequiredNotSetError("Field14") - } - if hasFields[0]&uint64(0x00004000) == 0 { - return 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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(m.Field15[:0], dAtA[iNdEx:postIndex]...) - if m.Field15 == nil { - m.Field15 = []byte{} - } - 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 proto.NewRequiredNotSetError("Field1") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return proto.NewRequiredNotSetError("Field2") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return proto.NewRequiredNotSetError("Field3") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return proto.NewRequiredNotSetError("Field4") - } - if hasFields[0]&uint64(0x00000010) == 0 { - return proto.NewRequiredNotSetError("Field5") - } - if hasFields[0]&uint64(0x00000020) == 0 { - return proto.NewRequiredNotSetError("Field6") - } - if hasFields[0]&uint64(0x00000040) == 0 { - return proto.NewRequiredNotSetError("Field7") - } - if hasFields[0]&uint64(0x00000080) == 0 { - return proto.NewRequiredNotSetError("Field8") - } - if hasFields[0]&uint64(0x00000100) == 0 { - return proto.NewRequiredNotSetError("Field9") - } - if hasFields[0]&uint64(0x00000200) == 0 { - return proto.NewRequiredNotSetError("Field10") - } - if hasFields[0]&uint64(0x00000400) == 0 { - return proto.NewRequiredNotSetError("Field11") - } - if hasFields[0]&uint64(0x00000800) == 0 { - return proto.NewRequiredNotSetError("Field12") - } - if hasFields[0]&uint64(0x00001000) == 0 { - return proto.NewRequiredNotSetError("Field13") - } - if hasFields[0]&uint64(0x00002000) == 0 { - return proto.NewRequiredNotSetError("Field14") - } - if hasFields[0]&uint64(0x00004000) == 0 { - return 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") -) - -func init() { proto.RegisterFile("requiredexample.proto", fileDescriptorRequiredexample) } - -var fileDescriptorRequiredexample = []byte{ - // 469 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd4, 0xdd, 0x8e, 0xd2, 0x40, - 0x14, 0xc0, 0x71, 0x3b, 0x65, 0xf9, 0x98, 0x05, 0xd9, 0x6d, 0xe2, 0xe4, 0xc4, 0x98, 0x7a, 0xc2, - 0xd5, 0x5c, 0x68, 0x57, 0x0a, 0xec, 0x47, 0xe2, 0xd5, 0x26, 0x7a, 0xc9, 0x26, 0xf5, 0x09, 0x58, - 0x19, 0xd9, 0x26, 0x2c, 0xad, 0x30, 0x18, 0xaf, 0x7d, 0x0f, 0xdf, 0x67, 0x2f, 0x7d, 0x00, 0x63, - 0x94, 0xa7, 0xf0, 0xd2, 0x58, 0xda, 0x33, 0x9c, 0xea, 0x1d, 0x3d, 0xff, 0x33, 0x13, 0xc8, 0x8f, - 0x54, 0x3e, 0x59, 0x9b, 0x8f, 0xdb, 0x74, 0x6d, 0xe6, 0xe6, 0xf3, 0xec, 0x3e, 0x5f, 0x9a, 0x28, - 0x5f, 0x67, 0x36, 0x0b, 0xda, 0xd5, 0xf8, 0xe9, 0xcb, 0x45, 0x6a, 0xef, 0xb6, 0xb7, 0xd1, 0xfb, - 0xec, 0xfe, 0x6c, 0x91, 0x2d, 0xb2, 0xb3, 0x62, 0xe1, 0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0x97, 0xb9, - 0x1a, 0xba, 0x3e, 0x84, 0x63, 0x14, 0xba, 0xc9, 0xfb, 0xd0, 0xf5, 0x18, 0xba, 0x28, 0xf4, 0x09, - 0xef, 0xb1, 0xeb, 0x23, 0xe8, 0xa1, 0xd0, 0x6d, 0xde, 0x47, 0xae, 0x8f, 0xe1, 0xf1, 0xdf, 0x3f, - 0x08, 0xef, 0x63, 0xd7, 0x27, 0xd0, 0x47, 0xa1, 0xbb, 0xbc, 0x4f, 0x06, 0x5f, 0x0a, 0xde, 0x95, - 0xe3, 0x55, 0x9c, 0x97, 0x60, 0x15, 0x87, 0x25, 0x52, 0xc5, 0x49, 0x09, 0x53, 0x71, 0x4c, 0x62, - 0x54, 0x9c, 0x91, 0x00, 0x15, 0x07, 0x24, 0x3a, 0xc5, 0xe9, 0x08, 0x4d, 0x71, 0x34, 0xe2, 0x52, - 0x9c, 0x8b, 0xa0, 0xa0, 0x06, 0xe5, 0x88, 0xa0, 0x46, 0xe4, 0x70, 0xa0, 0x86, 0xe3, 0x58, 0xa0, - 0xc6, 0xe2, 0x40, 0xa0, 0x06, 0xe2, 0x28, 0xa0, 0x46, 0xe1, 0x10, 0x12, 0x19, 0x4c, 0xcd, 0xc6, - 0x9a, 0x39, 0x93, 0x78, 0x2d, 0x7b, 0x87, 0xd3, 0x0d, 0x78, 0xe8, 0xeb, 0xe3, 0x58, 0x45, 0xd5, - 0xab, 0x26, 0x3a, 0x5c, 0x4f, 0xf8, 0xf2, 0xf5, 0xc9, 0xef, 0x5f, 0xa1, 0xf7, 0xb0, 0x0b, 0xbd, - 0x6f, 0xbb, 0xd0, 0xfb, 0xb9, 0x0b, 0xbd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x03, 0x9e, 0xae, - 0x5f, 0xba, 0x04, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto b/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto deleted file mode 100644 index 33215936e..000000000 --- a/vendor/github.com/gogo/protobuf/test/required/requiredexample.proto +++ /dev/null @@ -1,83 +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 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/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go b/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go deleted file mode 100644 index b9c26375e..000000000 --- a/vendor/github.com/gogo/protobuf/test/required/requiredexamplepb_test.go +++ /dev/null @@ -1,181 +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 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/github.com/gogo/protobuf/test/sizerconflict/doc.go b/vendor/github.com/gogo/protobuf/test/sizerconflict/doc.go deleted file mode 100644 index 66ef52c40..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizerconflict/doc.go +++ /dev/null @@ -1 +0,0 @@ -package sizerconflict diff --git a/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto b/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto deleted file mode 100644 index 66345af80..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict.proto +++ /dev/null @@ -1,43 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 = "proto3"; -package sizerconflict; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -option (gogoproto.sizer_all) = true; -option (gogoproto.protosizer_all) = true; - -message Value { - oneof type { - int64 type_one = 1; - uint64 type_two = 2; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go b/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go deleted file mode 100644 index 907b923f7..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizerconflict/sizerconflict_test.go +++ /dev/null @@ -1,48 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2017, 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 sizerconflict - -import ( - "os" - "os/exec" - "strings" - "testing" -) - -func TestSizerConflict(t *testing.T) { - cmd := exec.Command("protoc", "--gogo_out=.", "-I=../../../../../:../../protobuf/:./", "sizerconflict.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("sizerconflict.pb.go"); err != nil { - t.Error(err) - } - } - t.Logf("received expected error = %v and output = %v", err, string(data)) -} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile b/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile deleted file mode 100644 index fca7b2afa..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizeunderscore/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. sizeunderscore.proto) diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go deleted file mode 100644 index 6bbe9c80a..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.pb.go +++ /dev/null @@ -1,542 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: sizeunderscore.proto - -/* - 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 - -// 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 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 (*SizeMessage) Descriptor() ([]byte, []int) { return fileDescriptorSizeunderscore, []int{0} } - -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 { - return this == nil - } - - that1, ok := that.(*SizeMessage) - if !ok { - that2, ok := that.(SizeMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 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 := string(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") -) - -func init() { proto.RegisterFile("sizeunderscore.proto", fileDescriptorSizeunderscore) } - -var fileDescriptorSizeunderscore = []byte{ - // 174 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xce, 0xac, 0x4a, - 0x2d, 0xcd, 0x4b, 0x49, 0x2d, 0x2a, 0x4e, 0xce, 0x2f, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, - 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, - 0x0b, 0xa2, 0x5d, 0xc9, 0x9f, 0x8b, 0x3b, 0x38, 0xb3, 0x2a, 0xd5, 0x37, 0xb5, 0xb8, 0x38, 0x31, - 0x3d, 0x55, 0x48, 0x88, 0x8b, 0x05, 0x64, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x98, - 0x2d, 0x24, 0xc2, 0xc5, 0xea, 0x5a, 0x58, 0x9a, 0x98, 0x23, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x11, - 0x04, 0xe1, 0x08, 0x89, 0x71, 0xb1, 0x05, 0x97, 0x14, 0x65, 0xe6, 0xa5, 0x4b, 0x30, 0x2b, 0x30, - 0x6a, 0x70, 0x06, 0x41, 0x79, 0x4e, 0x12, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, - 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, - 0x08, 0x08, 0x00, 0x00, 0xff, 0xff, 0x37, 0x1c, 0x48, 0xa4, 0xc0, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto deleted file mode 100644 index 922f53229..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscore.proto +++ /dev/null @@ -1,45 +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 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/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go b/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go deleted file mode 100644 index c499477d8..000000000 --- a/vendor/github.com/gogo/protobuf/test/sizeunderscore/sizeunderscorepb_test.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: sizeunderscore.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %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 - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestSizeMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &SizeMessage{} - err = 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &SizeMessage{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &SizeMessage{} - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSizeMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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/github.com/gogo/protobuf/test/stdtypes/Makefile b/vendor/github.com/gogo/protobuf/test/stdtypes/Makefile deleted file mode 100644 index 82c4c8c0b..000000000 --- a/vendor/github.com/gogo/protobuf/test/stdtypes/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2016, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-min-version - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=\ - Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types\ - :. \ - --proto_path=../../../../../:../../protobuf/:. stdtypes.proto - -test: - go test -race -run=TestConcurrentTextMarshal . \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go b/vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go deleted file mode 100644 index fd1181fff..000000000 --- a/vendor/github.com/gogo/protobuf/test/stdtypes/concurrency_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package stdtypes - -import ( - "io/ioutil" - "sync" - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestConcurrentTextMarshal(t *testing.T) { - // Verify that there are no race conditions when calling - // TextMarshaler.Marshal on a protobuf message that contains a StdDuration - - std := StdTypes{} - var wg sync.WaitGroup - - tm := proto.TextMarshaler{} - - for i := 0; i < 2; i++ { - wg.Add(1) - go func() { - defer wg.Done() - err := tm.Marshal(ioutil.Discard, &std) - if err != nil { - t.Fatal(err) - } - }() - } - wg.Wait() -} diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go deleted file mode 100644 index c7e34f8a9..000000000 --- a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.pb.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stdtypes.proto - -/* -Package stdtypes is a generated protocol buffer package. - -It is generated from these files: - stdtypes.proto - -It has these top-level messages: - StdTypes - RepStdTypes - MapStdTypes - OneofStdTypes -*/ -package stdtypes - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -import time "time" -import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import types "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 StdTypes struct { - NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` - NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` - Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` -} - -func (m *StdTypes) Reset() { *m = StdTypes{} } -func (m *StdTypes) String() string { return proto.CompactTextString(m) } -func (*StdTypes) ProtoMessage() {} -func (*StdTypes) Descriptor() ([]byte, []int) { return fileDescriptorStdtypes, []int{0} } - -func (m *StdTypes) GetNullableTimestamp() *time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *StdTypes) GetNullableDuration() *time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *StdTypes) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *StdTypes) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -type RepStdTypes struct { - NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` - NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` - Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` - Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` -} - -func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } -func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } -func (*RepStdTypes) ProtoMessage() {} -func (*RepStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorStdtypes, []int{1} } - -func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepStdTypes) GetNullableDurations() []*time.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepStdTypes) GetTimestamps() []time.Time { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepStdTypes) GetDurations() []time.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type MapStdTypes struct { - NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } -func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } -func (*MapStdTypes) ProtoMessage() {} -func (*MapStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorStdtypes, []int{2} } - -func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapStdTypes) GetDuration() map[int32]time.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type OneofStdTypes struct { - // Types that are valid to be assigned to OneOfStdTimes: - // *OneofStdTypes_Timestamp - // *OneofStdTypes_Duration - OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` -} - -func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } -func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } -func (*OneofStdTypes) ProtoMessage() {} -func (*OneofStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorStdtypes, []int{3} } - -type isOneofStdTypes_OneOfStdTimes interface { - isOneofStdTypes_OneOfStdTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type OneofStdTypes_Timestamp struct { - Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` -} -type OneofStdTypes_Duration struct { - Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` -} - -func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} -func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} - -func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { - if m != nil { - return m.OneOfStdTimes - } - return nil -} - -func (m *OneofStdTypes) GetTimestamp() *time.Time { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofStdTypes) GetDuration() *time.Duration { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ - (*OneofStdTypes_Timestamp)(nil), - (*OneofStdTypes_Duration)(nil), - } -} - -func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case *OneofStdTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) - } - return nil -} - -func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofStdTypes) - switch tag { - case 1: // OneOfStdTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Time) - if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} - return true, err - case 2: // OneOfStdTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Duration) - if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{c} - return true, err - default: - return false, nil - } -} - -func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofStdTypes_Duration: - s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterType((*StdTypes)(nil), "stdtypes.StdTypes") - proto.RegisterType((*RepStdTypes)(nil), "stdtypes.RepStdTypes") - proto.RegisterType((*MapStdTypes)(nil), "stdtypes.MapStdTypes") - proto.RegisterType((*OneofStdTypes)(nil), "stdtypes.OneofStdTypes") -} -func (this *StdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *StdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *StdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) - } - } else if this.NullableDuration != nil { - return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") - } else if that1.NullableDuration != nil { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if this.Duration != that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *StdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return false - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return false - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return false - } - } else if this.NullableDuration != nil { - return false - } else if that1.NullableDuration != nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if this.Duration != that1.Duration { - return false - } - return true -} -func (this *RepStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return false - } - } - return true -} -func (this *MapStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return false - } - } - return true -} -func (this *OneofStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") - } - } else if this.OneOfStdTimes == nil { - return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") - } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { - return err - } - return nil -} -func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) - } - } else if this.Duration != nil { - return fmt.Errorf("this.Duration == nil && that.Duration != nil") - } else if that1.Duration != nil { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return false - } - } else if this.OneOfStdTimes == nil { - return false - } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { - return false - } - return true -} -func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return false - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return false - } - return true -} -func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return false - } - } else if this.Duration != nil { - return false - } else if that1.Duration != nil { - return false - } - return true -} -func (this *StdTypes) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&stdtypes.StdTypes{") - s = append(s, "NullableTimestamp: "+fmt.Sprintf("%#v", this.NullableTimestamp)+",\n") - s = append(s, "NullableDuration: "+fmt.Sprintf("%#v", this.NullableDuration)+",\n") - s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") - s = append(s, "Duration: "+fmt.Sprintf("%#v", this.Duration)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *RepStdTypes) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&stdtypes.RepStdTypes{") - s = append(s, "NullableTimestamps: "+fmt.Sprintf("%#v", this.NullableTimestamps)+",\n") - s = append(s, "NullableDurations: "+fmt.Sprintf("%#v", this.NullableDurations)+",\n") - s = append(s, "Timestamps: "+fmt.Sprintf("%#v", this.Timestamps)+",\n") - s = append(s, "Durations: "+fmt.Sprintf("%#v", this.Durations)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *MapStdTypes) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&stdtypes.MapStdTypes{") - keysForNullableTimestamp := make([]int32, 0, len(this.NullableTimestamp)) - for k := range this.NullableTimestamp { - keysForNullableTimestamp = append(keysForNullableTimestamp, k) - } - sortkeys.Int32s(keysForNullableTimestamp) - mapStringForNullableTimestamp := "map[int32]*time.Time{" - for _, k := range keysForNullableTimestamp { - mapStringForNullableTimestamp += fmt.Sprintf("%#v: %#v,", k, this.NullableTimestamp[k]) - } - mapStringForNullableTimestamp += "}" - if this.NullableTimestamp != nil { - s = append(s, "NullableTimestamp: "+mapStringForNullableTimestamp+",\n") - } - keysForTimestamp := make([]int32, 0, len(this.Timestamp)) - for k := range this.Timestamp { - keysForTimestamp = append(keysForTimestamp, k) - } - sortkeys.Int32s(keysForTimestamp) - mapStringForTimestamp := "map[int32]time.Time{" - for _, k := range keysForTimestamp { - mapStringForTimestamp += fmt.Sprintf("%#v: %#v,", k, this.Timestamp[k]) - } - mapStringForTimestamp += "}" - if this.Timestamp != nil { - s = append(s, "Timestamp: "+mapStringForTimestamp+",\n") - } - keysForNullableDuration := make([]int32, 0, len(this.NullableDuration)) - for k := range this.NullableDuration { - keysForNullableDuration = append(keysForNullableDuration, k) - } - sortkeys.Int32s(keysForNullableDuration) - mapStringForNullableDuration := "map[int32]*time.Duration{" - for _, k := range keysForNullableDuration { - mapStringForNullableDuration += fmt.Sprintf("%#v: %#v,", k, this.NullableDuration[k]) - } - mapStringForNullableDuration += "}" - if this.NullableDuration != nil { - s = append(s, "NullableDuration: "+mapStringForNullableDuration+",\n") - } - keysForDuration := make([]int32, 0, len(this.Duration)) - for k := range this.Duration { - keysForDuration = append(keysForDuration, k) - } - sortkeys.Int32s(keysForDuration) - mapStringForDuration := "map[int32]time.Duration{" - for _, k := range keysForDuration { - mapStringForDuration += fmt.Sprintf("%#v: %#v,", k, this.Duration[k]) - } - mapStringForDuration += "}" - if this.Duration != nil { - s = append(s, "Duration: "+mapStringForDuration+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OneofStdTypes) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&stdtypes.OneofStdTypes{") - if this.OneOfStdTimes != nil { - s = append(s, "OneOfStdTimes: "+fmt.Sprintf("%#v", this.OneOfStdTimes)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *OneofStdTypes_Timestamp) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&stdtypes.OneofStdTypes_Timestamp{` + - `Timestamp:` + fmt.Sprintf("%#v", this.Timestamp) + `}`}, ", ") - return s -} -func (this *OneofStdTypes_Duration) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&stdtypes.OneofStdTypes_Duration{` + - `Duration:` + fmt.Sprintf("%#v", this.Duration) + `}`}, ", ") - return s -} -func valueToGoStringStdtypes(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 NewPopulatedStdTypes(r randyStdtypes, easy bool) *StdTypes { - this := &StdTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = types.NewPopulatedStdTime(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = types.NewPopulatedStdDuration(r, easy) - } - v1 := types.NewPopulatedStdTime(r, easy) - this.Timestamp = *v1 - v2 := types.NewPopulatedStdDuration(r, easy) - this.Duration = *v2 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepStdTypes(r randyStdtypes, easy bool) *RepStdTypes { - this := &RepStdTypes{} - if r.Intn(10) != 0 { - v3 := r.Intn(5) - this.NullableTimestamps = make([]*time.Time, v3) - for i := 0; i < v3; i++ { - this.NullableTimestamps[i] = types.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v4 := r.Intn(5) - this.NullableDurations = make([]*time.Duration, v4) - for i := 0; i < v4; i++ { - this.NullableDurations[i] = types.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v5 := r.Intn(5) - this.Timestamps = make([]time.Time, v5) - for i := 0; i < v5; i++ { - v6 := types.NewPopulatedStdTime(r, easy) - this.Timestamps[i] = *v6 - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(5) - this.Durations = make([]time.Duration, v7) - for i := 0; i < v7; i++ { - v8 := types.NewPopulatedStdDuration(r, easy) - this.Durations[i] = *v8 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapStdTypes(r randyStdtypes, easy bool) *MapStdTypes { - this := &MapStdTypes{} - if r.Intn(10) != 0 { - v9 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*time.Time) - for i := 0; i < v9; i++ { - this.NullableTimestamp[int32(r.Int31())] = types.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v10 := r.Intn(10) - this.Timestamp = make(map[int32]time.Time) - for i := 0; i < v10; i++ { - this.Timestamp[int32(r.Int31())] = *types.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v11 := r.Intn(10) - this.NullableDuration = make(map[int32]*time.Duration) - for i := 0; i < v11; i++ { - this.NullableDuration[int32(r.Int31())] = types.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(10) - this.Duration = make(map[int32]time.Duration) - for i := 0; i < v12; i++ { - this.Duration[int32(r.Int31())] = *types.NewPopulatedStdDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofStdTypes(r randyStdtypes, easy bool) *OneofStdTypes { - this := &OneofStdTypes{} - oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfStdTimes { - case 1: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) - case 2: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofStdTypes_Timestamp(r randyStdtypes, easy bool) *OneofStdTypes_Timestamp { - this := &OneofStdTypes_Timestamp{} - this.Timestamp = types.NewPopulatedStdTime(r, easy) - return this -} -func NewPopulatedOneofStdTypes_Duration(r randyStdtypes, easy bool) *OneofStdTypes_Duration { - this := &OneofStdTypes_Duration{} - this.Duration = types.NewPopulatedStdDuration(r, easy) - return this -} - -type randyStdtypes interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneStdtypes(r randyStdtypes) 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 randStringStdtypes(r randyStdtypes) string { - v13 := r.Intn(100) - tmps := make([]rune, v13) - for i := 0; i < v13; i++ { - tmps[i] = randUTF8RuneStdtypes(r) - } - return string(tmps) -} -func randUnrecognizedStdtypes(r randyStdtypes, 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 = randFieldStdtypes(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldStdtypes(dAtA []byte, r randyStdtypes, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(key)) - v14 := r.Int63() - if r.Intn(2) == 0 { - v14 *= -1 - } - dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(v14)) - case 1: - dAtA = encodeVarintPopulateStdtypes(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 = encodeVarintPopulateStdtypes(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateStdtypes(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateStdtypes(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 encodeVarintPopulateStdtypes(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 *StdTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = types.SizeOfStdTime(*m.NullableTimestamp) - n += 1 + l + sovStdtypes(uint64(l)) - } - if m.NullableDuration != nil { - l = types.SizeOfStdDuration(*m.NullableDuration) - n += 1 + l + sovStdtypes(uint64(l)) - } - l = types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovStdtypes(uint64(l)) - l = types.SizeOfStdDuration(m.Duration) - n += 1 + l + sovStdtypes(uint64(l)) - return n -} - -func (m *RepStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = types.SizeOfStdTime(*e) - n += 1 + l + sovStdtypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = types.SizeOfStdDuration(*e) - n += 1 + l + sovStdtypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = types.SizeOfStdTime(e) - n += 1 + l + sovStdtypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = types.SizeOfStdDuration(e) - n += 1 + l + sovStdtypes(uint64(l)) - } - } - return n -} - -func (m *MapStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = types.SizeOfStdTime(*v) - l += 1 + sovStdtypes(uint64(l)) - } - mapEntrySize := 1 + sovStdtypes(uint64(k)) + l - n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = types.SizeOfStdTime(v) - mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) - n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = types.SizeOfStdDuration(*v) - l += 1 + sovStdtypes(uint64(l)) - } - mapEntrySize := 1 + sovStdtypes(uint64(k)) + l - n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = types.SizeOfStdDuration(v) - mapEntrySize := 1 + sovStdtypes(uint64(k)) + 1 + l + sovStdtypes(uint64(l)) - n += mapEntrySize + 1 + sovStdtypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *OneofStdTypes) Size() (n int) { - var l int - _ = l - if m.OneOfStdTimes != nil { - n += m.OneOfStdTimes.Size() - } - return n -} - -func (m *OneofStdTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = types.SizeOfStdTime(*m.Timestamp) - n += 1 + l + sovStdtypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = types.SizeOfStdDuration(*m.Duration) - n += 1 + l + sovStdtypes(uint64(l)) - } - return n -} - -func sovStdtypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozStdtypes(x uint64) (n int) { - return sovStdtypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func init() { proto.RegisterFile("stdtypes.proto", fileDescriptorStdtypes) } - -var fileDescriptorStdtypes = []byte{ - // 540 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x94, 0x31, 0x6f, 0xd3, 0x40, - 0x1c, 0xc5, 0x7d, 0x4e, 0x82, 0xd2, 0x7f, 0xd4, 0x52, 0x4e, 0x02, 0x19, 0x0f, 0x97, 0x2a, 0x30, - 0x20, 0x51, 0x1c, 0x04, 0x0b, 0x42, 0x42, 0x80, 0x55, 0xa4, 0x22, 0x68, 0x8b, 0x42, 0x85, 0x58, - 0x40, 0x75, 0x88, 0x6b, 0x22, 0x9c, 0x5c, 0x14, 0x9f, 0x91, 0xb2, 0xf1, 0x11, 0x18, 0x59, 0xd9, - 0x18, 0xd8, 0x61, 0x64, 0xec, 0xc8, 0x8e, 0x04, 0x8d, 0xf9, 0x02, 0x8c, 0x1d, 0x91, 0xcf, 0x3e, - 0x9f, 0x13, 0x5f, 0xea, 0x2c, 0xdd, 0x7c, 0xf1, 0xff, 0xfd, 0xee, 0xe5, 0xf9, 0xdd, 0xc1, 0x5a, - 0xc0, 0x7a, 0x6c, 0x32, 0x72, 0x03, 0x6b, 0x34, 0xa6, 0x8c, 0xe2, 0xba, 0x58, 0x9b, 0x37, 0xbc, - 0x3e, 0x7b, 0x1b, 0x76, 0xad, 0x37, 0x74, 0xd0, 0xf6, 0xa8, 0x47, 0xdb, 0x7c, 0xa0, 0x1b, 0x1e, - 0xf2, 0x15, 0x5f, 0xf0, 0xa7, 0x44, 0x68, 0x12, 0x8f, 0x52, 0xcf, 0x77, 0xe5, 0x54, 0x2f, 0x1c, - 0x3b, 0xac, 0x4f, 0x87, 0xe9, 0xfb, 0xe6, 0xfc, 0x7b, 0xd6, 0x1f, 0xb8, 0x01, 0x73, 0x06, 0xa3, - 0x64, 0xa0, 0xf5, 0x55, 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00, 0xff, 0xff, 0x00, 0x68, 0x05, 0x4b, 0xab, 0x06, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto deleted file mode 100644 index fb69b7327..000000000 --- a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypes.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package stdtypes; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -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.equal_all) = true; -option (gogoproto.gostring_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message StdTypes { - google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message RepStdTypes { - repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; - repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message MapStdTypes { - map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - map nullableDuration = 3 [(gogoproto.stdduration) = true]; - map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message OneofStdTypes { - oneof OneOfStdTimes { - google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go b/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go deleted file mode 100644 index 86885c929..000000000 --- a/vendor/github.com/gogo/protobuf/test/stdtypes/stdtypespb_test.go +++ /dev/null @@ -1,807 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: stdtypes.proto - -/* -Package stdtypes is a generated protocol buffer package. - -It is generated from these files: - stdtypes.proto - -It has these top-level messages: - StdTypes - RepStdTypes - MapStdTypes - OneofStdTypes -*/ -package stdtypes - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &StdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestStdTypesGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStdTypes(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestRepStdTypesGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepStdTypes(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMapStdTypesGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapStdTypes(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOneofStdTypesGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofStdTypes(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/tags/Makefile b/vendor/github.com/gogo/protobuf/test/tags/Makefile deleted file mode 100644 index e1105dc5e..000000000 --- a/vendor/github.com/gogo/protobuf/test/tags/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. tags.proto) diff --git a/vendor/github.com/gogo/protobuf/test/tags/doc.go b/vendor/github.com/gogo/protobuf/test/tags/doc.go deleted file mode 100644 index 2eee96184..000000000 --- a/vendor/github.com/gogo/protobuf/test/tags/doc.go +++ /dev/null @@ -1 +0,0 @@ -package tags diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go b/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go deleted file mode 100644 index 2cda68912..000000000 --- a/vendor/github.com/gogo/protobuf/test/tags/tags.pb.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: tags.proto - -/* -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 - -// 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 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 (*Outside) Descriptor() ([]byte, []int) { return fileDescriptorTags, []int{0} } - -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 (*Inside) Descriptor() ([]byte, []int) { return fileDescriptorTags, []int{1} } - -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 := string(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 := string(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 -} - -func init() { proto.RegisterFile("tags.proto", fileDescriptorTags) } - -var fileDescriptorTags = []byte{ - // 203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x4c, 0x2f, - 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32, - 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5, - 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0x15, 0x72, 0xb1, 0xfb, 0x97, 0x96, 0x14, - 0x67, 0xa6, 0xa4, 0x0a, 0xe9, 0x71, 0xb1, 0x79, 0xe6, 0x81, 0x58, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, - 0xdc, 0x46, 0x3c, 0x7a, 0x60, 0xc3, 0x21, 0x62, 0x4e, 0x1c, 0x17, 0xee, 0xc9, 0x33, 0xbe, 0xba, - 0x27, 0xcf, 0x10, 0x04, 0x55, 0x25, 0x64, 0xc6, 0xc5, 0xe6, 0x96, 0x99, 0x9a, 0x93, 0x62, 0x24, - 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0xe9, 0x24, 0xf7, 0xea, 0x9e, 0x3c, 0x87, 0x6f, 0x25, 0x44, 0xec, - 0xd3, 0x3d, 0x79, 0xbe, 0x8a, 0xdc, 0x1c, 0x2b, 0x25, 0x9d, 0xe4, 0xfc, 0xdc, 0xdc, 0xd4, 0xbc, - 0x12, 0xa5, 0x20, 0xa8, 0x6a, 0x25, 0x47, 0x98, 0x3d, 0x42, 0xe6, 0x50, 0x13, 0x0c, 0xc1, 0x36, - 0x72, 0x3a, 0xc9, 0x23, 0x99, 0x60, 0xf8, 0xe9, 0x9e, 0x3c, 0x3f, 0xd4, 0x84, 0x8c, 0xc4, 0xa2, - 0x94, 0xc4, 0x92, 0x44, 0x98, 0x11, 0x86, 0x4e, 0x2c, 0x3f, 0x1e, 0xca, 0x31, 0x02, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x57, 0x12, 0x09, 0x10, 0xfd, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/tags/tags.proto b/vendor/github.com/gogo/protobuf/test/tags/tags.proto deleted file mode 100644 index f4ef2a68d..000000000 --- a/vendor/github.com/gogo/protobuf/test/tags/tags.proto +++ /dev/null @@ -1,44 +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 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/github.com/gogo/protobuf/test/tags/tags_test.go b/vendor/github.com/gogo/protobuf/test/tags/tags_test.go deleted file mode 100644 index 460273e42..000000000 --- a/vendor/github.com/gogo/protobuf/test/tags/tags_test.go +++ /dev/null @@ -1,119 +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 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/github.com/gogo/protobuf/test/theproto3/Makefile b/vendor/github.com/gogo/protobuf/test/theproto3/Makefile deleted file mode 100644 index fe1b67619..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/Makefile +++ /dev/null @@ -1,36 +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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogo - cp header.proto theproto3.proto - cat maps.proto >> theproto3.proto - cat footer.proto >> theproto3.proto - protoc-gen-combo --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. theproto3.proto - find combos -type d -not -name combos -exec cp proto3_test.go.in {}/proto3_test.go \; diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go deleted file mode 100644 index bb7eb6bb9..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/proto3_test.go +++ /dev/null @@ -1,159 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 theproto3 - -import ( - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestCustomTypeSize(t *testing.T) { - m := &Uint128Pair{} - m.Size() // Should not panic. -} - -func TestCustomTypeMarshalUnmarshal(t *testing.T) { - m1 := &Uint128Pair{} - if b, err := proto.Marshal(m1); err != nil { - t.Fatal(err) - } else { - m2 := &Uint128Pair{} - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(m1, m2) { - t.Errorf("expected %+v, got %+v", m1, m2) - } - } -} - -func TestNotPackedToPacked(t *testing.T) { - input := []uint64{1, 10e9} - notpacked := &NotPacked{Key: input} - if data, err := proto.Marshal(notpacked); err != nil { - t.Fatal(err) - } else { - packed := &Message{} - if err := proto.Unmarshal(data, packed); err != nil { - t.Fatal(err) - } - output := packed.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} - -func TestPackedToNotPacked(t *testing.T) { - input := []uint64{1, 10e9} - packed := &Message{Key: input} - if data, err := proto.Marshal(packed); err != nil { - t.Fatal(err) - } else { - notpacked := &NotPacked{} - if err := proto.Unmarshal(data, notpacked); err != nil { - t.Fatal(err) - } - output := notpacked.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go deleted file mode 100644 index 7b5ec4a2d..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.pb.go +++ /dev/null @@ -1,11056 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/theproto3.proto - -/* - 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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import binary "encoding/binary" - -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 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 (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -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, -} - -func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } - -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,json=heightInCm,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,json=resultCount,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,packed,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=proto2Field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" 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() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} -func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } - -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() {} -func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" 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=msgMapping" 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=byteMapping" 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() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } - -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 (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } - -type Uint128Pair struct { - Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` - Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` -} - -func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } -func (*Uint128Pair) ProtoMessage() {} -func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } - -type ContainsNestedMap struct { -} - -func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } -func (*ContainsNestedMap) ProtoMessage() {} -func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } - -type ContainsNestedMap_NestedMap struct { - NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` -} - -func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } -func (*ContainsNestedMap_NestedMap) ProtoMessage() {} -func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { - return fileDescriptorTheproto3, []int{7, 0} -} - -type NotPacked struct { - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` -} - -func (m *NotPacked) Reset() { *m = NotPacked{} } -func (*NotPacked) ProtoMessage() {} -func (*NotPacked) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{8} } - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") - proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") - proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") - proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") - 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 *AllMapsOrdered) 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 (this *Uint128Pair) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *NotPacked) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7946 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0xbd, 0x5b, 0x70, 0x23, 0xd7, - 0x99, 0x1f, 0x3e, 0x8d, 0x06, 0x49, 0xf0, 0x03, 0x48, 0x36, 0x9b, 0x33, 0x14, 0x44, 0x8d, 0xc8, - 0x19, 0x68, 0x34, 0xa2, 0x68, 0x8b, 0x33, 0xc3, 0xe1, 0xdc, 0x30, 0x96, 0xb4, 0x00, 0x08, 0x8e, - 0x38, 0xe6, 0xcd, 0x4d, 0xd2, 0xd2, 0x58, 0xff, 0x7f, 0x50, 0x4d, 0xe0, 0x90, 0x84, 0x04, 0x74, - 0x63, 0xd1, 0x0d, 0x49, 0x54, 0xa5, 0x52, 0xca, 0x3a, 0xd9, 0x78, 0x93, 0xca, 0x75, 0x93, 0x5a, - 0xaf, 0xe3, 0x8b, 0x9c, 0xd4, 0xc6, 0xde, 0xcd, 0xcd, 0xeb, 0xdd, 0x38, 0x9b, 0xad, 0x54, 0x56, - 0x79, 0x70, 0x32, 0x79, 0x49, 0x79, 0x93, 0x97, 0x94, 0x2b, 0xa5, 0xb2, 0xc6, 0x4e, 0xc5, 0x49, - 0x9c, 0xac, 0xb3, 0x71, 0x55, 0x5c, 0xe5, 0x7d, 0x48, 0x9d, 0x5b, 0xf7, 0x39, 0x07, 0x0d, 0x34, - 0x38, 0x92, 0xec, 0x7d, 0xf0, 0xcb, 0x0c, 0xfa, 0x9c, 0xef, 0xf7, 0xeb, 0xaf, 0xbf, 0xdb, 0xf9, - 0xfa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0x38, 0xb6, 0x5d, 0x2e, 0xec, 0x96, 0x57, 0x0c, 0x3d, 0x57, 0x85, 0xd3, 0x51, - 0x75, 0x32, 0x32, 0x33, 0x04, 0x17, 0x27, 0x7a, 0xb8, 0x98, 0x70, 0x75, 0xb9, 0xf8, 0xbb, 0x09, - 0x98, 0x8a, 0x58, 0x2b, 0x22, 0x4f, 0xf2, 0x3c, 0x0c, 0xd1, 0x10, 0xa5, 0xab, 0xe7, 0xd3, 0x91, - 0x8b, 0x0e, 0x09, 0xd8, 0xae, 0x15, 0x94, 0xe0, 0xc4, 0x0e, 0x42, 0xef, 0xd1, 0x41, 0x60, 0x8a, - 0xae, 0x9a, 0xfe, 0xff, 0x77, 0xd5, 0x74, 0xba, 0xec, 0x5d, 0x1f, 0x64, 0xd9, 0x23, 0x63, 0x27, - 0xab, 0xed, 0x43, 0x11, 0xb5, 0xfd, 0x36, 0x4c, 0x76, 0x11, 0x0d, 0x5c, 0x63, 0x3f, 0xad, 0x41, - 0xb6, 0x97, 0x71, 0x62, 0x2a, 0x5d, 0x42, 0xaa, 0x74, 0xb7, 0x55, 0x0b, 0x9e, 0xef, 0xed, 0x84, - 0x2e, 0x5f, 0x7f, 0x45, 0x83, 0xe9, 0xe8, 0x4e, 0x31, 0x52, 0x87, 0xe7, 0x60, 0xb8, 0x89, 0xfc, - 0x23, 0x97, 0x77, 0x4b, 0x17, 0x23, 0xd6, 0x60, 0x3c, 0xad, 0x3a, 0x9b, 0xa1, 0xc4, 0x45, 0x5c, - 0xef, 0xd5, 0xee, 0x51, 0x6d, 0xba, 0x34, 0xfd, 0x95, 0x04, 0x9c, 0x89, 0x24, 0x8f, 0x54, 0xf4, - 0x71, 0x80, 0xba, 0xd3, 0xea, 0xf8, 0xb4, 0x23, 0xa2, 0x05, 0x76, 0x94, 0x8c, 0x90, 0xe2, 0x85, - 0x8b, 0x67, 0xc7, 0x0f, 0xe6, 0x75, 0x32, 0x0f, 0x74, 0x88, 0x08, 0xdc, 0x0c,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xe2, 0xf9, 0xed, 0xba, 0x73, 0x58, 0xa9, 0x1e, 0xa1, 0xea, 0xab, 0x95, - 0x8e, 0x7f, 0x70, 0x33, 0xfb, 0x98, 0x78, 0x7e, 0xa2, 0xe1, 0x0e, 0x91, 0x29, 0x61, 0x91, 0x3d, - 0xff, 0xe0, 0xa6, 0xb9, 0x03, 0x19, 0xec, 0x8c, 0x66, 0xfd, 0x4d, 0x54, 0x39, 0x70, 0xdb, 0x64, - 0x69, 0x1c, 0x8f, 0x28, 0x4d, 0x82, 0x05, 0x17, 0xb7, 0x18, 0x60, 0xc3, 0xad, 0xa1, 0xfc, 0xd0, - 0xce, 0x76, 0xb9, 0xbc, 0x62, 0xa5, 0x39, 0xcb, 0xaa, 0xdb, 0xc6, 0x01, 0x75, 0xe8, 0x06, 0x06, - 0x4e, 0xd3, 0x80, 0x3a, 0x74, 0xb9, 0x79, 0xaf, 0xc1, 0x54, 0xb5, 0x4a, 0xaf, 0xb9, 0x5e, 0xad, - 0xb0, 0x7b, 0x2c, 0x2f, 0x6b, 0x48, 0xc6, 0xaa, 0x56, 0xef, 0x50, 0x01, 0x16, 0xe3, 0x9e, 0x79, - 0x0b, 0xce, 0x84, 0xc6, 0x12, 0x81, 0x93, 0x5d, 0x57, 0xa9, 0x42, 0xaf, 0xc1, 0x54, 0xeb, 0xb8, - 0x1b, 0x68, 0x4a, 0x67, 0x6c, 0x1d, 0xab, 0xb0, 0x1b, 0x70, 0xba, 0x75, 0xd4, 0xea, 0xc6, 0x2d, - 0x88, 0x38, 0xb3, 0x75, 0xd4, 0x52, 0x81, 0x4f, 0x92, 0x1b, 0xee, 0x36, 0xaa, 0xda, 0x3e, 0xaa, - 0x65, 0x1f, 0x11, 0xc5, 0x85, 0x09, 0xf3, 0x12, 0x18, 0xd5, 0x6a, 0x05, 0x39, 0xf6, 0x7e, 0x03, - 0x55, 0xec, 0x36, 0x72, 0x6c, 0x2f, 0x3b, 0x27, 0x0a, 0x8f, 0x57, 0xab, 0x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, 0xf3, 0xb7, 0xcc, 0x73, 0x6a, 0xee, 0x71, 0x81, 0xc0, 0xb5, 0xe7, 0xd4, 0xec, 0x53, - 0x24, 0xae, 0x84, 0x12, 0x3c, 0xff, 0x14, 0x89, 0xa5, 0x50, 0x82, 0x67, 0xa0, 0x22, 0x71, 0x35, - 0xf7, 0x19, 0xe2, 0x3e, 0x47, 0x75, 0xdf, 0x8c, 0xe2, 0xbe, 0x84, 0xe0, 0xba, 0x19, 0xc5, 0x75, - 0x09, 0xc1, 0x6d, 0x33, 0x8a, 0xdb, 0x12, 0x82, 0xcb, 0x66, 0x14, 0x97, 0x25, 0x04, 0x77, 0xcd, - 0x28, 0xee, 0x4a, 0x08, 0xae, 0x9a, 0x51, 0x5c, 0x95, 0x10, 0xdc, 0x34, 0xa3, 0xb8, 0x29, 0x21, - 0xb8, 0x68, 0x46, 0x71, 0x51, 0x42, 0x70, 0xcf, 0x8c, 0xe2, 0x9e, 0x84, 0xe0, 0x9a, 0xb3, 0xaa, - 0x6b, 0x12, 0xa2, 0x5b, 0xce, 0xaa, 0x6e, 0x49, 0x88, 0x2e, 0x39, 0xab, 0xba, 0x24, 0x21, 0xba, - 0xe3, 0xac, 0xea, 0x8e, 0x84, 0xe8, 0x8a, 0x3f, 0x49, 0xf0, 0x8e, 0x70, 0xc7, 0x6f, 0x77, 0xaa, - 0xfe, 0xfb, 0xea, 0x08, 0x2f, 0x4b, 0xed, 0x43, 0x7a, 0xc9, 0x5c, 0x24, 0x0d, 0xab, 0xd8, 0x71, - 0x2a, 0x2b, 0xd8, 0x65, 0xa9, 0xb1, 0x10, 0x10, 0x4e, 0x34, 0x62, 0xf9, 0x7d, 0xf5, 0x86, 0x97, - 0xa5, 0x36, 0x23, 0x5e, 0xbf, 0x9b, 0x1f, 0x7a, 0xc7, 0xf6, 0x4e, 0x82, 0x77, 0x6c, 0xcc, 0xfc, - 0x27, 0xed, 0xd8, 0x16, 0xe2, 0x4d, 0x1e, 0x18, 0x7b, 0x21,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86, 0x96, 0xfb, - 0x86, 0x06, 0x69, 0xd6, 0xb6, 0x56, 0xdd, 0x16, 0x32, 0x8b, 0xa0, 0x15, 0x58, 0x04, 0x3d, 0x9c, - 0xde, 0x5a, 0xc1, 0xbc, 0x04, 0x5a, 0x71, 0x70, 0x57, 0x6b, 0x45, 0x73, 0x09, 0xb4, 0x12, 0x73, - 0xf0, 0x60, 0x9e, 0xd1, 0x4a, 0xb9, 0x3f, 0xd6, 0x61, 0x4a, 0x6c, 0xa3, 0x79, 0x3d, 0x39, 0x2f, - 0xdf, 0x37, 0xe5, 0x47, 0xaf, 0x2c, 0x5d, 0x5d, 0x5e, 0xc4, 0xff, 0x04, 0x21, 0x99, 0x93, 0x6f, - 0xa1, 0xf2, 0x10, 0x88, 0x5c, 0xe9, 0xf5, 0x9e, 0x48, 0x3e, 0x29, 0x30, 0x74, 0xbd, 0x27, 0x22, - 0xcd, 0x76, 0xbd, 0x27, 0x22, 0xcd, 0x76, 0xbd, 0x27, 0x22, 0xcd, 0x76, 0x3d, 0x0b, 0x90, 0x66, - 0xbb, 0xde, 0x13, 0x91, 0x66, 0xbb, 0xde, 0x13, 0x91, 0x66, 0xbb, 0xdf, 0x13, 0x61, 0xd3, 0x3d, - 0xdf, 0x13, 0x91, 0xe7, 0xbb, 0xdf, 0x13, 0x91, 0xe7, 0xbb, 0xdf, 0x13, 0xc9, 0x27, 0xfd, 0x76, - 0x07, 0xf5, 0x7e, 0xea, 0x20, 0xe3, 0xfb, 0xdd, 0x04, 0x86, 0x15, 0x78, 0x0b, 0x26, 0xe8, 0x86, - 0x44, 0xc9, 0x75, 0x7c, 0xbb, 0xee, 0xa0, 0xb6, 0xf9, 0x31, 0xc8, 0xd0, 0x21, 0x7a, 0x9b, 0x13, - 0x75, 0x1b, 0x48, 0xe7, 0x59, 0xbd, 0x95, 0xa4, 0x73, 0x7f, 0x92, 0x84, 0x69, 0x3a, 0xb0, 0x69, - 0x37, 0x91, 0xf4, 0x96, 0xd1, 0x45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2c, 0xa7, 0x84, - 0x19, 0x44, 0x84, 0x58, 0x4e, 0x09, 0x31, 0x88, 0x08, 0xaf, 0x9c, 0x12, 0x5e, 0x10, 0x11, 0x5a, - 0x17, 0xd4, 0xd0, 0x82, 0xa8, 0xb0, 0xba, 0xa0, 0x86, 0x15, 0x44, 0x85, 0xd4, 0x13, 0x6a, 0x48, - 0x8d, 0x3e, 0x78, 0x77, 0x6e, 0x08, 0x0f, 0x09, 0xd1, 0x74, 0x41, 0x8d, 0x26, 0x88, 0x8a, 0xa4, - 0x0b, 0x6a, 0x24, 0x41, 0x54, 0x14, 0x5d, 0x50, 0xa3, 0x08, 0xa2, 0x22, 0xe8, 0x1d, 0x35, 0x82, - 0xc2, 0x77, 0x7c, 0x72, 0xca, 0x23, 0xc5, 0xb8, 0x08, 0xd2, 0x07, 0x88, 0x20, 0x7d, 0x80, 0x08, - 0xd2, 0x07, 0x88, 0x20, 0x7d, 0x80, 0x08, 0xd2, 0x07, 0x88, 0x20, 0x7d, 0x80, 0x08, 0xd2, 0x07, - 0x88, 0x20, 0x7d, 0x90, 0x08, 0xd2, 0x07, 0x8a, 0x20, 0xbd, 0x57, 0x04, 0x5d, 0x50, 0xdf, 0x78, - 0x80, 0xa8, 0x82, 0x74, 0x41, 0x7d, 0xf4, 0x19, 0x1f, 0x42, 0xfa, 0x40, 0x21, 0xa4, 0xf7, 0x0a, - 0xa1, 0x3f, 0xd0, 0x61, 0x4a, 0x0a, 0x21, 0xf6, 0x7c, 0xe8, 0x83, 0xaa, 0x40, 0xd7, 0x07, 0x78, - 0xc1, 0x22, 0x2a, 0xa6, 0xae, 0x0f, 0xf0, 0x90, 0xba, 0x5f, 0x9c, 0x75, 0x57, 0xa1, 0xf2, 0x00, - 0x55, 0x68, 0x35, 0x88, 0xa1, 0xeb, 0x03, 0xbc, 0x78, 0xd1, 0x1d, 0x7b, 0x37, 0xfb, 0x15, 0x81, - 0x17, 0x06, 0x2a, 0x02, 0x6b, 0x03, 0x15, 0x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xf8, 0xbf, 0x92, 0x91, 0x58, 0x78, 0x12, 0x26, 0x94, 0xfd, 0x4b, - 0x3c, 0xb3, 0x62, 0x00, 0xfe, 0xaf, 0x6c, 0xa4, 0x67, 0x92, 0x9f, 0xf9, 0xfb, 0xb3, 0xa7, 0x16, - 0x6e, 0x83, 0xd9, 0xbd, 0xd3, 0x69, 0x0e, 0x43, 0xa2, 0x80, 0x29, 0x1f, 0x81, 0x44, 0xb1, 0x68, - 0x68, 0x33, 0x13, 0x7f, 0xf9, 0x0b, 0xe7, 0xd2, 0x45, 0xf2, 0x85, 0xe5, 0x7b, 0xc8, 0x2f, 0x16, - 0x19, 0xf8, 0x39, 0x38, 0x13, 0xb9, 0x53, 0x8a, 0xf1, 0xa5, 0x12, 0xc5, 0xaf, 0xac, 0x74, 0xe1, - 0x57, 0x56, 0x08, 0x5e, 0xcb, 0xf3, 0x27, 0xce, 0x05, 0x33, 0x62, 0x5f, 0x32, 0x5b, 0x13, 0x9e, - 0x70, 0x17, 0xf2, 0xcf, 0x31, 0xd9, 0x62, 0xa4, 0x2c, 0x8a, 0x79, 0x62, 0x5d, 0xcc, 0x97, 0x18, - 0xbe, 0x14, 0x89, 0x3f, 0x50, 0x1e, 0xab, 0xca, 0x2b, 0x04, 0x23, 0x29, 0x05, 0x0a, 0xaf, 0x44, - 0x92, 0x1c, 0x09, 0x2f, 0xbb, 0xaf, 0x04, 0x0a, 0x97, 0x23, 0x65, 0xeb, 0x31, 0x2f, 0x7d, 0x95, - 0xf3, 0x97, 0xd8, 0x22, 0x5f, 0xb8, 0x62, 0x9e, 0xe1, 0x39, 0x2a, 0x55, 0x60, 0x66, 0x20, 0x2e, - 0x95, 0x2f, 0x31, 0x40, 0xb1, 0x27, 0xa0, 0xb7, 0x95, 0x38, 0x32, 0xff, 0x02, 0x23, 0x29, 0xf5, - 0x24, 0x89, 0x31, 0x15, 0x87, 0x17, 0x77, 0xef, 0xbf, 0x37, 0x7b, 0xea, 0x5b, 0xef, 0xcd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6, 0x84, 0x9e, 0x7c, 0x88, - 0xf7, 0xac, 0x5d, 0xf0, 0x40, 0x86, 0xe2, 0x43, 0x0c, 0x27, 0xa0, 0xe7, 0x1f, 0xee, 0x4b, 0x20, - 0x28, 0x10, 0x62, 0x30, 0xc1, 0x4e, 0xa0, 0xc1, 0x48, 0x4f, 0x82, 0x1d, 0x45, 0x83, 0x1d, 0x51, - 0x83, 0x9d, 0x40, 0x83, 0x54, 0x5f, 0x02, 0x51, 0x83, 0xe0, 0xd8, 0x2c, 0x02, 0xac, 0xd6, 0xdf, - 0x40, 0x35, 0xaa, 0x02, 0xfd, 0x53, 0x3d, 0xb9, 0x08, 0x86, 0x50, 0x88, 0x52, 0x08, 0x28, 0xb3, - 0x0c, 0xe9, 0x9d, 0x83, 0x90, 0x04, 0xba, 0xf2, 0x38, 0x50, 0xe3, 0x40, 0x61, 0x11, 0x71, 0x81, - 0x2a, 0xf4, 0x62, 0xd2, 0xfd, 0x55, 0x11, 0xae, 0x46, 0x40, 0x85, 0xaa, 0x50, 0x92, 0x4c, 0x8c, - 0x2a, 0x02, 0x8b, 0x88, 0xc3, 0xc5, 0xb0, 0xe8, 0xba, 0x58, 0x92, 0x55, 0xa5, 0xb9, 0x08, 0x0a, - 0x26, 0xc1, 0x8a, 0x21, 0x3b, 0x22, 0x1e, 0x21, 0x41, 0x8e, 0xc1, 0xe3, 0xbd, 0x3d, 0xc2, 0x65, - 0xb8, 0x47, 0xf8, 0xb1, 0x98, 0x67, 0xe4, 0x55, 0x56, 0xcc, 0x33, 0x11, 0x9b, 0x67, 0x5c, 0x54, - 0xc9, 0x33, 0x3e, 0x6c, 0x7e, 0x02, 0x26, 0xf8, 0x18, 0x2e, 0x4f, 0x98, 0xd4, 0x60, 0x7f, 0xcc, - 0xac, 0x37, 0x29, 0x93, 0xa4, 0x9c, 0x2a, 0xde, 0xdc, 0x84, 0x71, 0x3e, 0xb4, 0xe1, 0x91, 0xcb, - 0x9d, 0x64, 0x7f, 0xa7, 0xa2, 0x37, 0x23, 0x15, 0xa4, 0x84, 0x0a, 0x7a, 0x66, 0x05, 0xa6, 0xa3, - 0xab, 0x91, 0x58, 0x7e, 0x47, 0x69, 0xf9, 0x3d, 0x2d, 0x96, 0x5f, 0x4d, 0x2c, 0xdf, 0x25, 0x38, - 0x13, 0x59, 0x7b, 0xe2, 0x48, 0x12, 0x22, 0xc9, 0x6d, 0x18, 0x93, 0x4a, 0x8e, 0x08, 0x1e, 0x8a, - 0x00, 0x0f, 0x75, 0x83, 0xc3, 0xd0, 0x8a, 0x58, 0x3d, 0x24, 0xb0, 0x2e, 0x82, 0x3f, 0x06, 0xe3, - 0x72, 0xbd, 0x11, 0xd1, 0x63, 0x11, 0xe8, 0xb1, 0x08, 0x74, 0xf4, 0xb9, 0x93, 0x11, 0xe8, 0xa4, - 0x82, 0xde, 0xe9, 0x79, 0xee, 0xc9, 0x08, 0xf4, 0x64, 0x04, 0x3a, 0xfa, 0xdc, 0x66, 0x04, 0xda, - 0x14, 0xd1, 0xcf, 0xc2, 0x84, 0x52, 0x62, 0x44, 0xf8, 0x48, 0x04, 0x7c, 0x44, 0x84, 0x3f, 0x07, - 0x86, 0x5a, 0x5c, 0x44, 0xfc, 0x44, 0x04, 0x7e, 0x22, 0xea, 0xf4, 0xd1, 0xda, 0x0f, 0x47, 0xc0, - 0x87, 0x23, 0x4f, 0x1f, 0x8d, 0x37, 0x22, 0xf0, 0x86, 0x88, 0xcf, 0x43, 0x46, 0xac, 0x26, 0x22, - 0x36, 0x15, 0x81, 0x4d, 0xa9, 0x76, 0x97, 0x8a, 0x49, 0x5c, 0xa4, 0x8f, 0xf6, 0x48, 0x17, 0xa9, - 0x84, 0xc4, 0x91, 0x64, 0x44, 0x92, 0x4f, 0xc2, 0xe9, 0xa8, 0x92, 0x11, 0xc1, 0x31, 0x2f, 0x72, - 0x8c, 0xe3, 0x1e, 0x31, 0x6c, 0xf6, 0xec, 0x96, 0xd2, 0x38, 0xcd, 0xbc, 0x0c, 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0x4b, 0x18, 0xcc, 0x55, 0x18, 0x6a, 0x07, 0xdf, 0x75, - 0x7a, 0xa8, 0x2f, 0xc3, 0x12, 0x78, 0xee, 0xbe, 0x06, 0x93, 0xec, 0x15, 0x57, 0x8f, 0xbd, 0xf9, - 0x6c, 0xb7, 0x66, 0xbe, 0xae, 0xc1, 0x68, 0x70, 0x64, 0xee, 0xc3, 0x78, 0x70, 0x40, 0xdf, 0xae, - 0xa7, 0x91, 0x9a, 0x17, 0x2c, 0xdc, 0xc5, 0xb1, 0x18, 0xf1, 0x89, 0x3e, 0x85, 0xa2, 0x6b, 0xb2, - 0x3c, 0x38, 0x53, 0x80, 0xa9, 0x08, 0xb1, 0x93, 0x2c, 0xc8, 0xb9, 0xf3, 0x30, 0xba, 0xe9, 0xfa, - 0xf4, 0x27, 0x73, 0xcc, 0xd3, 0xc2, 0x53, 0x85, 0x62, 0xc2, 0x38, 0x45, 0xc0, 0x0b, 0xe7, 0x61, - 0x84, 0x65, 0xbf, 0x39, 0x0c, 0x89, 0x8d, 0x82, 0x71, 0x8a, 0xfc, 0x5f, 0x34, 0x34, 0xf2, 0x7f, - 0xc9, 0x48, 0x14, 0xd7, 0x3f, 0xc8, 0x47, 0x4c, 0xfb, 0xc3, 0xd4, 0x3c, 0xff, 0x2f, 0x00, 0x00, - 0xff, 0xff, 0xf9, 0x34, 0xbb, 0x28, 0x57, 0x81, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -func (this *Uint128Pair) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Uint128Pair") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Uint128Pair 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 that1.Right == nil { - if this.Right != nil { - return fmt.Errorf("this.Right != nil && that1.Right == nil") - } - } else if !this.Right.Equal(*that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - return nil -} -func (this *Uint128Pair) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if that1.Right == nil { - if this.Right != nil { - return false - } - } else if !this.Right.Equal(*that1.Right) { - return false - } - return true -} -func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") - } - return nil -} -func (this *ContainsNestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - return true -} -func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) - } - } - return nil -} -func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} -func (this *NotPacked) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NotPacked") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NotPacked but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") - } - 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]) - } - } - return nil -} -func (this *NotPacked) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - 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 - } - } - return true -} - -type MessageFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *Message) TestProto() 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() proto.Message - GetBunny() string -} - -func (this *Nested) Proto() proto.Message { - return this -} - -func (this *Nested) TestProto() 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() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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() proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() 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() proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 Uint128PairFace interface { - Proto() proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() proto.Message { - return NewUint128PairFromFace(this) -} - -func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Left -} - -func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Right -} - -func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { - this := &Uint128Pair{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type ContainsNestedMapFace interface { - Proto() proto.Message -} - -func (this *ContainsNestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() proto.Message { - return NewContainsNestedMap_NestedMapFromFace(this) -} - -func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { - return this.NestedMapField -} - -func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - this.NestedMapField = that.GetNestedMapField() - return this -} - -type NotPackedFace interface { - Proto() proto.Message - GetKey() []uint64 -} - -func (this *NotPacked) Proto() proto.Message { - return this -} - -func (this *NotPacked) TestProto() proto.Message { - return NewNotPackedFromFace(this) -} - -func (this *NotPacked) GetKey() []uint64 { - return this.Key -} - -func NewNotPackedFromFace(that NotPackedFace) *NotPacked { - this := &NotPacked{} - this.Key = that.GetKey() - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&theproto3.Uint128Pair{") - s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") - s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&theproto3.ContainsNestedMap{") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap_NestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - if this.NestedMapField != nil { - s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NotPacked) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.NotPacked{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 (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 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 { - dAtA2 := make([]byte, len(m.Key)*10) - var j1 int - for _, num := range m.Key { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - dAtA[i] = 0x2a - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) - } - if m.Nested != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Nested.Size())) - n3, err := m.Nested.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) - i += 4 - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - dAtA[i] = 0x52 - i++ - v := m.Terrain[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + sovTheproto3(uint64(k)) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(k)) - if v != nil { - 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 - } - } - } - if m.Proto2Field != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Proto2Field.Size())) - n5, err := m.Proto2Field.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - dAtA[i] = 0x6a - i++ - v := m.Proto2Value[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + sovTheproto3(uint64(k)) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(k)) - if v != nil { - 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 - } - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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] - byteSize := 0 - if len(v) > 0 { - byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if len(v) > 0 { - 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] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) - n7, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - } - } - return i, nil -} - -func (m *AllMapsOrdered) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) - for k := range m.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) - } - sortkeys.Strings(keysForStringToDoubleMap) - for _, k := range keysForStringToDoubleMap { - dAtA[i] = 0xa - i++ - v := m.StringToDoubleMap[string(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - sortkeys.Strings(keysForStringToFloatMap) - for _, k := range keysForStringToFloatMap { - dAtA[i] = 0x12 - i++ - v := m.StringToFloatMap[string(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - sortkeys.Int32s(keysForInt32Map) - for _, k := range keysForInt32Map { - dAtA[i] = 0x1a - i++ - v := m.Int32Map[int32(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 { - keysForInt64Map := make([]int64, 0, len(m.Int64Map)) - for k := range m.Int64Map { - keysForInt64Map = append(keysForInt64Map, int64(k)) - } - sortkeys.Int64s(keysForInt64Map) - for _, k := range keysForInt64Map { - dAtA[i] = 0x22 - i++ - v := m.Int64Map[int64(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 { - keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) - for k := range m.Uint32Map { - keysForUint32Map = append(keysForUint32Map, uint32(k)) - } - sortkeys.Uint32s(keysForUint32Map) - for _, k := range keysForUint32Map { - dAtA[i] = 0x2a - i++ - v := m.Uint32Map[uint32(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 { - keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) - for k := range m.Uint64Map { - keysForUint64Map = append(keysForUint64Map, uint64(k)) - } - sortkeys.Uint64s(keysForUint64Map) - for _, k := range keysForUint64Map { - dAtA[i] = 0x32 - i++ - v := m.Uint64Map[uint64(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 { - keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) - for k := range m.Sint32Map { - keysForSint32Map = append(keysForSint32Map, int32(k)) - } - sortkeys.Int32s(keysForSint32Map) - for _, k := range keysForSint32Map { - dAtA[i] = 0x3a - i++ - v := m.Sint32Map[int32(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 { - keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) - for k := range m.Sint64Map { - keysForSint64Map = append(keysForSint64Map, int64(k)) - } - sortkeys.Int64s(keysForSint64Map) - for _, k := range keysForSint64Map { - dAtA[i] = 0x42 - i++ - v := m.Sint64Map[int64(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 { - keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) - for k := range m.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, uint32(k)) - } - sortkeys.Uint32s(keysForFixed32Map) - for _, k := range keysForFixed32Map { - dAtA[i] = 0x4a - i++ - v := m.Fixed32Map[uint32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - sortkeys.Int32s(keysForSfixed32Map) - for _, k := range keysForSfixed32Map { - dAtA[i] = 0x52 - i++ - v := m.Sfixed32Map[int32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - sortkeys.Uint64s(keysForFixed64Map) - for _, k := range keysForFixed64Map { - dAtA[i] = 0x5a - i++ - v := m.Fixed64Map[uint64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - sortkeys.Int64s(keysForSfixed64Map) - for _, k := range keysForSfixed64Map { - dAtA[i] = 0x62 - i++ - v := m.Sfixed64Map[int64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - sortkeys.Bools(keysForBoolMap) - for _, k := range keysForBoolMap { - dAtA[i] = 0x6a - i++ - v := m.BoolMap[bool(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 { - keysForStringMap := make([]string, 0, len(m.StringMap)) - for k := range m.StringMap { - keysForStringMap = append(keysForStringMap, string(k)) - } - sortkeys.Strings(keysForStringMap) - for _, k := range keysForStringMap { - dAtA[i] = 0x72 - i++ - v := m.StringMap[string(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 { - keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) - for k := range m.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) - } - sortkeys.Strings(keysForStringToBytesMap) - for _, k := range keysForStringToBytesMap { - dAtA[i] = 0x7a - i++ - v := m.StringToBytesMap[string(k)] - byteSize := 0 - if len(v) > 0 { - byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if len(v) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - } - if len(m.StringToEnumMap) > 0 { - keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) - for k := range m.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) - } - sortkeys.Strings(keysForStringToEnumMap) - for _, k := range keysForStringToEnumMap { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToEnumMap[string(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 { - keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) - for k := range m.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) - } - sortkeys.Strings(keysForStringToMsgMap) - for _, k := range keysForStringToMsgMap { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToMsgMap[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) - n8, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - } - } - 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] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + sozTheproto3(uint64(k)) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) - n9, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - } - } - if len(m.ByteMapping) > 0 { - for k := range m.ByteMapping { - dAtA[i] = 0x1a - i++ - v := m.ByteMapping[k] - byteSize := 0 - if len(v) > 0 { - byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapSize := 1 + 1 + byteSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - if k { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - if len(v) > 0 { - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) - i += 8 - } - return i, nil -} - -func (m *Uint128Pair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Uint128Pair) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Left.Size())) - n10, err := m.Left.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - if m.Right != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Right.Size())) - n11, err := m.Right.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} - -func (m *ContainsNestedMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainsNestedMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func (m *ContainsNestedMap_NestedMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainsNestedMap_NestedMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NestedMapField) > 0 { - for k := range m.NestedMapField { - dAtA[i] = 0xa - i++ - v := m.NestedMapField[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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - return i, nil -} - -func (m *NotPacked) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NotPacked) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - for _, num := range m.Key { - dAtA[i] = 0x28 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(num)) - } - } - return i, nil -} - -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 = string(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(10) - 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 = string(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 NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v37; i++ { - v38 := randStringTheproto3(r) - this.StringToDoubleMap[v38] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v38] *= -1 - } - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v39; i++ { - v40 := randStringTheproto3(r) - this.StringToFloatMap[v40] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v40] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v41; i++ { - v42 := int32(r.Int31()) - this.Int32Map[v42] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v42] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v43; i++ { - v44 := int64(r.Int63()) - this.Int64Map[v44] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v44] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v45; i++ { - v46 := uint32(r.Uint32()) - this.Uint32Map[v46] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v47; i++ { - v48 := uint64(uint64(r.Uint32())) - this.Uint64Map[v48] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v49 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v49; i++ { - v50 := int32(r.Int31()) - this.Sint32Map[v50] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v50] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v51; i++ { - v52 := int64(r.Int63()) - this.Sint64Map[v52] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v52] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v53; i++ { - v54 := uint32(r.Uint32()) - this.Fixed32Map[v54] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v55; i++ { - v56 := int32(r.Int31()) - this.Sfixed32Map[v56] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v56] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v57; i++ { - v58 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v59; i++ { - v60 := int64(r.Int63()) - this.Sfixed64Map[v60] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v60] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v61; i++ { - v62 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v63; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v64; i++ { - v65 := r.Intn(100) - v66 := randStringTheproto3(r) - this.StringToBytesMap[v66] = make([]byte, v65) - for i := 0; i < v65; i++ { - this.StringToBytesMap[v66][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v67; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v68; 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 { - v69 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v69; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v70; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v71; i++ { - v72 := r.Intn(100) - v73 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v73] = make([]byte, v72) - for i := 0; i < v72; i++ { - this.ByteMapping[v73][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 -} - -func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { - this := &Uint128Pair{} - v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Left = *v74 - this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { - this := &ContainsNestedMap{} - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - if r.Intn(10) != 0 { - v75 := r.Intn(10) - this.NestedMapField = make(map[string]float64) - for i := 0; i < v75; i++ { - v76 := randStringTheproto3(r) - this.NestedMapField[v76] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.NestedMapField[v76] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { - this := &NotPacked{} - v77 := r.Intn(10) - this.Key = make([]uint64, v77) - for i := 0; i < v77; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - 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 { - v78 := r.Intn(100) - tmps := make([]rune, v78) - for i := 0; i < v78; 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)) - v79 := r.Int63() - if r.Intn(2) == 0 { - v79 *= -1 - } - dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) - 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)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Key) > 0 { - l = 0 - for _, e := range m.Key { - l += sovTheproto3(uint64(e)) - } - n += 1 + sovTheproto3(uint64(l)) + l - } - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + l - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + 1 + l - 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 (m *Uint128Pair) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovTheproto3(uint64(l)) - if m.Right != nil { - l = m.Right.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *ContainsNestedMap) Size() (n int) { - var l int - _ = l - return n -} - -func (m *ContainsNestedMap_NestedMap) Size() (n int) { - var l int - _ = l - if len(m.NestedMapField) > 0 { - for k, v := range m.NestedMapField { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *NotPacked) Size() (n int) { - var l int - _ = l - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Uint128Pair{`, - `Left:` + fmt.Sprintf("%v", this.Left) + `,`, - `Right:` + fmt.Sprintf("%v", this.Right) + `,`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainsNestedMap{`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap_NestedMap) String() string { - if this == nil { - return "nil" - } - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, - `NestedMapField:` + mapStringForNestedMapField + `,`, - `}`, - }, "") - return s -} -func (this *NotPacked) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NotPacked{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `}`, - }, "") - 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(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 5: - if wireType == 0 { - 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) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTheproto3 - } - 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - var mapkey int64 - var mapvalue *Nested - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - var mapkey int64 - var mapvalue *test.NinOptEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 *AllMapsOrdered) Unmarshal(dAtA []byte) 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: AllMapsOrdered: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMapsOrdered: 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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - var mapkey int32 - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - var mapkey int64 - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - var mapkey bool - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 (m *Uint128Pair) Unmarshal(dAtA []byte) 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: Uint128Pair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Uint128Pair: 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 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 - } - 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 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 - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Right = &v - if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *ContainsNestedMap) Unmarshal(dAtA []byte) 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: ContainsNestedMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *ContainsNestedMap_NestedMap) Unmarshal(dAtA []byte) 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: NestedMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", 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.NestedMapField == nil { - m.NestedMapField = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NestedMapField[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 *NotPacked) Unmarshal(dAtA []byte) 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: NotPacked: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotPacked: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 5: - if wireType == 0 { - 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) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTheproto3 - } - 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - 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") -) - -func init() { proto.RegisterFile("combos/both/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1602 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, - 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0x8b, 0xa5, 0x65, 0x05, - 0x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 0x4c, 0x7c, 0x6d, 0x09, 0x12, 0xce, 0xe9, 0xc7, 0x71, 0x08, 0x6f, - 0xad, 0x29, 0x21, 0xf6, 0x5b, 0x51, 0x10, 0xfb, 0xad, 0x2a, 0xe1, 0xca, 0xe6, 0xe9, 0x99, 0x1a, - 0x7a, 0x79, 0xa6, 0x86, 0x7e, 0x39, 0x53, 0x43, 0xaf, 0xcf, 0x54, 0xf4, 0xe6, 0x4c, 0x45, 0x6f, - 0xcf, 0x54, 0xf4, 0xee, 0x4c, 0x45, 0xcf, 0x87, 0x2a, 0xfa, 0x76, 0xa8, 0xa2, 0xef, 0x86, 0x2a, - 0xfa, 0x61, 0xa8, 0xa2, 0x1f, 0x87, 0x2a, 0x3a, 0x1d, 0xaa, 0xe8, 0xe5, 0x50, 0x45, 0xaf, 0x87, - 0x2a, 0x7a, 0x33, 0x54, 0x43, 0x6f, 0x87, 0x2a, 0x7a, 0x37, 0x54, 0x43, 0xcf, 0x7f, 0x53, 0x43, - 0xad, 0x38, 0x5f, 0x9e, 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x77, 0x56, 0x01, 0x1d, 0x60, 0x1a, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto deleted file mode 100644 index d1f929884..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3.proto +++ /dev/null @@ -1,168 +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 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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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; -} - -message Uint128Pair { - bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message ContainsNestedMap { - message NestedMap { - map NestedMapField = 1; - } -} - -message NotPacked { - repeated uint64 key = 5 [packed=false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go deleted file mode 100644 index ca8a80a5e..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/both/theproto3pb_test.go +++ /dev/null @@ -1,2423 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/theproto3.proto - -/* -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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -package theproto3 - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUint128PairMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedUint128Pair(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Uint128Pair{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap_NestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNotPackedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNotPackedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNotPacked(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNotPacked(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NotPacked{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMap_NestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNotPackedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNotPackedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := rand.New(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 := rand.New(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 TestUint128PairFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMap_NestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNotPackedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNotPackedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUint128PairSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNotPackedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNotPacked(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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 := rand.New(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 := rand.New(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 TestUint128PairStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMap_NestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNotPackedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(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/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go deleted file mode 100644 index bb7eb6bb9..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/proto3_test.go +++ /dev/null @@ -1,159 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 theproto3 - -import ( - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestCustomTypeSize(t *testing.T) { - m := &Uint128Pair{} - m.Size() // Should not panic. -} - -func TestCustomTypeMarshalUnmarshal(t *testing.T) { - m1 := &Uint128Pair{} - if b, err := proto.Marshal(m1); err != nil { - t.Fatal(err) - } else { - m2 := &Uint128Pair{} - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(m1, m2) { - t.Errorf("expected %+v, got %+v", m1, m2) - } - } -} - -func TestNotPackedToPacked(t *testing.T) { - input := []uint64{1, 10e9} - notpacked := &NotPacked{Key: input} - if data, err := proto.Marshal(notpacked); err != nil { - t.Fatal(err) - } else { - packed := &Message{} - if err := proto.Unmarshal(data, packed); err != nil { - t.Fatal(err) - } - output := packed.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} - -func TestPackedToNotPacked(t *testing.T) { - input := []uint64{1, 10e9} - packed := &Message{Key: input} - if data, err := proto.Marshal(packed); err != nil { - t.Fatal(err) - } else { - notpacked := &NotPacked{} - if err := proto.Unmarshal(data, notpacked); err != nil { - t.Fatal(err) - } - output := notpacked.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go deleted file mode 100644 index 7a87a082d..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.pb.go +++ /dev/null @@ -1,6021 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/theproto3.proto - -/* - 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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import binary "encoding/binary" - -// 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 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 (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -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, -} - -func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } - -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,json=heightInCm,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,json=resultCount,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,packed,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=proto2Field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" 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() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} -func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } - -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() {} -func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" 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=msgMapping" 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=byteMapping" 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() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } - -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 (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } - -type Uint128Pair struct { - Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` - Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` -} - -func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } -func (*Uint128Pair) ProtoMessage() {} -func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } - -type ContainsNestedMap struct { -} - -func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } -func (*ContainsNestedMap) ProtoMessage() {} -func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } - -type ContainsNestedMap_NestedMap struct { - NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` -} - -func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } -func (*ContainsNestedMap_NestedMap) ProtoMessage() {} -func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { - return fileDescriptorTheproto3, []int{7, 0} -} - -type NotPacked struct { - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` -} - -func (m *NotPacked) Reset() { *m = NotPacked{} } -func (*NotPacked) ProtoMessage() {} -func (*NotPacked) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{8} } - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") - proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") - proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") - proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") - 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 *AllMapsOrdered) 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 (this *Uint128Pair) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *NotPacked) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7955 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, - 0x99, 0x1e, 0x1b, 0x0d, 0x90, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x1c, - 0x68, 0x34, 0xa2, 0x68, 0x8b, 0xc3, 0xe1, 0x70, 0x6e, 0x18, 0x4b, 0x5a, 0x00, 0x04, 0x47, 0x1c, - 0x93, 0x20, 0xdd, 0x24, 0x2d, 0x8d, 0x95, 0x04, 0xd5, 0x04, 0x0e, 0x49, 0x48, 0x40, 0x37, 0x16, - 0xdd, 0x90, 0x44, 0x55, 0x2a, 0xa5, 0xac, 0x93, 0x8d, 0x37, 0xa9, 0x5c, 0x37, 0xa9, 0xf5, 0x3a, - 0xbe, 0xc8, 0x49, 0x6d, 0xec, 0xdd, 0xdc, 0xbc, 0xde, 0x8d, 0xb3, 0xd9, 0x4a, 0x65, 0x95, 0x07, - 0x27, 0x93, 0x97, 0x94, 0x37, 0x79, 0x49, 0xb9, 0x52, 0x2a, 0x6b, 0xec, 0xad, 0x38, 0x89, 0x93, - 0x75, 0x36, 0xae, 0x8a, 0xab, 0xbc, 0x0f, 0xa9, 0x73, 0xeb, 0x3e, 0xa7, 0xd1, 0x40, 0x83, 0x33, - 0x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, 0xb5, 0x9b, 0xa4, 0xee, 0xf5, 0xa7, 0xf9, 0xf7, 0xdf, 0xa3, 0xb9, - 0x32, 0x8e, 0x61, 0x45, 0x0f, 0x95, 0xcb, 0x01, 0x79, 0xe4, 0x54, 0x43, 0xd5, 0x46, 0x04, 0xc3, - 0x3d, 0xa6, 0x88, 0x27, 0x9f, 0xfb, 0x24, 0x9c, 0xc1, 0x9f, 0x49, 0x59, 0x12, 0x35, 0x89, 0xde, - 0xf0, 0xca, 0xfc, 0xe1, 0xa7, 0x69, 0x3a, 0x4e, 0x79, 0x04, 0x82, 0x4e, 0x82, 0x17, 0x8f, 0x90, - 0xeb, 0xa2, 0xb6, 0x53, 0x31, 0x1b, 0x61, 0xea, 0x09, 0x3b, 0x06, 0x99, 0x5f, 0xff, 0x81, 0xec, - 0xc5, 0xdb, 0x14, 0x99, 0x6f, 0x34, 0x72, 0xfb, 0xf0, 0x48, 0x48, 0x54, 0x0c, 0xc0, 0xf9, 0x39, - 0xc6, 0x79, 0xa6, 0x2b, 0x32, 0x30, 0xed, 0x0e, 0xf0, 0x71, 0xcf, 0x97, 0x03, 0x70, 0xfe, 0x7d, - 0xc6, 0xa9, 0x33, 0x2c, 0x77, 0x29, 0x66, 0xbc, 0x03, 0x93, 0xaf, 0xa1, 0xf6, 0x81, 0xed, 0xb0, - 0x5d, 0x9a, 0x01, 0xe8, 0x3e, 0xcf, 0xe8, 0x26, 0x18, 0x90, 0x6c, 0xdb, 0x60, 0xae, 0x9b, 0x90, - 0x3c, 0x34, 0xab, 0x68, 0x00, 0x8a, 0x2f, 0x30, 0x8a, 0x11, 0x2c, 0x8f, 0xa1, 0x79, 0x48, 0x1f, - 0xd9, 0x6c, 0x65, 0x8a, 0x86, 0x7f, 0x91, 0xc1, 0x53, 0x1c, 0xc3, 0x28, 0x5a, 0x76, 0xab, 0xd3, - 0xc0, 0xcb, 0x56, 0x34, 0xc5, 0x97, 0x38, 0x05, 0xc7, 0x30, 0x8a, 0x53, 0x98,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x10, 0x12, 0x7a, 0x81, 0x42, 0x26, 0xc8, - 0xf8, 0x61, 0x97, 0x0d, 0x84, 0x1d, 0x84, 0x84, 0x5c, 0x36, 0x10, 0x72, 0x10, 0x12, 0x6e, 0xd9, - 0x40, 0xb8, 0x41, 0x48, 0xa8, 0x65, 0x03, 0xa1, 0x06, 0x21, 0x61, 0x96, 0x0d, 0x84, 0x19, 0x84, - 0x84, 0x58, 0x36, 0x10, 0x62, 0x10, 0x12, 0x5e, 0xd9, 0x40, 0x78, 0x41, 0x48, 0x68, 0x5d, 0x08, - 0x86, 0x16, 0x84, 0x85, 0xd5, 0x85, 0x60, 0x58, 0x41, 0x58, 0x48, 0x3d, 0x11, 0x0c, 0xa9, 0xd1, - 0xfb, 0xef, 0xce, 0x25, 0xf0, 0x90, 0x10, 0x4d, 0x17, 0x82, 0xd1, 0x04, 0x61, 0x91, 0x74, 0x21, - 0x18, 0x49, 0x10, 0x16, 0x45, 0x17, 0x82, 0x51, 0x04, 0x61, 0x11, 0xf4, 0x4e, 0x30, 0x82, 0xfc, - 0x77, 0x7c, 0xb2, 0x81, 0x47, 0x8a, 0x51, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, 0xa4, - 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, 0x41, 0xea, 0x00, 0x11, 0xa4, 0x0e, 0x10, - 0x41, 0xea, 0x20, 0x11, 0xa4, 0x0e, 0x14, 0x41, 0x6a, 0xaf, 0x08, 0xba, 0x10, 0x7c, 0xe3, 0x01, - 0xc2, 0x0a, 0xd2, 0x85, 0xe0, 0xa3, 0xcf, 0xe8, 0x10, 0x52, 0x07, 0x0a, 0x21, 0xb5, 0x57, 0x08, - 0xfd, 0x81, 0x0a, 0x53, 0x52, 0x08, 0xb1, 0xe7, 0x43, 0xef, 0x57, 0x05, 0xba, 0x36, 0xc0, 0x0b, - 0x16, 0x61, 0x31, 0x75, 0x6d, 0x80, 0x87, 0xd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0x2e, 0x4a, 0x69, 0xbb, 0x18, 0xf4, 0x8f, 0x41, 0x72, 0xc3, 0x72, - 0xaf, 0xac, 0x60, 0x36, 0xfe, 0x17, 0x79, 0xba, 0xd9, 0xb8, 0x08, 0x65, 0xf1, 0x10, 0x0c, 0x7d, - 0x6d, 0x15, 0xa3, 0xe3, 0xfd, 0xd0, 0x44, 0xc4, 0x47, 0x93, 0x43, 0xfd, 0x79, 0x18, 0xc5, 0xf7, - 0x26, 0xf4, 0xe4, 0x09, 0xde, 0xb8, 0x76, 0xc1, 0x3d, 0x19, 0x8a, 0xf7, 0x31, 0x9c, 0x80, 0x9e, - 0x7f, 0xb8, 0x2f, 0x81, 0xa0, 0x80, 0x8f, 0xc1, 0x04, 0xbb, 0x9e, 0x06, 0x23, 0x3d, 0x09, 0x76, - 0x03, 0x1a, 0xec, 0x8a, 0x1a, 0xec, 0x7a, 0x1a, 0x24, 0xfb, 0x12, 0x88, 0x1a, 0x78, 0xc7, 0x7a, - 0x01, 0x60, 0xbd, 0xfe, 0x06, 0xaa, 0x51, 0x15, 0xe8, 0xdf, 0xeb, 0xc9, 0x86, 0x30, 0xf8, 0x42, - 0x94, 0x42, 0x40, 0xe9, 0x25, 0x48, 0xed, 0x1e, 0xfa, 0x24, 0xd0, 0x95, 0xc7, 0x9e, 0x1a, 0x87, - 0x01, 0x16, 0x11, 0xe7, 0xa9, 0x42, 0x2f, 0x26, 0xd5, 0x5f, 0x15, 0xe1, 0x6a, 0x04, 0x94, 0xaf, - 0x0a, 0x25, 0x49, 0x47, 0xa8, 0x22, 0xb0, 0x88, 0x38, 0x5c, 0x0c, 0x0b, 0xb6, 0x8d, 0x25, 0x59, - 0x55, 0x9a, 0x0b, 0xa1, 0x60, 0x12, 0xac, 0x18, 0xb2, 0x23, 0xe2, 0x11, 0x12, 0xe4, 0x18, 0x3c, - 0xde, 0xdb, 0x23, 0x5c, 0x86, 0x7b, 0x84, 0x1f, 0x8b, 0x79, 0x46, 0xde, 0x67, 0xc5, 0x3c, 0x13, - 0x91, 0x79, 0xc6, 0x45, 0x03, 0x79, 0xc6, 0x87, 0xf5, 0x4f, 0xc0, 0x04, 0x1f, 0xc3, 0xe5, 0x09, - 0x93, 0x6a, 0xec, 0x2f, 0x9a, 0xf5, 0x26, 0x65, 0x92, 0x94, 0x33, 0x88, 0xd7, 0xcb, 0x30, 0xce, - 0x87, 0xb6, 0x1c, 0x72, 0xb9, 0x93, 0xec, 0x8f, 0x55, 0xf4, 0x66, 0xa4, 0x82, 0x94, 0x30, 0x80, - 0x9e, 0x59, 0x83, 0xe9, 0xf0, 0x6a, 0x24, 0x96, 0xdf, 0x51, 0x5a, 0x7e, 0xcf, 0x88, 0xe5, 0x57, - 0x11, 0xcb, 0x77, 0x11, 0xce, 0x86, 0xd6, 0x9e, 0x28, 0x92, 0x98, 0x48, 0x72, 0x0b, 0xc6, 0xa4, - 0x92, 0x23, 0x82, 0x13, 0x21, 0xe0, 0x44, 0x37, 0xd8, 0x0f, 0xad, 0x90, 0xd5, 0x43, 0x02, 0xab, - 0x22, 0xf8, 0x63, 0x30, 0x2e, 0xd7, 0x1b, 0x11, 0x3d, 0x16, 0x82, 0x1e, 0x0b, 0x41, 0x87, 0x9f, - 0x3b, 0x1e, 0x82, 0x8e, 0x07, 0xd0, 0xbb, 0x3d, 0xcf, 0x3d, 0x19, 0x82, 0x9e, 0x0c, 0x41, 0x87, - 0x9f, 0x5b, 0x0f, 0x41, 0xeb, 0x22, 0xfa, 0x59, 0x98, 0x08, 0x94, 0x18, 0x11, 0x3e, 0x12, 0x02, - 0x1f, 0x11, 0xe1, 0xcf, 0x81, 0x16, 0x2c, 0x2e, 0x22, 0x7e, 0x22, 0x04, 0x3f, 0x11, 0x76, 0xfa, - 0x70, 0xed, 0x87, 0x43, 0xe0, 0xc3, 0xa1, 0xa7, 0x0f, 0xc7, 0x6b, 0x21, 0x78, 0x4d, 0xc4, 0xe7, - 0x20, 0x2d, 0x56, 0x13, 0x11, 0x9b, 0x0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0x58, 0xb1, 0xa0, 0xe6, 0x51, 0x39, 0x21, 0x06, 0x64, 0xf6, 0x71, 0x18, 0x93, 0xb8, 0xf5, 0x34, - 0x28, 0x87, 0xec, 0xcb, 0x94, 0xca, 0x61, 0xf6, 0x4b, 0x0a, 0xa4, 0xd8, 0x8b, 0x04, 0x3b, 0x66, - 0xbd, 0xad, 0xbf, 0x00, 0xf1, 0x06, 0xff, 0x42, 0xd3, 0x83, 0x7e, 0x79, 0x96, 0x30, 0xe8, 0xeb, - 0x90, 0x68, 0x7b, 0x5f, 0x78, 0x7a, 0xa0, 0x6f, 0xc4, 0x12, 0x78, 0xf6, 0x9e, 0x02, 0x93, 0xec, - 0x3d, 0x57, 0x87, 0xbd, 0xfe, 0x6c, 0xb6, 0x66, 0xbe, 0xae, 0xc0, 0xa8, 0x77, 0xa4, 0x1f, 0xc0, - 0xb8, 0x77, 0x40, 0x5f, 0xb1, 0xa7, 0x91, 0x9a, 0x13, 0x2c, 0xdc, 0xc5, 0xb1, 0x14, 0xf2, 0x89, - 0x3e, 0x8a, 0xa2, 0x6b, 0xb2, 0x3c, 0x38, 0x93, 0x87, 0xa9, 0x10, 0xb1, 0xd3, 0x2c, 0xc8, 0xd9, - 0xf3, 0x30, 0x5a, 0xb6, 0x5d, 0xfa, 0xbb, 0x39, 0xfa, 0x19, 0xe1, 0xa9, 0x42, 0x21, 0xa6, 0x0d, - 0x11, 0xf0, 0xe2, 0x79, 0x18, 0x61, 0xd9, 0xaf, 0x0f, 0x43, 0x6c, 0x2b, 0xaf, 0x0d, 0x91, 0xff, - 0x0b, 0x9a, 0x42, 0xfe, 0x2f, 0x6a, 0xb1, 0xc2, 0xe6, 0x03, 0x3e, 0x67, 0x1a, 0x0a, 0x7b, 0xce, - 0x74, 0x30, 0x4c, 0xcd, 0xf3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x99, 0xf6, 0x2d, 0x5c, - 0x81, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -func (this *Uint128Pair) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Uint128Pair") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Uint128Pair 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 that1.Right == nil { - if this.Right != nil { - return fmt.Errorf("this.Right != nil && that1.Right == nil") - } - } else if !this.Right.Equal(*that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - return nil -} -func (this *Uint128Pair) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if that1.Right == nil { - if this.Right != nil { - return false - } - } else if !this.Right.Equal(*that1.Right) { - return false - } - return true -} -func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") - } - return nil -} -func (this *ContainsNestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - return true -} -func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) - } - } - return nil -} -func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} -func (this *NotPacked) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NotPacked") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NotPacked but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") - } - 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]) - } - } - return nil -} -func (this *NotPacked) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - 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 - } - } - return true -} - -type MessageFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *Message) TestProto() 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() proto.Message - GetBunny() string -} - -func (this *Nested) Proto() proto.Message { - return this -} - -func (this *Nested) TestProto() 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() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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() proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() 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() proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 Uint128PairFace interface { - Proto() proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() proto.Message { - return NewUint128PairFromFace(this) -} - -func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Left -} - -func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Right -} - -func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { - this := &Uint128Pair{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type ContainsNestedMapFace interface { - Proto() proto.Message -} - -func (this *ContainsNestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() proto.Message { - return NewContainsNestedMap_NestedMapFromFace(this) -} - -func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { - return this.NestedMapField -} - -func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - this.NestedMapField = that.GetNestedMapField() - return this -} - -type NotPackedFace interface { - Proto() proto.Message - GetKey() []uint64 -} - -func (this *NotPacked) Proto() proto.Message { - return this -} - -func (this *NotPacked) TestProto() proto.Message { - return NewNotPackedFromFace(this) -} - -func (this *NotPacked) GetKey() []uint64 { - return this.Key -} - -func NewNotPackedFromFace(that NotPackedFace) *NotPacked { - this := &NotPacked{} - this.Key = that.GetKey() - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&theproto3.Uint128Pair{") - s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") - s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&theproto3.ContainsNestedMap{") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap_NestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - if this.NestedMapField != nil { - s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NotPacked) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.NotPacked{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 (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 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 { - dAtA2 := make([]byte, len(m.Key)*10) - var j1 int - for _, num := range m.Key { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - dAtA[i] = 0x2a - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(j1)) - i += copy(dAtA[i:], dAtA2[:j1]) - } - if m.Nested != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Nested.Size())) - n3, err := m.Nested.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Score)))) - i += 4 - } - if len(m.Terrain) > 0 { - for k := range m.Terrain { - dAtA[i] = 0x52 - i++ - v := m.Terrain[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + sovTheproto3(uint64(k)) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(k)) - if v != nil { - 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 - } - } - } - if m.Proto2Field != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Proto2Field.Size())) - n5, err := m.Proto2Field.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if len(m.Proto2Value) > 0 { - for k := range m.Proto2Value { - dAtA[i] = 0x6a - i++ - v := m.Proto2Value[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + sovTheproto3(uint64(k)) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(k)) - if v != nil { - 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 - } - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - 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] - byteSize := 0 - if len(v) > 0 { - byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if len(v) > 0 { - 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] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) - n7, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - } - } - return i, nil -} - -func (m *AllMapsOrdered) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllMapsOrdered) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.StringToDoubleMap) > 0 { - keysForStringToDoubleMap := make([]string, 0, len(m.StringToDoubleMap)) - for k := range m.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, string(k)) - } - sortkeys.Strings(keysForStringToDoubleMap) - for _, k := range keysForStringToDoubleMap { - dAtA[i] = 0xa - i++ - v := m.StringToDoubleMap[string(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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - if len(m.StringToFloatMap) > 0 { - keysForStringToFloatMap := make([]string, 0, len(m.StringToFloatMap)) - for k := range m.StringToFloatMap { - keysForStringToFloatMap = append(keysForStringToFloatMap, string(k)) - } - sortkeys.Strings(keysForStringToFloatMap) - for _, k := range keysForStringToFloatMap { - dAtA[i] = 0x12 - i++ - v := m.StringToFloatMap[string(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++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(v)))) - i += 4 - } - } - if len(m.Int32Map) > 0 { - keysForInt32Map := make([]int32, 0, len(m.Int32Map)) - for k := range m.Int32Map { - keysForInt32Map = append(keysForInt32Map, int32(k)) - } - sortkeys.Int32s(keysForInt32Map) - for _, k := range keysForInt32Map { - dAtA[i] = 0x1a - i++ - v := m.Int32Map[int32(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 { - keysForInt64Map := make([]int64, 0, len(m.Int64Map)) - for k := range m.Int64Map { - keysForInt64Map = append(keysForInt64Map, int64(k)) - } - sortkeys.Int64s(keysForInt64Map) - for _, k := range keysForInt64Map { - dAtA[i] = 0x22 - i++ - v := m.Int64Map[int64(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 { - keysForUint32Map := make([]uint32, 0, len(m.Uint32Map)) - for k := range m.Uint32Map { - keysForUint32Map = append(keysForUint32Map, uint32(k)) - } - sortkeys.Uint32s(keysForUint32Map) - for _, k := range keysForUint32Map { - dAtA[i] = 0x2a - i++ - v := m.Uint32Map[uint32(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 { - keysForUint64Map := make([]uint64, 0, len(m.Uint64Map)) - for k := range m.Uint64Map { - keysForUint64Map = append(keysForUint64Map, uint64(k)) - } - sortkeys.Uint64s(keysForUint64Map) - for _, k := range keysForUint64Map { - dAtA[i] = 0x32 - i++ - v := m.Uint64Map[uint64(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 { - keysForSint32Map := make([]int32, 0, len(m.Sint32Map)) - for k := range m.Sint32Map { - keysForSint32Map = append(keysForSint32Map, int32(k)) - } - sortkeys.Int32s(keysForSint32Map) - for _, k := range keysForSint32Map { - dAtA[i] = 0x3a - i++ - v := m.Sint32Map[int32(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 { - keysForSint64Map := make([]int64, 0, len(m.Sint64Map)) - for k := range m.Sint64Map { - keysForSint64Map = append(keysForSint64Map, int64(k)) - } - sortkeys.Int64s(keysForSint64Map) - for _, k := range keysForSint64Map { - dAtA[i] = 0x42 - i++ - v := m.Sint64Map[int64(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 { - keysForFixed32Map := make([]uint32, 0, len(m.Fixed32Map)) - for k := range m.Fixed32Map { - keysForFixed32Map = append(keysForFixed32Map, uint32(k)) - } - sortkeys.Uint32s(keysForFixed32Map) - for _, k := range keysForFixed32Map { - dAtA[i] = 0x4a - i++ - v := m.Fixed32Map[uint32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Sfixed32Map) > 0 { - keysForSfixed32Map := make([]int32, 0, len(m.Sfixed32Map)) - for k := range m.Sfixed32Map { - keysForSfixed32Map = append(keysForSfixed32Map, int32(k)) - } - sortkeys.Int32s(keysForSfixed32Map) - for _, k := range keysForSfixed32Map { - dAtA[i] = 0x52 - i++ - v := m.Sfixed32Map[int32(k)] - mapSize := 1 + 4 + 1 + 4 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xd - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(k)) - i += 4 - dAtA[i] = 0x15 - i++ - binary.LittleEndian.PutUint32(dAtA[i:], uint32(v)) - i += 4 - } - } - if len(m.Fixed64Map) > 0 { - keysForFixed64Map := make([]uint64, 0, len(m.Fixed64Map)) - for k := range m.Fixed64Map { - keysForFixed64Map = append(keysForFixed64Map, uint64(k)) - } - sortkeys.Uint64s(keysForFixed64Map) - for _, k := range keysForFixed64Map { - dAtA[i] = 0x5a - i++ - v := m.Fixed64Map[uint64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.Sfixed64Map) > 0 { - keysForSfixed64Map := make([]int64, 0, len(m.Sfixed64Map)) - for k := range m.Sfixed64Map { - keysForSfixed64Map = append(keysForSfixed64Map, int64(k)) - } - sortkeys.Int64s(keysForSfixed64Map) - for _, k := range keysForSfixed64Map { - dAtA[i] = 0x62 - i++ - v := m.Sfixed64Map[int64(k)] - mapSize := 1 + 8 + 1 + 8 - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x9 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(k)) - i += 8 - dAtA[i] = 0x11 - i++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(v)) - i += 8 - } - } - if len(m.BoolMap) > 0 { - keysForBoolMap := make([]bool, 0, len(m.BoolMap)) - for k := range m.BoolMap { - keysForBoolMap = append(keysForBoolMap, bool(k)) - } - sortkeys.Bools(keysForBoolMap) - for _, k := range keysForBoolMap { - dAtA[i] = 0x6a - i++ - v := m.BoolMap[bool(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 { - keysForStringMap := make([]string, 0, len(m.StringMap)) - for k := range m.StringMap { - keysForStringMap = append(keysForStringMap, string(k)) - } - sortkeys.Strings(keysForStringMap) - for _, k := range keysForStringMap { - dAtA[i] = 0x72 - i++ - v := m.StringMap[string(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 { - keysForStringToBytesMap := make([]string, 0, len(m.StringToBytesMap)) - for k := range m.StringToBytesMap { - keysForStringToBytesMap = append(keysForStringToBytesMap, string(k)) - } - sortkeys.Strings(keysForStringToBytesMap) - for _, k := range keysForStringToBytesMap { - dAtA[i] = 0x7a - i++ - v := m.StringToBytesMap[string(k)] - byteSize := 0 - if len(v) > 0 { - byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + byteSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if len(v) > 0 { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - } - if len(m.StringToEnumMap) > 0 { - keysForStringToEnumMap := make([]string, 0, len(m.StringToEnumMap)) - for k := range m.StringToEnumMap { - keysForStringToEnumMap = append(keysForStringToEnumMap, string(k)) - } - sortkeys.Strings(keysForStringToEnumMap) - for _, k := range keysForStringToEnumMap { - dAtA[i] = 0x82 - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToEnumMap[string(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 { - keysForStringToMsgMap := make([]string, 0, len(m.StringToMsgMap)) - for k := range m.StringToMsgMap { - keysForStringToMsgMap = append(keysForStringToMsgMap, string(k)) - } - sortkeys.Strings(keysForStringToMsgMap) - for _, k := range keysForStringToMsgMap { - dAtA[i] = 0x8a - i++ - dAtA[i] = 0x1 - i++ - v := m.StringToMsgMap[string(k)] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovTheproto3(uint64(len(k))) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) - n8, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - } - } - 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] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTheproto3(uint64(msgSize)) - } - mapSize := 1 + sozTheproto3(uint64(k)) + msgSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64((uint64(k)<<1)^uint64((k>>63)))) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(v.Size())) - n9, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - } - } - if len(m.ByteMapping) > 0 { - for k := range m.ByteMapping { - dAtA[i] = 0x1a - i++ - v := m.ByteMapping[k] - byteSize := 0 - if len(v) > 0 { - byteSize = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapSize := 1 + 1 + byteSize - i = encodeVarintTheproto3(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - if k { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - if len(v) > 0 { - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.F)))) - i += 8 - } - return i, nil -} - -func (m *Uint128Pair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Uint128Pair) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Left.Size())) - n10, err := m.Left.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - if m.Right != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(m.Right.Size())) - n11, err := m.Right.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} - -func (m *ContainsNestedMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainsNestedMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func (m *ContainsNestedMap_NestedMap) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ContainsNestedMap_NestedMap) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NestedMapField) > 0 { - for k := range m.NestedMapField { - dAtA[i] = 0xa - i++ - v := m.NestedMapField[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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i += 8 - } - } - return i, nil -} - -func (m *NotPacked) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NotPacked) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Key) > 0 { - for _, num := range m.Key { - dAtA[i] = 0x28 - i++ - i = encodeVarintTheproto3(dAtA, i, uint64(num)) - } - } - return i, nil -} - -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 = string(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(10) - 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 = string(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 NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v37; i++ { - v38 := randStringTheproto3(r) - this.StringToDoubleMap[v38] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v38] *= -1 - } - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v39; i++ { - v40 := randStringTheproto3(r) - this.StringToFloatMap[v40] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v40] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v41; i++ { - v42 := int32(r.Int31()) - this.Int32Map[v42] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v42] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v43; i++ { - v44 := int64(r.Int63()) - this.Int64Map[v44] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v44] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v45; i++ { - v46 := uint32(r.Uint32()) - this.Uint32Map[v46] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v47; i++ { - v48 := uint64(uint64(r.Uint32())) - this.Uint64Map[v48] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v49 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v49; i++ { - v50 := int32(r.Int31()) - this.Sint32Map[v50] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v50] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v51; i++ { - v52 := int64(r.Int63()) - this.Sint64Map[v52] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v52] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v53; i++ { - v54 := uint32(r.Uint32()) - this.Fixed32Map[v54] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v55; i++ { - v56 := int32(r.Int31()) - this.Sfixed32Map[v56] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v56] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v57; i++ { - v58 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v59; i++ { - v60 := int64(r.Int63()) - this.Sfixed64Map[v60] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v60] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v61; i++ { - v62 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v63; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v64; i++ { - v65 := r.Intn(100) - v66 := randStringTheproto3(r) - this.StringToBytesMap[v66] = make([]byte, v65) - for i := 0; i < v65; i++ { - this.StringToBytesMap[v66][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v67; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v68; 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 { - v69 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v69; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v70; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v71; i++ { - v72 := r.Intn(100) - v73 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v73] = make([]byte, v72) - for i := 0; i < v72; i++ { - this.ByteMapping[v73][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 -} - -func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { - this := &Uint128Pair{} - v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Left = *v74 - this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { - this := &ContainsNestedMap{} - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - if r.Intn(10) != 0 { - v75 := r.Intn(10) - this.NestedMapField = make(map[string]float64) - for i := 0; i < v75; i++ { - v76 := randStringTheproto3(r) - this.NestedMapField[v76] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.NestedMapField[v76] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { - this := &NotPacked{} - v77 := r.Intn(10) - this.Key = make([]uint64, v77) - for i := 0; i < v77; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - 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 { - v78 := r.Intn(100) - tmps := make([]rune, v78) - for i := 0; i < v78; 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)) - v79 := r.Int63() - if r.Intn(2) == 0 { - v79 *= -1 - } - dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) - 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)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovTheproto3(uint64(l)) - } - if len(m.Key) > 0 { - l = 0 - for _, e := range m.Key { - l += sovTheproto3(uint64(e)) - } - n += 1 + sovTheproto3(uint64(l)) + l - } - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + l - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + 1 + l - 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 (m *Uint128Pair) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovTheproto3(uint64(l)) - if m.Right != nil { - l = m.Right.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *ContainsNestedMap) Size() (n int) { - var l int - _ = l - return n -} - -func (m *ContainsNestedMap_NestedMap) Size() (n int) { - var l int - _ = l - if len(m.NestedMapField) > 0 { - for k, v := range m.NestedMapField { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *NotPacked) Size() (n int) { - var l int - _ = l - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Uint128Pair{`, - `Left:` + fmt.Sprintf("%v", this.Left) + `,`, - `Right:` + fmt.Sprintf("%v", this.Right) + `,`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainsNestedMap{`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap_NestedMap) String() string { - if this == nil { - return "nil" - } - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, - `NestedMapField:` + mapStringForNestedMapField + `,`, - `}`, - }, "") - return s -} -func (this *NotPacked) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NotPacked{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `}`, - }, "") - 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 init() { proto.RegisterFile("combos/marshaler/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1610 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, - 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, - 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, - 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x90, 0xa3, 0xa0, - 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, - 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd, 0xe4, 0x98, 0x63, 0x8e, 0xc5, 0xcc, 0x50, 0xd2, 0x48, 0x1c, - 0x8a, 0x4d, 0x2f, 0xbd, 0xf8, 0x24, 0xce, 0xf3, 0xfb, 0x7e, 0xe6, 0x71, 0x38, 0xf3, 0xf8, 0x05, - 0x0d, 0x85, 0x03, 0xab, 0xd7, 0xb2, 0x9c, 0xe5, 0x9e, 0x66, 0x3b, 0x1d, 0xad, 0xab, 0xdb, 0xcb, - 0xa4, 0xa3, 0x1f, 0xdb, 0x16, 0xb1, 0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0x70, 0xfd, 0x58, 0x33, 0x04, - 0xf0, 0xf9, 0xe3, 0x33, 0x01, 0x42, 0x01, 0x63, 0x0d, 0x05, 0x34, 0x47, 0x15, 0x24, 0x7c, 0x01, - 0xcd, 0xa9, 0x0a, 0x9a, 0x62, 0x05, 0xcd, 0x51, 0x05, 0xc9, 0x99, 0x00, 0xb1, 0x82, 0xd1, 0x18, - 0x57, 0x00, 0x6a, 0xc6, 0x57, 0xfa, 0x21, 0x2f, 0x21, 0xc5, 0x08, 0x45, 0x09, 0x61, 0x9c, 0xc4, - 0x11, 0x82, 0x0a, 0xaf, 0x43, 0xba, 0x79, 0x34, 0x86, 0x80, 0xe7, 0x1c, 0x8f, 0xca, 0x38, 0x9a, - 0xa2, 0x88, 0xba, 0x51, 0x29, 0xfc, 0x66, 0xd2, 0xb3, 0x4b, 0x11, 0xee, 0x46, 0x50, 0x8d, 0x4b, - 0xe1, 0x90, 0x4c, 0x40, 0x29, 0x02, 0x45, 0xd4, 0xd1, 0x66, 0x58, 0xb1, 0x2c, 0x9a, 0xe9, 0x76, - 0xa5, 0x45, 0x09, 0xc2, 0xcd, 0x70, 0x9b, 0xa1, 0x3b, 0x62, 0x4f, 0x84, 0x6d, 0x72, 0x2a, 0xce, - 0xf9, 0x3f, 0x91, 0x61, 0xce, 0xf0, 0x89, 0x0c, 0xc7, 0xe2, 0x39, 0xab, 0x9c, 0x10, 0xdd, 0xa1, - 0x9c, 0xb9, 0xc0, 0x73, 0x36, 0x4c, 0x9d, 0x3a, 0x67, 0xc3, 0x30, 0xfe, 0x0c, 0xe6, 0x86, 0x31, - 0xda, 0x9e, 0x28, 0x54, 0x61, 0xd0, 0x2b, 0x33, 0xa0, 0x6e, 0x26, 0x67, 0x4e, 0xeb, 0x71, 0x1d, - 0x72, 0xc3, 0xd0, 0x96, 0xc3, 0x6e, 0x77, 0x9e, 0x11, 0x2f, 0xcf, 0x20, 0xf2, 0x44, 0x0e, 0x9c, - 0x52, 0x2f, 0xdc, 0x87, 0x7f, 0xca, 0xbb, 0x91, 0xd8, 0x7e, 0x53, 0xbc, 0xfd, 0x5e, 0x14, 0xdb, - 0x2f, 0x12, 0xdb, 0x77, 0x15, 0xfe, 0x21, 0xed, 0x3d, 0x41, 0x90, 0xb0, 0x08, 0xf9, 0x10, 0xb2, - 0x13, 0x2d, 0x47, 0x14, 0xc7, 0x24, 0xe2, 0x98, 0x57, 0x3c, 0xde, 0x5a, 0x92, 0xb7, 0xc7, 0x84, - 0x38, 0x22, 0x8a, 0xef, 0x42, 0x6e, 0xb2, 0xdf, 0x88, 0xea, 0xac, 0x44, 0x9d, 0x95, 0xa8, 0xe5, - 0x73, 0x47, 0x25, 0xea, 0xe8, 0x94, 0xba, 0xe9, 0x3b, 0xf7, 0xbc, 0x44, 0x3d, 0x2f, 0x51, 0xcb, - 0xe7, 0xc6, 0x12, 0x35, 0x16, 0xd5, 0x1f, 0xc1, 0xdc, 0x54, 0x8b, 0x11, 0xe5, 0x09, 0x89, 0x3c, - 0x21, 0xca, 0x3f, 0x06, 0x65, 0xba, 0xb9, 0x88, 0xfa, 0x39, 0x89, 0x7e, 0x4e, 0x36, 0xbd, 0xbc, - 0xfa, 0xb8, 0x44, 0x1e, 0x97, 0x4e, 0x2f, 0xd7, 0x2b, 0x12, 0xbd, 0x22, 0xea, 0x57, 0x21, 0x23, - 0x76, 0x13, 0x51, 0x9b, 0x94, 0x68, 0x93, 0xd3, 0xeb, 0x3e, 0xd1, 0x4c, 0x82, 0x76, 0x7a, 0xca, - 0xe7, 0xb8, 0x4c, 0xb4, 0x90, 0x20, 0x48, 0x46, 0x84, 0x3c, 0x86, 0x8b, 0xb2, 0x96, 0x21, 0x61, - 0x94, 0x44, 0x46, 0x8e, 0x7a, 0xc4, 0xb1, 0xd9, 0xa3, 0xaa, 0x09, 0xe3, 0xb4, 0xf0, 0x04, 0x2e, - 0x48, 0x1a, 0x87, 0x04, 0x5b, 0x9e, 0x74, 0x63, 0x79, 0x01, 0xcb, 0x9a,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0xf9, 0xf2, 0xfc, 0x11, 0x00, 0x00, - 0xff, 0xff, 0x63, 0x09, 0xf8, 0x62, 0x65, 0x1a, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto deleted file mode 100644 index 56f8584bd..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3.proto +++ /dev/null @@ -1,168 +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 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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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; -} - -message Uint128Pair { - bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message ContainsNestedMap { - message NestedMap { - map NestedMapField = 1; - } -} - -message NotPacked { - repeated uint64 key = 5 [packed=false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go deleted file mode 100644 index d66aeb5bc..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/marshaler/theproto3pb_test.go +++ /dev/null @@ -1,2423 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/theproto3.proto - -/* -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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -package theproto3 - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNestedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAllMapsOrderedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMessageWithMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestFloatingPointMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUint128PairMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedUint128Pair(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Uint128Pair{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestContainsNestedMap_NestedMapMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap_NestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNotPackedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkNotPackedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNotPacked(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNotPacked(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NotPacked{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMap_NestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNotPackedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNotPackedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := rand.New(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 := rand.New(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 TestUint128PairFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMap_NestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNotPackedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNotPackedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUint128PairSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNotPackedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNotPacked(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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 := rand.New(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 := rand.New(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 TestUint128PairStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMap_NestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNotPackedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(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/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go deleted file mode 100644 index bb7eb6bb9..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/proto3_test.go +++ /dev/null @@ -1,159 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 theproto3 - -import ( - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestCustomTypeSize(t *testing.T) { - m := &Uint128Pair{} - m.Size() // Should not panic. -} - -func TestCustomTypeMarshalUnmarshal(t *testing.T) { - m1 := &Uint128Pair{} - if b, err := proto.Marshal(m1); err != nil { - t.Fatal(err) - } else { - m2 := &Uint128Pair{} - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(m1, m2) { - t.Errorf("expected %+v, got %+v", m1, m2) - } - } -} - -func TestNotPackedToPacked(t *testing.T) { - input := []uint64{1, 10e9} - notpacked := &NotPacked{Key: input} - if data, err := proto.Marshal(notpacked); err != nil { - t.Fatal(err) - } else { - packed := &Message{} - if err := proto.Unmarshal(data, packed); err != nil { - t.Fatal(err) - } - output := packed.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} - -func TestPackedToNotPacked(t *testing.T) { - input := []uint64{1, 10e9} - packed := &Message{Key: input} - if data, err := proto.Marshal(packed); err != nil { - t.Fatal(err) - } else { - notpacked := &NotPacked{} - if err := proto.Unmarshal(data, notpacked); err != nil { - t.Fatal(err) - } - output := notpacked.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go deleted file mode 100644 index 59249d442..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.pb.go +++ /dev/null @@ -1,4877 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/theproto3.proto - -/* - 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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import 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 - -// 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 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 (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -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, -} - -func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } - -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,json=heightInCm,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,json=resultCount,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,packed,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=proto2Field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" 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() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} -func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } - -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() {} -func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" 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=msgMapping" 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=byteMapping" 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() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } - -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 (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } - -type Uint128Pair struct { - Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` - Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` -} - -func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } -func (*Uint128Pair) ProtoMessage() {} -func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } - -type ContainsNestedMap struct { -} - -func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } -func (*ContainsNestedMap) ProtoMessage() {} -func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } - -type ContainsNestedMap_NestedMap struct { - NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` -} - -func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } -func (*ContainsNestedMap_NestedMap) ProtoMessage() {} -func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { - return fileDescriptorTheproto3, []int{7, 0} -} - -type NotPacked struct { - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` -} - -func (m *NotPacked) Reset() { *m = NotPacked{} } -func (*NotPacked) ProtoMessage() {} -func (*NotPacked) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{8} } - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") - proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") - proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") - proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") - 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 *AllMapsOrdered) 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 (this *Uint128Pair) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *NotPacked) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7961 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, - 0x99, 0x1e, 0x1b, 0x0d, 0x92, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x33, - 0xd0, 0x68, 0x44, 0xd1, 0x16, 0x67, 0x86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 0x09, 0xd3, 0x11, 0xb3, - 0xba, 0x0e, 0x49, 0xdb, 0x6c, 0x62, 0x46, 0x65, 0x61, 0xcc, 0x20, 0x9f, 0xf5, 0x2c, 0x8c, 0xb6, - 0xcc, 0xda, 0xcb, 0xe6, 0x21, 0xca, 0x26, 0xc8, 0x30, 0x3f, 0xd4, 0xe7, 0x00, 0xea, 0xa8, 0x85, - 0xec, 0x3a, 0xb2, 0x6b, 0xc7, 0x59, 0xf5, 0xac, 0xba, 0x30, 0x66, 0x08, 0x23, 0xfa, 0xc7, 0x60, - 0xaa, 0xd5, 0xd9, 0x6f, 0x58, 0xb5, 0xaa, 0x20, 0x06, 0x67, 0xd5, 0x85, 0x61, 0x43, 0xa3, 0x13, - 0xab, 0x81, 0xf0, 0x13, 0x30, 0xf9, 0x2a, 0x32, 0x5f, 0x16, 0x45, 0xd3, 0x44, 0x74, 0x02, 0x0f, - 0x0b, 0x82, 0x25, 0xc8, 0x34, 0x91, 0xeb, 0x9a, 0x87, 0xa8, 0xea, 0x1d, 0xb7, 0x50, 0x36, 0x49, - 0xae, 0xfe, 0x6c, 0xd7, 0xd5, 0x87, 0xaf, 0x3c, 0xcd, 0x50, 0xbb, 0xc7, 0x2d, 0xa4, 0x17, 0x60, - 0x0c, 0xd9, 0x9d, 0x26, 0x65, 0x18, 0xee, 0x61, 0xbf, 0xb2, 0xdd, 0x69, 0x86, 0x59, 0x52, 0x18, - 0xc6, 0x28, 0x46, 0x5d, 0xd4, 0x7e, 0xc5, 0xaa, 0xa1, 0xec, 0x08, 0x21, 0x78, 0xa2, 0x8b, 0x60, - 0x87, 0xce, 0x87, 0x39, 0x38, 0x4e, 0x2f, 0xc1, 0x18, 0x7a, 0xcd, 0x43, 0xb6, 0x6b, 0x39, 0x76, - 0x76, 0x94, 0x90, 0x3c, 0x1e, 0xe1, 0x45, 0xd4, 0xa8, 0x87, 0x29, 0x02, 0x9c, 0x7e, 0x0d, 0x46, - 0x9d, 0x96, 0x67, 0x39, 0x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bd, 0xe5, - 0xb8, 0x96, 0x67, 0xbd, 0x82, 0xaa, 0x96, 0xcd, 0x77, 0x77, 0xf0, 0x0d, 0x46, 0xd2, 0xd0, 0xf8, - 0xcc, 0xba, 0xed, 0xf9, 0xd2, 0x36, 0x3a, 0x34, 0x43, 0xd2, 0xb8, 0x80, 0xab, 0x86, 0xc6, 0x67, - 0x7c, 0xe9, 0x73, 0x90, 0xa9, 0x3b, 0x1d, 0xdc, 0x75, 0x51, 0x39, 0xbc, 0x5e, 0x28, 0x46, 0x9a, - 0x8e, 0xf9, 0x22, 0xac, 0x9f, 0x0e, 0xb6, 0x95, 0x32, 0x46, 0x9a, 0x8e, 0x51, 0x91, 0x27, 0x60, - 0xd2, 0x3c, 0x3c, 0x6c, 0x63, 0x72, 0x4e, 0x44, 0xef, 0x10, 0x26, 0xfc, 0x61, 0x22, 0x38, 0x7b, - 0x07, 0x52, 0xdc, 0x0e, 0x78, 0x49, 0xc6, 0x96, 0xa8, 0xb6, 0xe8, 0x6d, 0x6f, 0x62, 0x61, 0xcc, - 0x48, 0xd9, 0x7c, 0xf2, 0x1c, 0x64, 0x2c, 0xb7, 0x1a, 0xec, 0x92, 0x27, 0xce, 0x26, 0x16, 0x52, - 0x46, 0xda, 0x72, 0xfd, 0x1d, 0xc6, 0xdc, 0xd7, 0x12, 0x30, 0x21, 0xef, 0xf2, 0xeb, 0xab, 0x90, - 0x6a, 0x38, 0x35, 0x93, 0x84, 0x16, 0x7d, 0xc4, 0xb4, 0x10, 0xf3, 0x60, 0x60, 0x69, 0x83, 0xc9, - 0x1b, 0x3e, 0x72, 0xf6, 0x3f, 0x2a, 0x90, 0xe2, 0xc3, 0xfa, 0x0c, 0x24, 0x5b, 0xa6, 0x77, 0x44, - 0xe8, 0x86, 0x8b, 0x09, 0x4d, 0x31, 0xc8, 0x31, 0x1e, 0x77, 0x5b, 0xa6, 0x4d, 0x42, 0x80, 0x8d, - 0xe3, 0x63, 0xec, 0xd7, 0x06, 0x32, 0x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, 0x5d, 0x91, 0x81, 0x69, 0xb7, 0x81, 0x8f, 0xfb, 0xbe, 0x1c, 0x80, 0xf3, 0xef, 0x33, - 0x4e, 0x9d, 0x61, 0xb9, 0x4b, 0x31, 0xe3, 0x1d, 0x98, 0x7a, 0x05, 0xb5, 0xf7, 0x1d, 0x97, 0xed, - 0xd2, 0x0c, 0x40, 0xf7, 0x45, 0x46, 0x37, 0xc9, 0x80, 0x64, 0xdb, 0x06, 0x73, 0xdd, 0x84, 0xd4, - 0x81, 0x59, 0x43, 0x03, 0x50, 0x7c, 0x89, 0x51, 0x8c, 0x62, 0x79, 0x0c, 0x2d, 0x40, 0xe6, 0xd0, - 0x61, 0x2b, 0x53, 0x3c, 0xfc, 0xcb, 0x0c, 0x9e, 0xe6, 0x18, 0x46, 0xd1, 0x72, 0x5a, 0x9d, 0x06, - 0x5e, 0xb6, 0xe2, 0x29, 0xbe, 0xc2, 0x29, 0x38, 0x86, 0x51, 0x9c, 0xc0, 0xac, 0x6f, 0x72, 0x0a, - 0x57, 0xb0, 0xe7, 0xb3, 0x90, 0x76, 0xec, 0xc6, 0xb1, 0x63, 0x0f, 0xa2, 0xc4, 0x57, 0x19, 0x03, - 0x30, 0x08, 0x26, 0xb8, 0x05, 0x63, 0x83, 0x3a, 0xe2, 0x37, 0x7e, 0xc0, 0xd3, 0x83, 0x7b, 0xe0, - 0x36, 0x4c, 0xf2, 0x02, 0x65, 0x39, 0xf6, 0x00, 0x14, 0xff, 0x88, 0x51, 0x4c, 0x08, 0x30, 0x76, - 0x19, 0x1e, 0x72, 0xbd, 0x43, 0x34, 0x08, 0xc9, 0xd7, 0xf8, 0x65, 0x30, 0x08, 0x33, 0xe5, 0x3e, - 0xb2, 0x6b, 0x47, 0x83, 0x31, 0x7c, 0x9d, 0x9b, 0x92, 0x63, 0x30, 0x45, 0x09, 0xc6, 0x9b, 0x66, - 0xdb, 0x3d, 0x32, 0x1b, 0x03, 0xb9, 0xe3, 0x37, 0x19, 0x47, 0xc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 0x77, 0x25, - 0x04, 0x57, 0xcd, 0x86, 0x5c, 0x95, 0x10, 0xdc, 0x34, 0x1b, 0x72, 0x53, 0x42, 0x70, 0xd1, 0x6c, - 0xc8, 0x45, 0x09, 0xc1, 0x3d, 0xb3, 0x21, 0xf7, 0x24, 0x04, 0xd7, 0x9c, 0x09, 0xbb, 0x26, 0x21, - 0xba, 0xe5, 0x4c, 0xd8, 0x2d, 0x09, 0xd1, 0x25, 0x67, 0xc2, 0x2e, 0x49, 0x88, 0xee, 0x38, 0x13, - 0x76, 0x47, 0x42, 0x74, 0xc5, 0x9f, 0x24, 0x78, 0x47, 0xb8, 0xe3, 0xb5, 0x3b, 0x35, 0xef, 0x7d, - 0x75, 0x84, 0x97, 0xa4, 0xf6, 0x21, 0xbd, 0xac, 0x2f, 0x91, 0x86, 0x55, 0xec, 0x38, 0x43, 0x2b, - 0xd8, 0x25, 0xa9, 0xb1, 0x10, 0x10, 0x76, 0x34, 0x62, 0xe5, 0x7d, 0xf5, 0x86, 0x97, 0xa4, 0x36, - 0x23, 0x5e, 0xbf, 0x1b, 0x1f, 0x7a, 0xc7, 0xf6, 0x56, 0x82, 0x77, 0x6c, 0xcc, 0xfc, 0x27, 0xed, - 0xd8, 0x16, 0xe3, 0x4d, 0xee, 0x1b, 0x7b, 0x31, 0xde, 0xd8, 0x5d, 0xab, 0xce, 0xa0, 0x1d, 0xdc, - 0x62, 0xbc, 0x69, 0x7d, 0xa3, 0x7e, 0xb0, 0xfd, 0x16, 0x8b, 0x60, 0x03, 0xb5, 0x22, 0x22, 0xf8, - 0xa4, 0xfd, 0xd6, 0x25, 0xa9, 0x94, 0x9c, 0x34, 0x82, 0xd5, 0x13, 0x47, 0xf0, 0x49, 0x3b, 0xaf, - 0x4b, 0x52, 0x79, 0x39, 0x71, 0x04, 0x7f, 0x08, 0xfd, 0x10, 0x8b, 0xe0, 0xc0, 0xfc, 0x27, 0xed, - 0x87, 0x16, 0xe3, 0x4d, 0x1e, 0x19, 0xc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 0x90, 0xcc, 0xc9, 0xb7, 0x50, 0x79, 0xf0, - 0x45, 0x2e, 0xf7, 0x7a, 0x4f, 0x24, 0x9f, 0x14, 0x18, 0xba, 0xde, 0x13, 0x91, 0x66, 0xbb, 0xde, - 0x13, 0x91, 0x66, 0xbb, 0xde, 0x13, 0x91, 0x66, 0xbb, 0x9e, 0x05, 0x48, 0xb3, 0x5d, 0xef, 0x89, - 0x48, 0xb3, 0x5d, 0xef, 0x89, 0x48, 0xb3, 0xdd, 0xef, 0x89, 0xb0, 0xe9, 0x9e, 0xef, 0x89, 0xc8, - 0xf3, 0xdd, 0xef, 0x89, 0xc8, 0xf3, 0xdd, 0xef, 0x89, 0xe4, 0x93, 0x5e, 0xbb, 0x83, 0x7a, 0x3f, - 0x75, 0x90, 0xf1, 0xfd, 0x6e, 0x02, 0x83, 0x0a, 0xbc, 0x05, 0x93, 0x74, 0x43, 0xa2, 0xe4, 0xd8, - 0x9e, 0x69, 0xd9, 0xa8, 0xad, 0x7f, 0x02, 0x32, 0x74, 0x88, 0xde, 0xe6, 0x44, 0xdd, 0x06, 0xd2, - 0x79, 0x56, 0x6f, 0x25, 0xe9, 0xdc, 0x9f, 0x24, 0x61, 0x86, 0x0e, 0x54, 0xcc, 0x26, 0x92, 0xde, - 0x32, 0xba, 0x10, 0x7a, 0xa6, 0x34, 0x81, 0xe1, 0xf7, 0xdf, 0x99, 0xa7, 0xa3, 0x05, 0x3f, 0x9a, - 0x2e, 0x84, 0x9e, 0x2e, 0xc9, 0x72, 0xc1, 0x02, 0x74, 0x21, 0xf4, 0xe6, 0x91, 0x2c, 0xe7, 0xaf, - 0x37, 0xbe, 0x1c, 0x7f, 0x07, 0x49, 0x96, 0x5b, 0xf5, 0xa3, 0xec, 0x42, 0xe8, 0x6d, 0x24, 0x59, - 0xae, 0xec, 0xc7, 0xdb, 0x85, 0xd0, 0xb3, 0x27, 0x59, 0x6e, 0xcd, 0x8f, 0xbc, 0x0b, 0xa1, 0xa7, - 0x50, 0xb2, 0xdc, 0x6d, 0x3f, 0x06, 0x2f, 0x84, 0xde, 0x55, 0x92, 0xe5, 0x9e, 0xf3, 0xa3, 0xf1, - 0x42, 0xe8, 0xad, 0x25, 0x59, 0x6e, 0xdd, 0x8f, 0xcb, 0x85, 0xf0, 0xfb, 0x4b, 0xb2, 0xe0, 0x9d, - 0x20, 0x42, 0x17, 0xc2, 0x6f, 0x32, 0xc9, 0x92, 0x9f, 0x0c, 0x62, 0x75, 0x21, 0xfc, 0x4e, 0x93, - 0x2c, 0xb9, 0x11, 0x44, 0xed, 0x42, 0xf8, 0x59, 0x99, 0x2c, 0xb9, 0x19, 0xc4, 0xef, 0x42, 0xf8, - 0xa9, 0x99, 0x2c, 0x59, 0x09, 0x22, 0x79, 0x21, 0xfc, 0xfc, 0x4c, 0x96, 0xdc, 0x0a, 0x36, 0xd1, - 0xff, 0x20, 0x14, 0x7e, 0xc2, 0x5b, 0x50, 0xb9, 0x50, 0xf8, 0x41, 0x44, 0xe8, 0x85, 0x0a, 0x99, - 0x20, 0x13, 0x84, 0x5d, 0x2e, 0x14, 0x76, 0x10, 0x11, 0x72, 0xb9, 0x50, 0xc8, 0x41, 0x44, 0xb8, - 0xe5, 0x42, 0xe1, 0x06, 0x11, 0xa1, 0x96, 0x0b, 0x85, 0x1a, 0x44, 0x84, 0x59, 0x2e, 0x14, 0x66, - 0x10, 0x11, 0x62, 0xb9, 0x50, 0x88, 0x41, 0x44, 0x78, 0xe5, 0x42, 0xe1, 0x05, 0x11, 0xa1, 0x75, - 0x3e, 0x1c, 0x5a, 0x10, 0x15, 0x56, 0xe7, 0xc3, 0x61, 0x05, 0x51, 0x21, 0xf5, 0x58, 0x38, 0xa4, - 0xc6, 0xee, 0xbf, 0x33, 0x3f, 0x8c, 0x87, 0x84, 0x68, 0x3a, 0x1f, 0x8e, 0x26, 0x88, 0x8a, 0xa4, - 0xf3, 0xe1, 0x48, 0x82, 0xa8, 0x28, 0x3a, 0x1f, 0x8e, 0x22, 0x88, 0x8a, 0xa0, 0xb7, 0xc2, 0x11, - 0x14, 0xbc, 0xe3, 0x93, 0x0b, 0x3d, 0x52, 0x8c, 0x8b, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, - 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, 0x80, 0x08, 0x52, 0x07, 0x88, 0x20, 0x75, - 0x80, 0x08, 0x52, 0x07, 0x89, 0x20, 0x75, 0xa0, 0x08, 0x52, 0x7b, 0x45, 0xd0, 0xf9, 0xf0, 0x1b, - 0x0f, 0x10, 0x55, 0x90, 0xce, 0x87, 0x1f, 0x7d, 0xc6, 0x87, 0x90, 0x3a, 0x50, 0x08, 0xa9, 0xbd, - 0x42, 0xe8, 0x0f, 0x54, 0x98, 0x96, 0x42, 0x88, 0x3d, 0x1f, 0xfa, 0xa0, 0x2a, 0xd0, 0xb5, 0x01, - 0x5e, 0xb0, 0x88, 0x8a, 0xa9, 0x6b, 0x03, 0x3c, 0xa4, 0xee, 0x17, 0x67, 0xdd, 0x55, 0xa8, 0x3c, - 0x40, 0x15, 0x5a, 0xf3, 0x63, 0xe8, 0xda, 0x00, 0x2f, 0x5e, 0x74, 0xc7, 0xde, 0x8d, 0x7e, 0x45, - 0xe0, 0xb9, 0x81, 0x8a, 0xc0, 0xfa, 0x40, 0x45, 0xe0, 0x4e, 0xe0, 0xc1, 0x5f, 0x4e, 0xc0, 0xa9, - 0xc0, 0x83, 0xf4, 0x13, 0xf9, 0x29, 0xa5, 0x9c, 0xf0, 0x88, 0x4a, 0xe7, 0x8f, 0x6d, 0x04, 0x37, - 0x26, 0xd6, 0xeb, 0xfa, 0xb6, 0xfc, 0xb0, 0x2a, 0x7f, 0xd2, 0x07, 0x38, 0x82, 0xc7, 0xd9, 0x66, - 0xe8, 0x79, 0x50, 0xd7, 0xeb, 0x2e, 0xa9, 0x16, 0x51, 0xa7, 0x2d, 0x19, 0x78, 0x5a, 0x37, 0x60, - 0x84, 0x88, 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, - 0x58, 0x2f, 0x02, 0xac, 0x59, 0xaf, 0xa1, 0x3a, 0x55, 0x81, 0xfe, 0xb5, 0x9e, 0x5c, 0x04, 0x43, - 0x20, 0x44, 0x29, 0x04, 0x94, 0x5e, 0x86, 0xf4, 0xce, 0x41, 0x40, 0x02, 0x5d, 0x79, 0xec, 0xab, - 0x71, 0x10, 0x62, 0x11, 0x71, 0xbe, 0x2a, 0xf4, 0x62, 0xd2, 0xfd, 0x55, 0x11, 0xae, 0x46, 0x40, - 0x05, 0xaa, 0x50, 0x92, 0x4c, 0x8c, 0x2a, 0x02, 0x8b, 0x88, 0xc3, 0xc5, 0xb0, 0xe8, 0x38, 0x58, - 0x92, 0x55, 0xa5, 0xf9, 0x08, 0x0a, 0x26, 0xc1, 0x8a, 0x21, 0x3b, 0x22, 0x1e, 0x21, 0x41, 0x8e, - 0xc1, 0x13, 0xbd, 0x3d, 0xc2, 0x65, 0xb8, 0x47, 0xf8, 0xb1, 0x98, 0x67, 0xe4, 0x6d, 0x56, 0xcc, - 0x33, 0x19, 0x9b, 0x67, 0x5c, 0x34, 0x94, 0x67, 0x7c, 0x58, 0xff, 0x14, 0x4c, 0xf2, 0x31, 0x5c, - 0x9e, 0x30, 0xa9, 0xc6, 0xfe, 0x9e, 0x59, 0x6f, 0x52, 0x26, 0x49, 0x39, 0xc3, 0x78, 0xbd, 0x02, - 0x13, 0x7c, 0x68, 0xd3, 0x25, 0x97, 0x3b, 0xc5, 0xfe, 0x54, 0x45, 0x6f, 0x46, 0x2a, 0x48, 0x09, - 0x43, 0xe8, 0xd9, 0x55, 0x98, 0x89, 0xae, 0x46, 0x62, 0xf9, 0x1d, 0xa3, 0xe5, 0xf7, 0x94, 0x58, - 0x7e, 0x15, 0xb1, 0x7c, 0x97, 0xe0, 0x74, 0x64, 0xed, 0x89, 0x23, 0x49, 0x88, 0x24, 0xb7, 0x60, - 0x5c, 0x2a, 0x39, 0x22, 0x78, 0x38, 0x02, 0x3c, 0xdc, 0x0d,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 0x60, 0xe1, 0x2e, 0x8e, 0xa5, 0x88, - 0x4f, 0xf4, 0x41, 0x14, 0x5d, 0x93, 0xe5, 0xc1, 0xd9, 0x02, 0x4c, 0x47, 0x88, 0x9d, 0x64, 0x41, - 0xce, 0x9d, 0x83, 0xb1, 0x8a, 0xe3, 0xd1, 0x5f, 0xcd, 0xd1, 0x4f, 0x09, 0x4f, 0x15, 0x8a, 0x09, - 0x6d, 0x88, 0x80, 0x17, 0xcf, 0xc1, 0x28, 0xcb, 0x7e, 0x7d, 0x04, 0x12, 0x9b, 0x05, 0x6d, 0x88, - 0xfc, 0x5f, 0xd4, 0x14, 0xf2, 0x7f, 0x49, 0x4b, 0x14, 0x37, 0x1e, 0xe0, 0x29, 0xd3, 0xd0, 0xdb, - 0xf7, 0xe7, 0x86, 0xa2, 0x9e, 0x32, 0xed, 0x8f, 0x50, 0xf3, 0xfc, 0x69, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x9c, 0x62, 0x72, 0x25, 0x5a, 0x81, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -func (this *Uint128Pair) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Uint128Pair") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Uint128Pair 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 that1.Right == nil { - if this.Right != nil { - return fmt.Errorf("this.Right != nil && that1.Right == nil") - } - } else if !this.Right.Equal(*that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - return nil -} -func (this *Uint128Pair) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if that1.Right == nil { - if this.Right != nil { - return false - } - } else if !this.Right.Equal(*that1.Right) { - return false - } - return true -} -func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") - } - return nil -} -func (this *ContainsNestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - return true -} -func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) - } - } - return nil -} -func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} -func (this *NotPacked) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NotPacked") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NotPacked but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") - } - 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]) - } - } - return nil -} -func (this *NotPacked) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - 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 - } - } - return true -} - -type MessageFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *Message) TestProto() 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() proto.Message - GetBunny() string -} - -func (this *Nested) Proto() proto.Message { - return this -} - -func (this *Nested) TestProto() 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() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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() proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() 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() proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 Uint128PairFace interface { - Proto() proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() proto.Message { - return NewUint128PairFromFace(this) -} - -func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Left -} - -func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Right -} - -func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { - this := &Uint128Pair{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type ContainsNestedMapFace interface { - Proto() proto.Message -} - -func (this *ContainsNestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() proto.Message { - return NewContainsNestedMap_NestedMapFromFace(this) -} - -func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { - return this.NestedMapField -} - -func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - this.NestedMapField = that.GetNestedMapField() - return this -} - -type NotPackedFace interface { - Proto() proto.Message - GetKey() []uint64 -} - -func (this *NotPacked) Proto() proto.Message { - return this -} - -func (this *NotPacked) TestProto() proto.Message { - return NewNotPackedFromFace(this) -} - -func (this *NotPacked) GetKey() []uint64 { - return this.Key -} - -func NewNotPackedFromFace(that NotPackedFace) *NotPacked { - this := &NotPacked{} - this.Key = that.GetKey() - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&theproto3.Uint128Pair{") - s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") - s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&theproto3.ContainsNestedMap{") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap_NestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - if this.NestedMapField != nil { - s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NotPacked) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.NotPacked{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = string(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(10) - 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 = string(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 NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v37; i++ { - v38 := randStringTheproto3(r) - this.StringToDoubleMap[v38] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v38] *= -1 - } - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v39; i++ { - v40 := randStringTheproto3(r) - this.StringToFloatMap[v40] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v40] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v41; i++ { - v42 := int32(r.Int31()) - this.Int32Map[v42] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v42] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v43; i++ { - v44 := int64(r.Int63()) - this.Int64Map[v44] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v44] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v45; i++ { - v46 := uint32(r.Uint32()) - this.Uint32Map[v46] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v47; i++ { - v48 := uint64(uint64(r.Uint32())) - this.Uint64Map[v48] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v49 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v49; i++ { - v50 := int32(r.Int31()) - this.Sint32Map[v50] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v50] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v51; i++ { - v52 := int64(r.Int63()) - this.Sint64Map[v52] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v52] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v53; i++ { - v54 := uint32(r.Uint32()) - this.Fixed32Map[v54] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v55; i++ { - v56 := int32(r.Int31()) - this.Sfixed32Map[v56] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v56] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v57; i++ { - v58 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v59; i++ { - v60 := int64(r.Int63()) - this.Sfixed64Map[v60] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v60] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v61; i++ { - v62 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v63; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v64; i++ { - v65 := r.Intn(100) - v66 := randStringTheproto3(r) - this.StringToBytesMap[v66] = make([]byte, v65) - for i := 0; i < v65; i++ { - this.StringToBytesMap[v66][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v67; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v68; 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 { - v69 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v69; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v70; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v71; i++ { - v72 := r.Intn(100) - v73 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v73] = make([]byte, v72) - for i := 0; i < v72; i++ { - this.ByteMapping[v73][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 -} - -func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { - this := &Uint128Pair{} - v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Left = *v74 - this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { - this := &ContainsNestedMap{} - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - if r.Intn(10) != 0 { - v75 := r.Intn(10) - this.NestedMapField = make(map[string]float64) - for i := 0; i < v75; i++ { - v76 := randStringTheproto3(r) - this.NestedMapField[v76] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.NestedMapField[v76] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { - this := &NotPacked{} - v77 := r.Intn(10) - this.Key = make([]uint64, v77) - for i := 0; i < v77; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - 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 { - v78 := r.Intn(100) - tmps := make([]rune, v78) - for i := 0; i < v78; 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)) - v79 := r.Int63() - if r.Intn(2) == 0 { - v79 *= -1 - } - dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) - 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)) - } - 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 { - l = 0 - for _, e := range m.Key { - l += sovTheproto3(uint64(e)) - } - n += 1 + sovTheproto3(uint64(l)) + l - } - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + l - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + 1 + l - 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 (m *Uint128Pair) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovTheproto3(uint64(l)) - if m.Right != nil { - l = m.Right.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *ContainsNestedMap) Size() (n int) { - var l int - _ = l - return n -} - -func (m *ContainsNestedMap_NestedMap) Size() (n int) { - var l int - _ = l - if len(m.NestedMapField) > 0 { - for k, v := range m.NestedMapField { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *NotPacked) Size() (n int) { - var l int - _ = l - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Uint128Pair{`, - `Left:` + fmt.Sprintf("%v", this.Left) + `,`, - `Right:` + fmt.Sprintf("%v", this.Right) + `,`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainsNestedMap{`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap_NestedMap) String() string { - if this == nil { - return "nil" - } - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, - `NestedMapField:` + mapStringForNestedMapField + `,`, - `}`, - }, "") - return s -} -func (this *NotPacked) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NotPacked{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `}`, - }, "") - 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 init() { proto.RegisterFile("combos/neither/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1609 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, - 0x16, 0xc7, 0x35, 0xfa, 0xad, 0xa7, 0x1f, 0xa6, 0x27, 0xd9, 0x85, 0xd6, 0xc0, 0xd2, 0xb2, 0x02, - 0x24, 0x4a, 0xb0, 0x91, 0xb3, 0x4e, 0xb2, 0x9b, 0xba, 0x69, 0x53, 0x4b, 0xb1, 0x10, 0x37, 0xb6, - 0xe2, 0x4a, 0x76, 0xdc, 0x22, 0x40, 0x0d, 0xca, 0xa6, 0x25, 0x22, 0x12, 0x69, 0x88, 0xa3, 0xa0, - 0xbe, 0xe5, 0xcf, 0xe8, 0xad, 0xe8, 0xad, 0xc7, 0x22, 0x87, 0xa2, 0xc7, 0xf6, 0xe6, 0x63, 0x80, - 0x5e, 0x8a, 0x1e, 0x82, 0x58, 0xbd, 0xe4, 0x98, 0x63, 0x8e, 0xc5, 0xcc, 0x50, 0xd2, 0x88, 0x1c, - 0x8a, 0x4d, 0x2f, 0xbd, 0xf8, 0x24, 0xce, 0xf3, 0xfb, 0x7e, 0xe6, 0x71, 0x38, 0xf3, 0xf8, 0x05, - 0x0d, 0xea, 0x81, 0xd5, 0x6b, 0x59, 0xf6, 0xb2, 0xa9, 0x1b, 0xa4, 0xa3, 0xf7, 0x97, 0x49, 0x47, - 0x3f, 0xee, 0x5b, 0xc4, 0xba, 0x59, 0x66, 0x3f, 0x38, 0x35, 0x0e, 0x2c, 0x5c, 0x6f, 0x1b, 0xa4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 0x04, 0x08, 0x05, 0x4c, 0x34, 0x14, 0xd0, 0x1c, 0x57, 0x90, 0xf0, 0x05, 0x34, - 0x5d, 0x15, 0x34, 0xc5, 0x0a, 0x9a, 0xe3, 0x0a, 0x92, 0x33, 0x01, 0x62, 0x05, 0xe3, 0x31, 0xae, - 0x00, 0xd4, 0x8c, 0xaf, 0xf4, 0x43, 0x5e, 0x42, 0x8a, 0x11, 0x8a, 0x12, 0xc2, 0x24, 0x89, 0x23, - 0x04, 0x15, 0x5e, 0x87, 0x74, 0xf3, 0x68, 0x02, 0x01, 0xcf, 0x39, 0x1e, 0x97, 0x71, 0xe4, 0xa2, - 0x88, 0xba, 0x71, 0x29, 0xfc, 0x66, 0xd2, 0xb3, 0x4b, 0x11, 0xee, 0x46, 0x50, 0x4d, 0x4a, 0xe1, - 0x90, 0x4c, 0x40, 0x29, 0x02, 0x45, 0xd4, 0xd1, 0x66, 0x58, 0xb1, 0x2c, 0x9a, 0xe9, 0x74, 0xa5, - 0x45, 0x09, 0xc2, 0xc9, 0x70, 0x9a, 0xa1, 0x33, 0x62, 0x4f, 0x84, 0x6d, 0x72, 0x2a, 0xce, 0xf9, - 0x3f, 0x91, 0x51, 0xce, 0xe8, 0x89, 0x8c, 0xc6, 0xe2, 0x39, 0xab, 0x9c, 0x10, 0xdd, 0xa6, 0x9c, - 0xb9, 0xc0, 0x73, 0x36, 0x4a, 0x75, 0x9d, 0xb3, 0x51, 0x18, 0x7f, 0x06, 0x73, 0xa3, 0x18, 0x6d, - 0x4f, 0x14, 0xaa, 0x30, 0xe8, 0x95, 0x19, 0x50, 0x27, 0x93, 0x33, 0xdd, 0x7a, 0x5c, 0x87, 0xdc, - 0x28, 0xb4, 0x65, 0xb3, 0xdb, 0x9d, 0x67, 0xc4, 0xcb, 0x33, 0x88, 0x3c, 0x91, 0x03, 0x5d, 0xea, - 0x85, 0xfb, 0xf0, 0x4f, 0x79, 0x37, 0x12, 0xdb, 0x6f, 0x8a, 0xb7, 0xdf,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1a, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto deleted file mode 100644 index 0f4525cdc..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3.proto +++ /dev/null @@ -1,168 +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 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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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; -} - -message Uint128Pair { - bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message ContainsNestedMap { - message NestedMap { - map NestedMapField = 1; - } -} - -message NotPacked { - repeated uint64 key = 5 [packed=false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go deleted file mode 100644 index 508713dc3..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/neither/theproto3pb_test.go +++ /dev/null @@ -1,2143 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/theproto3.proto - -/* -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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -package theproto3 - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedUint128Pair(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Uint128Pair{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap_NestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNotPackedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNotPacked(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNotPacked(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NotPacked{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMap_NestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNotPackedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNotPackedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := rand.New(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 := rand.New(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 TestUint128PairFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMap_NestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNotPackedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNotPackedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUint128PairSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNotPackedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNotPacked(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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 := rand.New(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 := rand.New(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 TestUint128PairStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMap_NestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNotPackedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(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/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go deleted file mode 100644 index bb7eb6bb9..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/proto3_test.go +++ /dev/null @@ -1,159 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 theproto3 - -import ( - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestCustomTypeSize(t *testing.T) { - m := &Uint128Pair{} - m.Size() // Should not panic. -} - -func TestCustomTypeMarshalUnmarshal(t *testing.T) { - m1 := &Uint128Pair{} - if b, err := proto.Marshal(m1); err != nil { - t.Fatal(err) - } else { - m2 := &Uint128Pair{} - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(m1, m2) { - t.Errorf("expected %+v, got %+v", m1, m2) - } - } -} - -func TestNotPackedToPacked(t *testing.T) { - input := []uint64{1, 10e9} - notpacked := &NotPacked{Key: input} - if data, err := proto.Marshal(notpacked); err != nil { - t.Fatal(err) - } else { - packed := &Message{} - if err := proto.Unmarshal(data, packed); err != nil { - t.Fatal(err) - } - output := packed.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} - -func TestPackedToNotPacked(t *testing.T) { - input := []uint64{1, 10e9} - packed := &Message{Key: input} - if data, err := proto.Marshal(packed); err != nil { - t.Fatal(err) - } else { - notpacked := &NotPacked{} - if err := proto.Unmarshal(data, notpacked); err != nil { - t.Fatal(err) - } - output := notpacked.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go deleted file mode 100644 index b6d9d121c..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.pb.go +++ /dev/null @@ -1,9914 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/theproto3.proto - -/* - 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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -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_test_custom "github.com/gogo/protobuf/test/custom" - -import descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strconv "strconv" - -import strings "strings" -import reflect "reflect" -import sortkeys "github.com/gogo/protobuf/sortkeys" - -import io "io" -import binary "encoding/binary" - -// 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 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 (MapEnum) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -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, -} - -func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0, 0} } - -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,json=heightInCm,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,json=resultCount,proto3" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman,proto3" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score,proto3" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,packed,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=proto2Field" json:"proto2_field,omitempty"` - Proto2Value map[int64]*test.NinOptEnum `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" 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() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{0} } - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny,proto3" json:"bunny,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (*Nested) ProtoMessage() {} -func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{1} } - -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() {} -func (*AllMaps) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{2} } - -type AllMapsOrdered 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 *AllMapsOrdered) Reset() { *m = AllMapsOrdered{} } -func (*AllMapsOrdered) ProtoMessage() {} -func (*AllMapsOrdered) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{3} } - -type MessageWithMap struct { - NameMapping map[int32]string `protobuf:"bytes,1,rep,name=name_mapping,json=nameMapping" 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=msgMapping" 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=byteMapping" 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() {} -func (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{4} } - -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 (*FloatingPoint) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{5} } - -type Uint128Pair struct { - Left github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,1,opt,name=left,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"left"` - Right *github_com_gogo_protobuf_test_custom.Uint128 `protobuf:"bytes,2,opt,name=right,proto3,customtype=github.com/gogo/protobuf/test/custom.Uint128" json:"right,omitempty"` -} - -func (m *Uint128Pair) Reset() { *m = Uint128Pair{} } -func (*Uint128Pair) ProtoMessage() {} -func (*Uint128Pair) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{6} } - -type ContainsNestedMap struct { -} - -func (m *ContainsNestedMap) Reset() { *m = ContainsNestedMap{} } -func (*ContainsNestedMap) ProtoMessage() {} -func (*ContainsNestedMap) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{7} } - -type ContainsNestedMap_NestedMap struct { - NestedMapField map[string]float64 `protobuf:"bytes,1,rep,name=NestedMapField" json:"NestedMapField,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` -} - -func (m *ContainsNestedMap_NestedMap) Reset() { *m = ContainsNestedMap_NestedMap{} } -func (*ContainsNestedMap_NestedMap) ProtoMessage() {} -func (*ContainsNestedMap_NestedMap) Descriptor() ([]byte, []int) { - return fileDescriptorTheproto3, []int{7, 0} -} - -type NotPacked struct { - Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"` -} - -func (m *NotPacked) Reset() { *m = NotPacked{} } -func (*NotPacked) ProtoMessage() {} -func (*NotPacked) Descriptor() ([]byte, []int) { return fileDescriptorTheproto3, []int{8} } - -func init() { - proto.RegisterType((*Message)(nil), "theproto3.Message") - proto.RegisterType((*Nested)(nil), "theproto3.Nested") - proto.RegisterType((*AllMaps)(nil), "theproto3.AllMaps") - proto.RegisterType((*AllMapsOrdered)(nil), "theproto3.AllMapsOrdered") - proto.RegisterType((*MessageWithMap)(nil), "theproto3.MessageWithMap") - proto.RegisterType((*FloatingPoint)(nil), "theproto3.FloatingPoint") - proto.RegisterType((*Uint128Pair)(nil), "theproto3.Uint128Pair") - proto.RegisterType((*ContainsNestedMap)(nil), "theproto3.ContainsNestedMap") - proto.RegisterType((*ContainsNestedMap_NestedMap)(nil), "theproto3.ContainsNestedMap.NestedMap") - proto.RegisterType((*NotPacked)(nil), "theproto3.NotPacked") - 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 *AllMapsOrdered) 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 (this *Uint128Pair) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *ContainsNestedMap_NestedMap) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func (this *NotPacked) Description() (desc *descriptor.FileDescriptorSet) { - return Theproto3Description() -} -func Theproto3Description() (desc *descriptor.FileDescriptorSet) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 7955 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x7d, 0x5b, 0x70, 0x23, 0xd7, - 0x99, 0x1e, 0x1b, 0x0d, 0x90, 0xe0, 0x0f, 0x90, 0x6c, 0x36, 0x67, 0x28, 0x88, 0x1a, 0x91, 0x33, - 0xd0, 0x68, 0x44, 0x71, 0x2d, 0x0e, 0x87, 0xc3, 0xb9, 0x61, 0x2c, 0x69, 0x71, 0xe3, 0x88, 0x63, - 0x12, 0xa4, 0x9b, 0xa4, 0xa5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9f, 0x52, 0x20, 0xd3, 0xcf, 0x38, 0x11, - 0x95, 0x2e, 0x26, 0x55, 0xba, 0xdb, 0x41, 0x0b, 0x5e, 0xe8, 0xef, 0x84, 0x1e, 0x5f, 0x7f, 0x59, - 0x81, 0xd9, 0xf0, 0x4e, 0x31, 0x54, 0x87, 0xe7, 0x60, 0xb4, 0x85, 0xdc, 0x63, 0x9b, 0x77, 0x4b, - 0x97, 0x42, 0xd6, 0x60, 0x3c, 0x1d, 0x74, 0x36, 0x43, 0x89, 0x8b, 0xb8, 0xda, 0xaf, 0xdd, 0xa3, - 0xda, 0xf4, 0x68, 0xfa, 0xcb, 0x31, 0x38, 0x1b, 0x4a, 0x1e, 0xaa, 0xe8, 0xe3, 0x00, 0x0d, 0xab, - 0xdd, 0x75, 0x69, 0x47, 0x44, 0x0b, 0xec, 0x38, 0x19, 0x21, 0xc5, 0x0b, 0x17, 0xcf, 0xae, 0xeb, - 0xcd, 0xab, 0x64, 0x1e, 0xe8, 0x10, 0x11, 0xb8, 0xe9, 0x2b, 0x1a, 0x27, 0x8a, 0xce, 0xf7, 0xb9, - 0xd2, 0x9e, 0xc0, 0x5c, 0x01, 0xad, 0xd6, 0x6c, 0x20, 0xcb, 0xad, 0x3a, 0x6e, 0x07, 0x99, 0xad, - 0x86, 0x75, 0x44, 0x56, 0x90, 0x64, 0x2e, 0x71, 0x68, 0x36, 0x1d, 0x64, 0x4c, 0xd1, 0xe9, 0x5d, - 0x3e, 0x8b, 0x11, 0x24, 0x80, 0x3a, 0x02, 0x62, 0x54, 0x42, 0xd0, 0x69, 0x0f, 0x91, 0xfd, 0xed, - 0x24, 0xa4, 0x84, 0xbe, 0x5a, 0xbf, 0x00, 0xe9, 0x57, 0xcc, 0xd7, 0xcc, 0x2a, 0xbf, 0x57, 0xa2, - 0x96, 0x48, 0xe1, 0xb1, 0x1d, 0x76, 0xbf, 0xb4, 0x02, 0x67, 0x88, 0x88, 0xdd, 0x75, 0x51, 0xa7, - 0x5a, 0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, 0x49, 0x96, 0xdb, 0xf0, 0xe2, 0x72, 0x31, 0xf8, 0xfe, 0x92, 0x2c, 0x78, 0xd7, 0x8f, - 0xd0, 0xc5, 0xe0, 0x9b, 0x4c, 0xb2, 0xe4, 0xc7, 0xfc, 0x58, 0x5d, 0x0c, 0xbe, 0xd3, 0x24, 0x4b, - 0x6e, 0xfa, 0x51, 0xbb, 0x18, 0x7c, 0x56, 0x26, 0x4b, 0x6e, 0xf9, 0xf1, 0xbb, 0x18, 0x7c, 0x6a, - 0x26, 0x4b, 0x56, 0xfc, 0x48, 0x5e, 0x0c, 0x3e, 0x3f, 0x93, 0x25, 0xb7, 0xfd, 0x4d, 0xf4, 0xdf, - 0x0f, 0x84, 0x9f, 0xf0, 0x16, 0x54, 0x36, 0x10, 0x7e, 0x10, 0x12, 0x7a, 0x81, 0x42, 0x26, 0xc8, - 0xf8, 0x61, 0x97, 0x0d, 0x84, 0x1d, 0x84, 0x84, 0x5c, 0x36, 0x10, 0x72, 0x10, 0x12, 0x6e, 0xd9, - 0x40, 0xb8, 0x41, 0x48, 0xa8, 0x65, 0x03, 0xa1, 0x06, 0x21, 0x61, 0x96, 0x0d, 0x84, 0x19, 0x84, - 0x84, 0x58, 0x36, 0x10, 0x62, 0x10, 0x12, 0x5e, 0xd9, 0x40, 0x78, 0x41, 0x48, 0x68, 0x5d, 0x0c, - 0x86, 0x16, 0x84, 0x85, 0xd5, 0xc5, 0x60, 0x58, 0x41, 0x58, 0x48, 0x3d, 0x11, 0x0c, 0xa9, 0xf1, - 0x07, 0xef, 0x2e, 0x24, 0xf0, 0x90, 0x10, 0x4d, 0x17, 0x83, 0xd1, 0x04, 0x61, 0x91, 0x74, 0x31, - 0x18, 0x49, 0x10, 0x16, 0x45, 0x17, 0x83, 0x51, 0x04, 0x61, 0x11, 0xf4, 0x4e, 0x30, 0x82, 0xfc, - 0x77, 0x7c, 0xb2, 0x81, 0x47, 0x8a, 0x51, 0x11, 0xa4, 0x0e, 0x11, 0x41,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37, 0x6c, 0x71, 0x03, 0x7f, 0xd4, 0x9f, 0x86, - 0x51, 0xfa, 0xf7, 0x4b, 0x48, 0x77, 0x4d, 0x1e, 0x5e, 0x7b, 0x97, 0x46, 0x37, 0x69, 0x0d, 0x26, - 0xa0, 0xdf, 0x82, 0x31, 0x17, 0x75, 0x3a, 0x66, 0xc3, 0x22, 0x37, 0x4f, 0xa9, 0xd5, 0x85, 0x10, - 0x33, 0xec, 0x51, 0x09, 0xf2, 0x33, 0xb0, 0x06, 0x97, 0xd7, 0xaf, 0x41, 0x9a, 0xc8, 0xad, 0x56, - 0xe9, 0xdf, 0x78, 0x49, 0xf5, 0x8d, 0xe7, 0x14, 0x95, 0xe3, 0xcf, 0x0a, 0x38, 0x8c, 0xfe, 0x04, - 0xde, 0x04, 0x39, 0xed, 0x13, 0x21, 0xa7, 0x25, 0xa5, 0x77, 0x95, 0xb4, 0x8d, 0xf4, 0xd4, 0x8c, - 0x87, 0xfe, 0x48, 0xde, 0x16, 0xa4, 0x45, 0xbd, 0xb8, 0x19, 0x68, 0xfb, 0x43, 0xcc, 0xf0, 0x94, - 0xff, 0xfb, 0xf9, 0x7d, 0xac, 0x40, 0xe7, 0x73, 0xb1, 0x9b, 0xca, 0xdc, 0x0e, 0x68, 0xc1, 0xf3, - 0x85, 0x50, 0x5e, 0x92, 0x29, 0x35, 0xf1, 0x62, 0xc9, 0x4e, 0xb9, 0xcf, 0x98, 0x7d, 0x1e, 0x46, - 0x69, 0xfc, 0xe8, 0x29, 0x18, 0xf3, 0x7f, 0x5d, 0x31, 0x09, 0xf1, 0x9d, 0xfd, 0xca, 0x2e, 0xfd, - 0x99, 0xd4, 0xdd, 0xcd, 0xfc, 0xce, 0xee, 0xde, 0x46, 0xf1, 0x63, 0x5a, 0x4c, 0x9f, 0x82, 0x54, - 0x61, 0x63, 0x73, 0xb3, 0x5a, 0xc8, 0x6f, 0x6c, 0x96, 0xef, 0x69, 0x6a, 0x76, 0x1e, 0x46, 0xa9, - 0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, 0xf4, 0x49, 0xa0, 0x27, 0x8f, 0x3d, 0x35, 0x0e, 0x03, - 0x2c, 0x22, 0xce, 0x53, 0x85, 0x5e, 0x4c, 0x6a, 0xb0, 0x2a, 0xc2, 0xd5, 0x08, 0x28, 0x5f, 0x15, - 0x4a, 0x92, 0x8e, 0x50, 0x45, 0x60, 0x11, 0x71, 0xb8, 0x18, 0x16, 0x6c, 0x1b, 0x4b, 0xb2, 0xaa, - 0xb4, 0x10, 0x42, 0xc1, 0x24, 0x58, 0x31, 0x64, 0x47, 0xc4, 0x23, 0x24, 0xc8, 0x31, 0x78, 0xb2, - 0xbf, 0x47, 0xb8, 0x0c, 0xf7, 0x08, 0x3f, 0x16, 0xf3, 0x8c, 0xbc, 0xd1, 0x8a, 0x79, 0xa6, 0x22, - 0xf3, 0x8c, 0x8b, 0x06, 0xf2, 0x8c, 0x0f, 0xeb, 0x1f, 0x87, 0x29, 0x3e, 0x86, 0xcb, 0x13, 0x26, - 0xd5, 0xd8, 0xdf, 0x34, 0xeb, 0x4f, 0xca, 0x24, 0x29, 0x67, 0x10, 0xaf, 0x57, 0x60, 0x92, 0x0f, - 0x6d, 0x39, 0xe4, 0x72, 0xa7, 0xd9, 0x9f, 0xab, 0xe8, 0xcf, 0x48, 0x05, 0x29, 0x61, 0x00, 0x3d, - 0x57, 0x82, 0xd9, 0xf0, 0x6a, 0x24, 0x96, 0xdf, 0x71, 0x5a, 0x7e, 0xcf, 0x88, 0xe5, 0x57, 0x11, - 0xcb, 0x77, 0x11, 0xce, 0x86, 0xd6, 0x9e, 0x28, 0x92, 0x98, 0x48, 0x72, 0x1b, 0x26, 0xa4, 0x92, - 0x23, 0x82, 0x13, 0x21, 0xe0, 0x44, 0x2f, 0xd8, 0x0f, 0xad, 0x90, 0xd5, 0x43, 0x02, 0xab, 0x22, - 0xf8, 0xa3, 0x30, 0x29, 0xd7, 0x1b, 0x11, 0x3d, 0x11, 0x82, 0x9e, 0x08, 0x41, 0x87, 0x9f, 0x3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c, 0xbd, - 0x00, 0xe3, 0x15, 0xdb, 0xa5, 0xbf, 0x9c, 0xa3, 0x9f, 0x11, 0x9e, 0x2a, 0x14, 0x62, 0xda, 0x08, - 0x01, 0x2f, 0x5d, 0x80, 0x31, 0x96, 0xfd, 0xfa, 0x28, 0xc4, 0xb6, 0xf2, 0xda, 0x08, 0xf9, 0xbf, - 0xa0, 0x29, 0xe4, 0xff, 0xa2, 0x16, 0x2b, 0x6c, 0x3e, 0xc4, 0x93, 0xa6, 0x91, 0x7e, 0x4f, 0x9a, - 0x0e, 0x46, 0xa9, 0x79, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x43, 0x19, 0x7d, 0x69, 0x5e, - 0x81, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*Message) - if !ok { - that2, ok := that.(Message) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Nested) - if !ok { - that2, ok := that.(Nested) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*AllMaps) - if !ok { - that2, ok := that.(AllMaps) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 *AllMapsOrdered) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AllMapsOrdered") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AllMapsOrdered but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AllMapsOrdered 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 *AllMapsOrdered) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AllMapsOrdered) - if !ok { - that2, ok := that.(AllMapsOrdered) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*MessageWithMap) - if !ok { - that2, ok := that.(MessageWithMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*FloatingPoint) - if !ok { - that2, ok := that.(FloatingPoint) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.F != that1.F { - return false - } - return true -} -func (this *Uint128Pair) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Uint128Pair") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Uint128Pair but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Uint128Pair 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 that1.Right == nil { - if this.Right != nil { - return fmt.Errorf("this.Right != nil && that1.Right == nil") - } - } else if !this.Right.Equal(*that1.Right) { - return fmt.Errorf("Right this(%v) Not Equal that(%v)", this.Right, that1.Right) - } - return nil -} -func (this *Uint128Pair) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Uint128Pair) - if !ok { - that2, ok := that.(Uint128Pair) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Left.Equal(that1.Left) { - return false - } - if that1.Right == nil { - if this.Right != nil { - return false - } - } else if !this.Right.Equal(*that1.Right) { - return false - } - return true -} -func (this *ContainsNestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap but is not nil && this == nil") - } - return nil -} -func (this *ContainsNestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - return true -} -func (this *ContainsNestedMap_NestedMap) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ContainsNestedMap_NestedMap") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ContainsNestedMap_NestedMap but is not nil && this == nil") - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return fmt.Errorf("NestedMapField this(%v) Not Equal that(%v)", len(this.NestedMapField), len(that1.NestedMapField)) - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return fmt.Errorf("NestedMapField this[%v](%v) Not Equal that[%v](%v)", i, this.NestedMapField[i], i, that1.NestedMapField[i]) - } - } - return nil -} -func (this *ContainsNestedMap_NestedMap) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ContainsNestedMap_NestedMap) - if !ok { - that2, ok := that.(ContainsNestedMap_NestedMap) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NestedMapField) != len(that1.NestedMapField) { - return false - } - for i := range this.NestedMapField { - if this.NestedMapField[i] != that1.NestedMapField[i] { - return false - } - } - return true -} -func (this *NotPacked) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NotPacked") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NotPacked but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NotPacked but is not nil && this == nil") - } - 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]) - } - } - return nil -} -func (this *NotPacked) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NotPacked) - if !ok { - that2, ok := that.(NotPacked) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - 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 - } - } - return true -} - -type MessageFace interface { - Proto() 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() proto.Message { - return this -} - -func (this *Message) TestProto() 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() proto.Message - GetBunny() string -} - -func (this *Nested) Proto() proto.Message { - return this -} - -func (this *Nested) TestProto() 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() 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() proto.Message { - return this -} - -func (this *AllMaps) TestProto() 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 AllMapsOrderedFace interface { - Proto() 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 *AllMapsOrdered) Proto() proto.Message { - return this -} - -func (this *AllMapsOrdered) TestProto() proto.Message { - return NewAllMapsOrderedFromFace(this) -} - -func (this *AllMapsOrdered) GetStringToDoubleMap() map[string]float64 { - return this.StringToDoubleMap -} - -func (this *AllMapsOrdered) GetStringToFloatMap() map[string]float32 { - return this.StringToFloatMap -} - -func (this *AllMapsOrdered) GetInt32Map() map[int32]int32 { - return this.Int32Map -} - -func (this *AllMapsOrdered) GetInt64Map() map[int64]int64 { - return this.Int64Map -} - -func (this *AllMapsOrdered) GetUint32Map() map[uint32]uint32 { - return this.Uint32Map -} - -func (this *AllMapsOrdered) GetUint64Map() map[uint64]uint64 { - return this.Uint64Map -} - -func (this *AllMapsOrdered) GetSint32Map() map[int32]int32 { - return this.Sint32Map -} - -func (this *AllMapsOrdered) GetSint64Map() map[int64]int64 { - return this.Sint64Map -} - -func (this *AllMapsOrdered) GetFixed32Map() map[uint32]uint32 { - return this.Fixed32Map -} - -func (this *AllMapsOrdered) GetSfixed32Map() map[int32]int32 { - return this.Sfixed32Map -} - -func (this *AllMapsOrdered) GetFixed64Map() map[uint64]uint64 { - return this.Fixed64Map -} - -func (this *AllMapsOrdered) GetSfixed64Map() map[int64]int64 { - return this.Sfixed64Map -} - -func (this *AllMapsOrdered) GetBoolMap() map[bool]bool { - return this.BoolMap -} - -func (this *AllMapsOrdered) GetStringMap() map[string]string { - return this.StringMap -} - -func (this *AllMapsOrdered) GetStringToBytesMap() map[string][]byte { - return this.StringToBytesMap -} - -func (this *AllMapsOrdered) GetStringToEnumMap() map[string]MapEnum { - return this.StringToEnumMap -} - -func (this *AllMapsOrdered) GetStringToMsgMap() map[string]*FloatingPoint { - return this.StringToMsgMap -} - -func NewAllMapsOrderedFromFace(that AllMapsOrderedFace) *AllMapsOrdered { - this := &AllMapsOrdered{} - 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() proto.Message - GetNameMapping() map[int32]string - GetMsgMapping() map[int64]*FloatingPoint - GetByteMapping() map[bool][]byte -} - -func (this *MessageWithMap) Proto() proto.Message { - return this -} - -func (this *MessageWithMap) TestProto() 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() proto.Message - GetF() float64 -} - -func (this *FloatingPoint) Proto() proto.Message { - return this -} - -func (this *FloatingPoint) TestProto() 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 Uint128PairFace interface { - Proto() proto.Message - GetLeft() github_com_gogo_protobuf_test_custom.Uint128 - GetRight() *github_com_gogo_protobuf_test_custom.Uint128 -} - -func (this *Uint128Pair) Proto() proto.Message { - return this -} - -func (this *Uint128Pair) TestProto() proto.Message { - return NewUint128PairFromFace(this) -} - -func (this *Uint128Pair) GetLeft() github_com_gogo_protobuf_test_custom.Uint128 { - return this.Left -} - -func (this *Uint128Pair) GetRight() *github_com_gogo_protobuf_test_custom.Uint128 { - return this.Right -} - -func NewUint128PairFromFace(that Uint128PairFace) *Uint128Pair { - this := &Uint128Pair{} - this.Left = that.GetLeft() - this.Right = that.GetRight() - return this -} - -type ContainsNestedMapFace interface { - Proto() proto.Message -} - -func (this *ContainsNestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap) TestProto() proto.Message { - return NewContainsNestedMapFromFace(this) -} - -func NewContainsNestedMapFromFace(that ContainsNestedMapFace) *ContainsNestedMap { - this := &ContainsNestedMap{} - return this -} - -type ContainsNestedMap_NestedMapFace interface { - Proto() proto.Message - GetNestedMapField() map[string]float64 -} - -func (this *ContainsNestedMap_NestedMap) Proto() proto.Message { - return this -} - -func (this *ContainsNestedMap_NestedMap) TestProto() proto.Message { - return NewContainsNestedMap_NestedMapFromFace(this) -} - -func (this *ContainsNestedMap_NestedMap) GetNestedMapField() map[string]float64 { - return this.NestedMapField -} - -func NewContainsNestedMap_NestedMapFromFace(that ContainsNestedMap_NestedMapFace) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - this.NestedMapField = that.GetNestedMapField() - return this -} - -type NotPackedFace interface { - Proto() proto.Message - GetKey() []uint64 -} - -func (this *NotPacked) Proto() proto.Message { - return this -} - -func (this *NotPacked) TestProto() proto.Message { - return NewNotPackedFromFace(this) -} - -func (this *NotPacked) GetKey() []uint64 { - return this.Key -} - -func NewNotPackedFromFace(that NotPackedFace) *NotPacked { - this := &NotPacked{} - this.Key = that.GetKey() - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 21) - s = append(s, "&theproto3.AllMapsOrdered{") - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&theproto3.Uint128Pair{") - s = append(s, "Left: "+fmt.Sprintf("%#v", this.Left)+",\n") - s = append(s, "Right: "+fmt.Sprintf("%#v", this.Right)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&theproto3.ContainsNestedMap{") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ContainsNestedMap_NestedMap) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.ContainsNestedMap_NestedMap{") - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%#v: %#v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - if this.NestedMapField != nil { - s = append(s, "NestedMapField: "+mapStringForNestedMapField+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NotPacked) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&theproto3.NotPacked{") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\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 NewPopulatedMessage(r randyTheproto3, easy bool) *Message { - this := &Message{} - this.Name = string(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(10) - 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 = string(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 NewPopulatedAllMapsOrdered(r randyTheproto3, easy bool) *AllMapsOrdered { - this := &AllMapsOrdered{} - if r.Intn(10) != 0 { - v37 := r.Intn(10) - this.StringToDoubleMap = make(map[string]float64) - for i := 0; i < v37; i++ { - v38 := randStringTheproto3(r) - this.StringToDoubleMap[v38] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.StringToDoubleMap[v38] *= -1 - } - } - } - if r.Intn(10) != 0 { - v39 := r.Intn(10) - this.StringToFloatMap = make(map[string]float32) - for i := 0; i < v39; i++ { - v40 := randStringTheproto3(r) - this.StringToFloatMap[v40] = float32(r.Float32()) - if r.Intn(2) == 0 { - this.StringToFloatMap[v40] *= -1 - } - } - } - if r.Intn(10) != 0 { - v41 := r.Intn(10) - this.Int32Map = make(map[int32]int32) - for i := 0; i < v41; i++ { - v42 := int32(r.Int31()) - this.Int32Map[v42] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Int32Map[v42] *= -1 - } - } - } - if r.Intn(10) != 0 { - v43 := r.Intn(10) - this.Int64Map = make(map[int64]int64) - for i := 0; i < v43; i++ { - v44 := int64(r.Int63()) - this.Int64Map[v44] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Int64Map[v44] *= -1 - } - } - } - if r.Intn(10) != 0 { - v45 := r.Intn(10) - this.Uint32Map = make(map[uint32]uint32) - for i := 0; i < v45; i++ { - v46 := uint32(r.Uint32()) - this.Uint32Map[v46] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v47 := r.Intn(10) - this.Uint64Map = make(map[uint64]uint64) - for i := 0; i < v47; i++ { - v48 := uint64(uint64(r.Uint32())) - this.Uint64Map[v48] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v49 := r.Intn(10) - this.Sint32Map = make(map[int32]int32) - for i := 0; i < v49; i++ { - v50 := int32(r.Int31()) - this.Sint32Map[v50] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sint32Map[v50] *= -1 - } - } - } - if r.Intn(10) != 0 { - v51 := r.Intn(10) - this.Sint64Map = make(map[int64]int64) - for i := 0; i < v51; i++ { - v52 := int64(r.Int63()) - this.Sint64Map[v52] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sint64Map[v52] *= -1 - } - } - } - if r.Intn(10) != 0 { - v53 := r.Intn(10) - this.Fixed32Map = make(map[uint32]uint32) - for i := 0; i < v53; i++ { - v54 := uint32(r.Uint32()) - this.Fixed32Map[v54] = uint32(r.Uint32()) - } - } - if r.Intn(10) != 0 { - v55 := r.Intn(10) - this.Sfixed32Map = make(map[int32]int32) - for i := 0; i < v55; i++ { - v56 := int32(r.Int31()) - this.Sfixed32Map[v56] = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Sfixed32Map[v56] *= -1 - } - } - } - if r.Intn(10) != 0 { - v57 := r.Intn(10) - this.Fixed64Map = make(map[uint64]uint64) - for i := 0; i < v57; i++ { - v58 := uint64(uint64(r.Uint32())) - this.Fixed64Map[v58] = uint64(uint64(r.Uint32())) - } - } - if r.Intn(10) != 0 { - v59 := r.Intn(10) - this.Sfixed64Map = make(map[int64]int64) - for i := 0; i < v59; i++ { - v60 := int64(r.Int63()) - this.Sfixed64Map[v60] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Sfixed64Map[v60] *= -1 - } - } - } - if r.Intn(10) != 0 { - v61 := r.Intn(10) - this.BoolMap = make(map[bool]bool) - for i := 0; i < v61; i++ { - v62 := bool(bool(r.Intn(2) == 0)) - this.BoolMap[v62] = bool(bool(r.Intn(2) == 0)) - } - } - if r.Intn(10) != 0 { - v63 := r.Intn(10) - this.StringMap = make(map[string]string) - for i := 0; i < v63; i++ { - this.StringMap[randStringTheproto3(r)] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v64 := r.Intn(10) - this.StringToBytesMap = make(map[string][]byte) - for i := 0; i < v64; i++ { - v65 := r.Intn(100) - v66 := randStringTheproto3(r) - this.StringToBytesMap[v66] = make([]byte, v65) - for i := 0; i < v65; i++ { - this.StringToBytesMap[v66][i] = byte(r.Intn(256)) - } - } - } - if r.Intn(10) != 0 { - v67 := r.Intn(10) - this.StringToEnumMap = make(map[string]MapEnum) - for i := 0; i < v67; i++ { - this.StringToEnumMap[randStringTheproto3(r)] = MapEnum([]int32{0, 1, 2}[r.Intn(3)]) - } - } - if r.Intn(10) != 0 { - v68 := r.Intn(10) - this.StringToMsgMap = make(map[string]*FloatingPoint) - for i := 0; i < v68; 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 { - v69 := r.Intn(10) - this.NameMapping = make(map[int32]string) - for i := 0; i < v69; i++ { - this.NameMapping[int32(r.Int31())] = randStringTheproto3(r) - } - } - if r.Intn(10) != 0 { - v70 := r.Intn(10) - this.MsgMapping = make(map[int64]*FloatingPoint) - for i := 0; i < v70; i++ { - this.MsgMapping[int64(r.Int63())] = NewPopulatedFloatingPoint(r, easy) - } - } - if r.Intn(10) != 0 { - v71 := r.Intn(10) - this.ByteMapping = make(map[bool][]byte) - for i := 0; i < v71; i++ { - v72 := r.Intn(100) - v73 := bool(bool(r.Intn(2) == 0)) - this.ByteMapping[v73] = make([]byte, v72) - for i := 0; i < v72; i++ { - this.ByteMapping[v73][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 -} - -func NewPopulatedUint128Pair(r randyTheproto3, easy bool) *Uint128Pair { - this := &Uint128Pair{} - v74 := github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - this.Left = *v74 - this.Right = github_com_gogo_protobuf_test_custom.NewPopulatedUint128(r) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap(r randyTheproto3, easy bool) *ContainsNestedMap { - this := &ContainsNestedMap{} - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedContainsNestedMap_NestedMap(r randyTheproto3, easy bool) *ContainsNestedMap_NestedMap { - this := &ContainsNestedMap_NestedMap{} - if r.Intn(10) != 0 { - v75 := r.Intn(10) - this.NestedMapField = make(map[string]float64) - for i := 0; i < v75; i++ { - v76 := randStringTheproto3(r) - this.NestedMapField[v76] = float64(r.Float64()) - if r.Intn(2) == 0 { - this.NestedMapField[v76] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNotPacked(r randyTheproto3, easy bool) *NotPacked { - this := &NotPacked{} - v77 := r.Intn(10) - this.Key = make([]uint64, v77) - for i := 0; i < v77; i++ { - this.Key[i] = uint64(uint64(r.Uint32())) - } - 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 { - v78 := r.Intn(100) - tmps := make([]rune, v78) - for i := 0; i < v78; 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)) - v79 := r.Int63() - if r.Intn(2) == 0 { - v79 *= -1 - } - dAtA = encodeVarintPopulateTheproto3(dAtA, uint64(v79)) - 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)) - } - 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 { - l = 0 - for _, e := range m.Key { - l += sovTheproto3(uint64(e)) - } - n += 1 + sovTheproto3(uint64(l)) + l - } - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sovTheproto3(uint64(k)) + 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - n += mapEntrySize + 2 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *AllMapsOrdered) 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 - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + l - 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 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() - l += 1 + sovTheproto3(uint64(l)) - } - mapEntrySize := 1 + sozTheproto3(uint64(k)) + l - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - if len(m.ByteMapping) > 0 { - for k, v := range m.ByteMapping { - _ = k - _ = v - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovTheproto3(uint64(len(v))) - } - mapEntrySize := 1 + 1 + l - 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 (m *Uint128Pair) Size() (n int) { - var l int - _ = l - l = m.Left.Size() - n += 1 + l + sovTheproto3(uint64(l)) - if m.Right != nil { - l = m.Right.Size() - n += 1 + l + sovTheproto3(uint64(l)) - } - return n -} - -func (m *ContainsNestedMap) Size() (n int) { - var l int - _ = l - return n -} - -func (m *ContainsNestedMap_NestedMap) Size() (n int) { - var l int - _ = l - if len(m.NestedMapField) > 0 { - for k, v := range m.NestedMapField { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTheproto3(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovTheproto3(uint64(mapEntrySize)) - } - } - return n -} - -func (m *NotPacked) Size() (n int) { - var l int - _ = l - if len(m.Key) > 0 { - for _, e := range m.Key { - n += 1 + sovTheproto3(uint64(e)) - } - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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 *AllMapsOrdered) String() string { - if this == nil { - return "nil" - } - keysForStringToDoubleMap := make([]string, 0, len(this.StringToDoubleMap)) - for k := range this.StringToDoubleMap { - keysForStringToDoubleMap = append(keysForStringToDoubleMap, k) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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) - } - 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{`&AllMapsOrdered{`, - `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) - } - 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) - } - 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) - } - 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 (this *Uint128Pair) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Uint128Pair{`, - `Left:` + fmt.Sprintf("%v", this.Left) + `,`, - `Right:` + fmt.Sprintf("%v", this.Right) + `,`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ContainsNestedMap{`, - `}`, - }, "") - return s -} -func (this *ContainsNestedMap_NestedMap) String() string { - if this == nil { - return "nil" - } - keysForNestedMapField := make([]string, 0, len(this.NestedMapField)) - for k := range this.NestedMapField { - keysForNestedMapField = append(keysForNestedMapField, k) - } - sortkeys.Strings(keysForNestedMapField) - mapStringForNestedMapField := "map[string]float64{" - for _, k := range keysForNestedMapField { - mapStringForNestedMapField += fmt.Sprintf("%v: %v,", k, this.NestedMapField[k]) - } - mapStringForNestedMapField += "}" - s := strings.Join([]string{`&ContainsNestedMap_NestedMap{`, - `NestedMapField:` + mapStringForNestedMapField + `,`, - `}`, - }, "") - return s -} -func (this *NotPacked) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NotPacked{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `}`, - }, "") - 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(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - 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 - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Score = float32(math.Float32frombits(v)) - case 5: - if wireType == 0 { - 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) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTheproto3 - } - 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - 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 - } - if m.Terrain == nil { - m.Terrain = make(map[int64]*Nested) - } - var mapkey int64 - var mapvalue *Nested - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Proto2Value == nil { - m.Proto2Value = make(map[int64]*test.NinOptEnum) - } - var mapkey int64 - var mapvalue *test.NinOptEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 *AllMapsOrdered) Unmarshal(dAtA []byte) 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: AllMapsOrdered: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllMapsOrdered: 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 - } - if m.StringToDoubleMap == nil { - m.StringToDoubleMap = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToFloatMap == nil { - m.StringToFloatMap = make(map[string]float32) - } - var mapkey string - var mapvalue float32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - mapvalue = math.Float32frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int32Map == nil { - m.Int32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Int64Map == nil { - m.Int64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint32Map == nil { - m.Uint32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Uint64Map == nil { - m.Uint64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint32Map == nil { - m.Sint32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sint64Map == nil { - m.Sint64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed32Map == nil { - m.Fixed32Map = make(map[uint32]uint32) - } - var mapkey uint32 - var mapvalue uint32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed32Map == nil { - m.Sfixed32Map = make(map[int32]int32) - } - var mapkey int32 - var mapvalue int32 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapkey = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else if fieldNum == 2 { - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Fixed64Map == nil { - m.Fixed64Map = make(map[uint64]uint64) - } - var mapkey uint64 - var mapvalue uint64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.Sfixed64Map == nil { - m.Sfixed64Map = make(map[int64]int64) - } - var mapkey int64 - var mapvalue int64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapkey = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else if fieldNum == 2 { - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvalue = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.BoolMap == nil { - m.BoolMap = make(map[bool]bool) - } - var mapkey bool - var mapvalue bool - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringMap == nil { - m.StringMap = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToBytesMap == nil { - m.StringToBytesMap = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToEnumMap == nil { - m.StringToEnumMap = make(map[string]MapEnum) - } - var mapkey string - var mapvalue MapEnum - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } - } - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.StringToMsgMap == nil { - m.StringToMsgMap = make(map[string]*FloatingPoint) - } - var mapkey string - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.NameMapping == nil { - m.NameMapping = make(map[int32]string) - } - var mapkey int32 - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } - } - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.MsgMapping == nil { - m.MsgMapping = make(map[int64]*FloatingPoint) - } - var mapkey int64 - var mapvalue *FloatingPoint - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - if m.ByteMapping == nil { - m.ByteMapping = make(map[bool][]byte) - } - var mapkey bool - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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) - } else if fieldNum == 2 { - 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 - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 (m *Uint128Pair) Unmarshal(dAtA []byte) 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: Uint128Pair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Uint128Pair: 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 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 - } - 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 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 - } - var v github_com_gogo_protobuf_test_custom.Uint128 - m.Right = &v - if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - 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 *ContainsNestedMap) Unmarshal(dAtA []byte) 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: ContainsNestedMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ContainsNestedMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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 *ContainsNestedMap_NestedMap) Unmarshal(dAtA []byte) 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: NestedMap: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NestedMap: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NestedMapField", 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.NestedMapField == nil { - m.NestedMapField = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - 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 - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipTheproto3(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTheproto3 - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NestedMapField[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 *NotPacked) Unmarshal(dAtA []byte) 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: NotPacked: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotPacked: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 5: - if wireType == 0 { - 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) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTheproto3 - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTheproto3 - } - 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 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) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - 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") -) - -func init() { proto.RegisterFile("combos/unmarshaler/theproto3.proto", fileDescriptorTheproto3) } - -var fileDescriptorTheproto3 = []byte{ - // 1612 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x99, 0xcf, 0x6f, 0xdb, 0x46, - 0x16, 0xc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10, 0xf0, 0x9c, 0xe3, 0x51, 0x19, - 0x47, 0x53, 0x14, 0x51, 0x37, 0x2a, 0x85, 0xdf, 0x4c, 0x7a, 0x76, 0x29, 0xc2, 0xdd, 0x08, 0xaa, - 0x71, 0x29, 0x1c, 0x92, 0x09, 0x28, 0x45, 0xa0, 0x88, 0x3a, 0xda, 0x0c, 0x2b, 0x96, 0x45, 0x33, - 0xdd, 0xae, 0xb4, 0x28, 0x41, 0xb8, 0x19, 0x6e, 0x33, 0x74, 0x47, 0xec, 0x89, 0xb0, 0x4d, 0x4e, - 0xc5, 0x39, 0xff, 0x27, 0x32, 0xcc, 0x19, 0x3e, 0x91, 0xe1, 0x58, 0x3c, 0x67, 0x95, 0x13, 0xa2, - 0x3b, 0x94, 0x33, 0x17, 0x78, 0xce, 0x86, 0xa9, 0x53, 0xe7, 0x6c, 0x18, 0xc6, 0x9f, 0xc1, 0xdc, - 0x30, 0x46, 0xdb, 0x13, 0x85, 0x2a, 0x0c, 0x7a, 0x65, 0x06, 0xd4, 0xcd, 0xe4, 0xcc, 0x69, 0x3d, - 0xae, 0x43, 0x6e, 0x18, 0xda, 0x72, 0xd8, 0xed, 0xce, 0x33, 0xe2, 0xe5, 0x19, 0x44, 0x9e, 0xc8, - 0x81, 0x53, 0xea, 0x85, 0xfb, 0xf0, 0x4f, 0x79, 0x37, 0x12, 0xdb, 0x6f, 0x8a, 0xb7, 0xdf, 0x8b, - 0x62, 0xfb, 0x45, 0x62, 0xfb, 0xae, 0xc2, 0x3f, 0xa4, 0xbd, 0x27, 0x08, 0x12, 0x16, 0x21, 0x1f, - 0x42, 0x76, 0xa2, 0xe5, 0x88, 0xe2, 0x98, 0x44, 0x1c, 0xf3, 0x8a, 0xc7, 0x5b, 0x4b, 0xf2, 0xf6, - 0x98, 0x10, 0x47, 0x44, 0xf1, 0x5d, 0xc8, 0x4d, 0xf6, 0x1b, 0x51, 0x9d, 0x95, 0xa8, 0xb3, 0x12, - 0xb5, 0x7c, 0xee, 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x7d, - 0x27, 0x4f, 0x06, 0x17, 0xd6, 0xe0, 0x82, 0x24, 0xed, 0x7d, 0x5e, 0xc8, 0xc5, 0x25, 0x48, 0xd5, - 0x2d, 0xb2, 0xad, 0x1d, 0x3c, 0x65, 0x9f, 0x9c, 0xc7, 0xff, 0x55, 0xa8, 0x84, 0x95, 0x10, 0x13, - 0x5f, 0x5b, 0x82, 0x84, 0x7b, 0xfa, 0x71, 0x1c, 0xc2, 0x5b, 0x6b, 0x4a, 0x88, 0xfd, 0x56, 0x14, - 0xc4, 0x7e, 0xab, 0x4a, 0xb8, 0xb2, 0x79, 0x7a, 0xa6, 0x86, 0x5e, 0x9e, 0xa9, 0xa1, 0x5f, 0xcf, - 0xd4, 0xd0, 0xeb, 0x33, 0x15, 0xbd, 0x39, 0x53, 0xd1, 0xdb, 0x33, 0x15, 0xbd, 0x3b, 0x53, 0xd1, - 0xf3, 0x81, 0x8a, 0xbe, 0x1b, 0xa8, 0xe8, 0xfb, 0x81, 0x8a, 0x7e, 0x1c, 0xa8, 0xe8, 0xa7, 0x81, - 0x8a, 0x4e, 0x07, 0x6a, 0xe8, 0xe5, 0x40, 0x45, 0xaf, 0x07, 0x2a, 0x7a, 0x33, 0x50, 0x43, 0x6f, - 0x07, 0x2a, 0x7a, 0x37, 0x50, 0x43, 0xcf, 0x7f, 0x57, 0x43, 0xad, 0x38, 0x5f, 0x9e, 0x3f, 0x02, - 0x00, 0x00, 0xff, 0xff, 0xda, 0xba, 0x48, 0xa4, 0x67, 0x1a, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto deleted file mode 100644 index 0c130b73f..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3.proto +++ /dev/null @@ -1,168 +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 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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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; -} - -message Uint128Pair { - bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message ContainsNestedMap { - message NestedMap { - map NestedMapField = 1; - } -} - -message NotPacked { - repeated uint64 key = 5 [packed=false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go b/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go deleted file mode 100644 index e963ff2ae..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/combos/unmarshaler/theproto3pb_test.go +++ /dev/null @@ -1,2143 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/theproto3.proto - -/* -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 - AllMapsOrdered - MessageWithMap - FloatingPoint - Uint128Pair - ContainsNestedMap - NotPacked -*/ -package theproto3 - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestAllMapsOrderedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAllMapsOrderedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkAllMapsOrderedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedAllMapsOrdered(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &AllMapsOrdered{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMessageWithMapProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkFloatingPointProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestUint128PairProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUint128PairProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkUint128PairProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedUint128Pair(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Uint128Pair{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkContainsNestedMap_NestedMapProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkContainsNestedMap_NestedMapProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedContainsNestedMap_NestedMap(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ContainsNestedMap_NestedMap{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNotPackedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNotPacked(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNotPackedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNotPacked(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NotPacked{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Message{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nested{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMaps{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAllMapsOrderedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AllMapsOrdered{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MessageWithMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &FloatingPoint{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUint128PairJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Uint128Pair{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestContainsNestedMap_NestedMapJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ContainsNestedMap_NestedMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNotPackedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NotPacked{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Message{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nested{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMaps{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAllMapsOrderedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AllMapsOrdered{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MessageWithMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - dAtA := proto.CompactTextString(p) - msg := &FloatingPoint{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUint128PairProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Uint128Pair{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestContainsNestedMap_NestedMapProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ContainsNestedMap_NestedMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNotPackedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NotPacked{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Message{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNested(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nested{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMaps(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMaps{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAllMapsOrderedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AllMapsOrdered{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMessageWithMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MessageWithMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedFloatingPoint(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &FloatingPoint{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUint128PairVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Uint128Pair{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestContainsNestedMap_NestedMapVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ContainsNestedMap_NestedMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNotPackedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NotPacked{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageWithMapFace(t *testing.T) { - popr := rand.New(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 := rand.New(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 TestUint128PairFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestContainsNestedMap_NestedMapFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNotPackedFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAllMapsOrderedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageWithMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestFloatingPointGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUint128PairGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestContainsNestedMap_NestedMapGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNotPackedGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNested(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMaps(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestAllMapsOrderedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedAllMapsOrdered(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkAllMapsOrderedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*AllMapsOrdered, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedAllMapsOrdered(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMessageWithMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedFloatingPoint(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestUint128PairSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedUint128Pair(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkUint128PairSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Uint128Pair, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedUint128Pair(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestContainsNestedMap_NestedMapSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedContainsNestedMap_NestedMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkContainsNestedMap_NestedMapSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ContainsNestedMap_NestedMap, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedContainsNestedMap_NestedMap(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNotPackedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNotPacked(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNotPackedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NotPacked, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNotPacked(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 := rand.New(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 := rand.New(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 := rand.New(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 TestAllMapsOrderedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAllMapsOrdered(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 := rand.New(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 := rand.New(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 TestUint128PairStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUint128Pair(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestContainsNestedMap_NestedMapStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedContainsNestedMap_NestedMap(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNotPackedStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNotPacked(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/github.com/gogo/protobuf/test/theproto3/doc.go b/vendor/github.com/gogo/protobuf/test/theproto3/doc.go deleted file mode 100644 index e559a27ba..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/doc.go +++ /dev/null @@ -1 +0,0 @@ -package theproto3 diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto b/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto deleted file mode 100644 index abf45e72e..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/footer.proto +++ /dev/null @@ -1,25 +0,0 @@ - -message MessageWithMap { - map name_mapping = 1; - map msg_mapping = 2; - map byte_mapping = 3; -} - -message FloatingPoint { - double f = 1; -} - -message Uint128Pair { - bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message ContainsNestedMap { - message NestedMap { - map NestedMapField = 1; - } -} - -message NotPacked { - repeated uint64 key = 5 [packed=false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/header.proto b/vendor/github.com/gogo/protobuf/test/theproto3/header.proto deleted file mode 100644 index 314e48f29..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/header.proto +++ /dev/null @@ -1,95 +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 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/github.com/gogo/protobuf/test/theproto3/maps.proto b/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto deleted file mode 100644 index 18aff7ae7..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/maps.proto +++ /dev/null @@ -1,48 +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; -} - -message AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in b/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in deleted file mode 100644 index bb7eb6bb9..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/proto3_test.go.in +++ /dev/null @@ -1,159 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 theproto3 - -import ( - "reflect" - "testing" - - "github.com/gogo/protobuf/proto" -) - -func TestNilMaps(t *testing.T) { - m := &AllMaps{StringToMsgMap: map[string]*FloatingPoint{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToMsgMap["a"]; !ok { - t.Error("element not in map") - } else if v != nil { - t.Errorf("element should be nil, but its %v", v) - } -} - -func TestNilMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"a": nil}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["a"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestEmptyMapsBytes(t *testing.T) { - m := &AllMaps{StringToBytesMap: map[string][]byte{"b": {}}} - data, err := proto.Marshal(m) - if err != nil { - t.Fatal(err) - } - size := m.Size() - protoSize := proto.Size(m) - marshaledSize := len(data) - if size != protoSize || marshaledSize != protoSize { - t.Errorf("size %d != protoSize %d != marshaledSize %d", size, protoSize, marshaledSize) - } - m2 := &AllMaps{} - if err := proto.Unmarshal(data, m2); err != nil { - t.Fatal(err) - } - if v, ok := m2.StringToBytesMap["b"]; !ok { - t.Error("element not in map") - } else if len(v) != 0 { - t.Errorf("element should be empty, but its %v", v) - } -} - -func TestCustomTypeSize(t *testing.T) { - m := &Uint128Pair{} - m.Size() // Should not panic. -} - -func TestCustomTypeMarshalUnmarshal(t *testing.T) { - m1 := &Uint128Pair{} - if b, err := proto.Marshal(m1); err != nil { - t.Fatal(err) - } else { - m2 := &Uint128Pair{} - if err := proto.Unmarshal(b, m2); err != nil { - t.Fatal(err) - } - if !reflect.DeepEqual(m1, m2) { - t.Errorf("expected %+v, got %+v", m1, m2) - } - } -} - -func TestNotPackedToPacked(t *testing.T) { - input := []uint64{1, 10e9} - notpacked := &NotPacked{Key: input} - if data, err := proto.Marshal(notpacked); err != nil { - t.Fatal(err) - } else { - packed := &Message{} - if err := proto.Unmarshal(data, packed); err != nil { - t.Fatal(err) - } - output := packed.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} - -func TestPackedToNotPacked(t *testing.T) { - input := []uint64{1, 10e9} - packed := &Message{Key: input} - if data, err := proto.Marshal(packed); err != nil { - t.Fatal(err) - } else { - notpacked := &NotPacked{} - if err := proto.Unmarshal(data, notpacked); err != nil { - t.Fatal(err) - } - output := notpacked.Key - if !reflect.DeepEqual(input, output) { - t.Fatalf("expected %#v, got %#v", input, output) - } - } -} diff --git a/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto b/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto deleted file mode 100644 index 0f4525cdc..000000000 --- a/vendor/github.com/gogo/protobuf/test/theproto3/theproto3.proto +++ /dev/null @@ -1,168 +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 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 AllMapsOrdered { - option (gogoproto.stable_marshaler) = true; - - 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; -} - -message Uint128Pair { - bytes left = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; - bytes right = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128"]; -} - -message ContainsNestedMap { - message NestedMap { - map NestedMapField = 1; - } -} - -message NotPacked { - repeated uint64 key = 5 [packed=false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/thetestpb_test.go b/vendor/github.com/gogo/protobuf/test/thetestpb_test.go deleted file mode 100644 index 6bd5195c6..000000000 --- a/vendor/github.com/gogo/protobuf/test/thetestpb_test.go +++ /dev/null @@ -1,16045 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: thetest.proto - -/* -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 - Node - NonByteCustomType - NidOptNonByteCustomType - NinOptNonByteCustomType - NidRepNonByteCustomType - NinRepNonByteCustomType - ProtoType -*/ -package test - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepPackedNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepPackedNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidEmbeddedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidNestedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomDashProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepCustomProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinNestedStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTreeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOrBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkLeafProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepTreeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkADeepBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAndDeepBranchProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkDeepLeafProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNilProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkAnotherNinOptEnumDefaultProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkTimerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMyExtendableProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOtherExtenableProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinitionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessageProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedDefinition_NestedMessage_NestedNestedMsgProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNestedScopeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNativeDefaultProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomContainerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNidOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinOptNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinRepNativeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinStructProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameNinEmbeddedStructUnionProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkCustomNameEnumProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNoExtensionsMapProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInnerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithInner_InnerProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkUnrecognizedWithEmbed_EmbeddedProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNodeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNodeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNode(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Node{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinOptNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinOptNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinOptNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinOptNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNidRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNidRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNidRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NidRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkNinRepNonByteCustomTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkNinRepNonByteCustomTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedNinRepNonByteCustomType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &NinRepNonByteCustomType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkProtoTypeProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypeProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoType(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoType{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepPackedNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomDash{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepCustom{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinNestedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Tree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OrBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Leaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepTree{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ADeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AndDeepBranch{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DeepLeaf{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Nil{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AnotherNinOptEnumDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Timer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MyExtendable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OtherExtenable{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NestedScope{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNativeDefault{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomContainer{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNidOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinOptNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinRepNative{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinStruct{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &CustomNameEnum{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NoExtensionsMap{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Unrecognized{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithInner_Inner{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Node{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinOptNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinOptNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNidRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NidRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNinRepNonByteCustomTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NinRepNonByteCustomType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoType{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepPackedNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomDash{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepCustom{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinNestedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Tree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OrBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Leaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepTree{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ADeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AndDeepBranch{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DeepLeaf{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Nil{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &AnotherNinOptEnumDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Timer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MyExtendable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OtherExtenable{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NestedScope{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNativeDefault{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomContainer{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNidOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinOptNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinRepNative{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinStruct{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - dAtA := proto.CompactTextString(p) - msg := &CustomNameEnum{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NoExtensionsMap{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Unrecognized{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithInner_Inner{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNodeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Node{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinOptNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinOptNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NidRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNinRepNonByteCustomTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NinRepNonByteCustomType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoType{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepPackedNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepPackedNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomDashCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomDash(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepCustomCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepCustom(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinNestedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinNestedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOrBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOrBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepTreeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepTree(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestADeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedADeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAndDeepBranchCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAndDeepBranch(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestDeepLeafCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedDeepLeaf(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNilCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNil(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestAnotherNinOptEnumDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedAnotherNinOptEnumDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestTimerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedTimer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestMyExtendableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedMyExtendable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestOtherExtenableCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedOtherExtenable(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinitionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessageCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNestedScopeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNestedScope(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNativeDefaultCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNativeDefault(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomContainerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomContainer(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNidOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNidOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinOptNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinOptNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinRepNativeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinRepNative(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinStructCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinStruct(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameNinEmbeddedStructUnionCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestCustomNameEnumCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedCustomNameEnum(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNoExtensionsMapCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNoExtensionsMap(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognized(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithInner_InnerCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestUnrecognizedWithEmbed_EmbeddedCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNodeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNode(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinOptNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinOptNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNidRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNidRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestNinRepNonByteCustomTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedNinRepNonByteCustomType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypeCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoType(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestThetestDescription(t *testing.T) { - ThetestDescription() -} -func TestNidOptNativeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepPackedNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepPackedNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomDash(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomDash{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepCustom(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepCustom{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinNestedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinNestedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Tree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOrBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OrBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Leaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepTree(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepTree{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedADeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ADeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAndDeepBranch(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AndDeepBranch{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDeepLeaf(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DeepLeaf{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNil(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Nil{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAnotherNinOptEnumDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AnotherNinOptEnumDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedTimer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Timer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMyExtendable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MyExtendable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOtherExtenable(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OtherExtenable{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedDefinition_NestedMessage_NestedNestedMsg{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNestedScope(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NestedScope{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNativeDefault(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNativeDefault{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomContainer(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomContainer{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNidOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNidOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinOptNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinOptNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinRepNative(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinRepNative{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinStruct(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinStruct{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameCustomType{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameNinEmbeddedStructUnion{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedCustomNameEnum(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &CustomNameEnum{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNoExtensionsMap(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NoExtensionsMap{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognized(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Unrecognized{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithInner_Inner{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnrecognizedWithEmbed_Embedded{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNodeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Node{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinOptNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinOptNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNidRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NidRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNinRepNonByteCustomTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NinRepNonByteCustomType{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypeVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoType{} - if err := proto.Unmarshal(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinOptNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNinRepNonByteCustomTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestProtoTypeFace(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, true) - msg := p.TestProto() - if !p.Equal(msg) { - t.Fatalf("%#v !Face Equal %#v", msg, p) - } -} -func TestNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepPackedNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomDashGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepCustomGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinNestedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOrBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepTreeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestADeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAndDeepBranchGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDeepLeafGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNilGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAnotherNinOptEnumDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestTimerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestMyExtendableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOtherExtenableGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinitionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessageGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedDefinition_NestedMessage_NestedNestedMsgGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNestedScopeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNativeDefaultGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomContainerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNidOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinOptNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinRepNativeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinStructGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameCustomTypeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameNinEmbeddedStructUnionGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCustomNameEnumGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNoExtensionsMapGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithInner_InnerGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnrecognizedWithEmbed_EmbeddedGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNodeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinOptNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNinRepNonByteCustomTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestProtoTypeGoString(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNidOptNativeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepPackedNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomDash(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepCustom(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinNestedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOrBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepTree(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedADeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAndDeepBranch(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedDeepLeaf(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNil(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedAnotherNinOptEnumDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedTimer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedMyExtendable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOtherExtenable(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedDefinition_NestedMessage_NestedNestedMsg(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNestedScope(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNativeDefault(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomContainer(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNidOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinOptNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinRepNative(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinStruct(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameNinEmbeddedStructUnion(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedCustomNameEnum(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNoExtensionsMap(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognized(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithInner_Inner(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnrecognizedWithEmbed_Embedded(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 TestNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNode(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNodeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Node, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNode(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinOptNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinOptNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinOptNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinOptNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinOptNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNidRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNidRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNidRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NidRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNidRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestNinRepNonByteCustomTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNinRepNonByteCustomType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkNinRepNonByteCustomTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*NinRepNonByteCustomType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedNinRepNonByteCustomType(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoType(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypeSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoType, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 TestNodeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNode(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinOptNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinOptNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNidRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNidRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNinRepNonByteCustomTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNinRepNonByteCustomType(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestProtoTypeStringer(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoType(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/typedecl/Makefile b/vendor/github.com/gogo/protobuf/test/typedecl/Makefile deleted file mode 100644 index 5b924dfe7..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedecl.proto diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/models.go b/vendor/github.com/gogo/protobuf/test/typedecl/models.go deleted file mode 100644 index 765b46193..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl/models.go +++ /dev/null @@ -1,41 +0,0 @@ -package typedecl - -import ( - "encoding/json" - - "github.com/gogo/protobuf/jsonpb" -) - -type Dropped struct { - Name string - Age int32 -} - -func (d *Dropped) Drop() bool { - return true -} - -func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { - return json.Unmarshal(b, d) -} - -func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { - return json.Marshal(d) -} - -type DroppedWithoutGetters struct { - Width int64 - Height int64 -} - -func (d *DroppedWithoutGetters) GetHeight() int64 { - return d.Height -} - -func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { - return json.Unmarshal(b, d) -} - -func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { - return json.Marshal(d) -} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go b/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go deleted file mode 100644 index 803d9fb90..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.pb.go +++ /dev/null @@ -1,934 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: typedecl.proto - -/* - Package typedecl is a generated protocol buffer package. - - It is generated from these files: - typedecl.proto - - It has these top-level messages: - Dropped - DroppedWithoutGetters - Kept -*/ -package typedecl - -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 - -// 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 - -func (m *Dropped) Reset() { *m = Dropped{} } -func (m *Dropped) String() string { return proto.CompactTextString(m) } -func (*Dropped) ProtoMessage() {} -func (*Dropped) Descriptor() ([]byte, []int) { return fileDescriptorTypedecl, []int{0} } - -func (m *Dropped) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Dropped) GetAge() int32 { - if m != nil { - return m.Age - } - return 0 -} - -func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } -func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } -func (*DroppedWithoutGetters) ProtoMessage() {} -func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { return fileDescriptorTypedecl, []int{1} } - -type Kept struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` -} - -func (m *Kept) Reset() { *m = Kept{} } -func (m *Kept) String() string { return proto.CompactTextString(m) } -func (*Kept) ProtoMessage() {} -func (*Kept) Descriptor() ([]byte, []int) { return fileDescriptorTypedecl, []int{2} } - -func (m *Kept) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Kept) GetAge() int32 { - if m != nil { - return m.Age - } - return 0 -} - -func init() { - proto.RegisterType((*Dropped)(nil), "typedecl.Dropped") - proto.RegisterType((*DroppedWithoutGetters)(nil), "typedecl.DroppedWithoutGetters") - proto.RegisterType((*Kept)(nil), "typedecl.Kept") -} -func (this *Dropped) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Dropped) - if !ok { - that2, ok := that.(Dropped) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Dropped") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Dropped but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Dropped 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.Age != that1.Age { - return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) - } - return nil -} -func (this *Dropped) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Dropped) - if !ok { - that2, ok := that.(Dropped) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Age != that1.Age { - return false - } - return true -} -func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DroppedWithoutGetters) - if !ok { - that2, ok := that.(DroppedWithoutGetters) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DroppedWithoutGetters") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") - } - if this.Height != that1.Height { - return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) - } - if this.Width != that1.Width { - return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) - } - return nil -} -func (this *DroppedWithoutGetters) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DroppedWithoutGetters) - if !ok { - that2, ok := that.(DroppedWithoutGetters) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Height != that1.Height { - return false - } - if this.Width != that1.Width { - return false - } - return true -} -func (this *Kept) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Kept) - if !ok { - that2, ok := that.(Kept) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Kept") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Kept but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Kept 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.Age != that1.Age { - return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) - } - return nil -} -func (this *Kept) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Kept) - if !ok { - that2, ok := that.(Kept) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Age != that1.Age { - return false - } - return true -} -func (m *Dropped) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Dropped) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTypedecl(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Age != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypedecl(dAtA, i, uint64(m.Age)) - } - return i, nil -} - -func (m *DroppedWithoutGetters) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTypedecl(dAtA, i, uint64(m.Height)) - } - if m.Width != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypedecl(dAtA, i, uint64(m.Width)) - } - return i, nil -} - -func (m *Kept) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Kept) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTypedecl(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Age != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypedecl(dAtA, i, uint64(m.Age)) - } - return i, nil -} - -func encodeVarintTypedecl(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 NewPopulatedDropped(r randyTypedecl, easy bool) *Dropped { - this := &Dropped{} - this.Name = string(randStringTypedecl(r)) - this.Age = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Age *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDroppedWithoutGetters(r randyTypedecl, easy bool) *DroppedWithoutGetters { - this := &DroppedWithoutGetters{} - this.Height = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Height *= -1 - } - this.Width = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Width *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedKept(r randyTypedecl, easy bool) *Kept { - this := &Kept{} - this.Name = string(randStringTypedecl(r)) - this.Age = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Age *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTypedecl interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypedecl(r randyTypedecl) 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 randStringTypedecl(r randyTypedecl) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneTypedecl(r) - } - return string(tmps) -} -func randUnrecognizedTypedecl(r randyTypedecl, 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 = randFieldTypedecl(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypedecl(dAtA []byte, r randyTypedecl, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateTypedecl(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 = encodeVarintPopulateTypedecl(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypedecl(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypedecl(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 encodeVarintPopulateTypedecl(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 *Dropped) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypedecl(uint64(l)) - } - if m.Age != 0 { - n += 1 + sovTypedecl(uint64(m.Age)) - } - return n -} - -func (m *DroppedWithoutGetters) Size() (n int) { - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypedecl(uint64(m.Height)) - } - if m.Width != 0 { - n += 1 + sovTypedecl(uint64(m.Width)) - } - return n -} - -func (m *Kept) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypedecl(uint64(l)) - } - if m.Age != 0 { - n += 1 + sovTypedecl(uint64(m.Age)) - } - return n -} - -func sovTypedecl(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypedecl(x uint64) (n int) { - return sovTypedecl(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Dropped) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Dropped: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowTypedecl - } - 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 ErrInvalidLengthTypedecl - } - 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 Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypedecl(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedecl - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DroppedWithoutGetters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) - } - m.Width = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Width |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypedecl(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedecl - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Kept) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Kept: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Kept: 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 ErrIntOverflowTypedecl - } - 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 ErrInvalidLengthTypedecl - } - 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 Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedecl - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypedecl(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedecl - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypedecl(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, ErrIntOverflowTypedecl - } - 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, ErrIntOverflowTypedecl - } - 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, ErrIntOverflowTypedecl - } - 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, ErrInvalidLengthTypedecl - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypedecl - } - 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 := skipTypedecl(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 ( - ErrInvalidLengthTypedecl = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypedecl = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("typedecl.proto", fileDescriptorTypedecl) } - -var fileDescriptorTypedecl = []byte{ - // 242 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0xa9, 0x2c, 0x48, - 0x4d, 0x49, 0x4d, 0xce, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, - 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, - 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0x32, 0xe5, 0x62, - 0x77, 0x29, 0xca, 0x2f, 0x28, 0x48, 0x4d, 0x11, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, - 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x04, 0xb8, 0x98, 0x13, 0xd3, 0x53, 0x25, - 0x98, 0x14, 0x18, 0x35, 0x58, 0x83, 0x40, 0x4c, 0x2b, 0x96, 0x0f, 0x0b, 0xe5, 0x19, 0x94, 0xfc, - 0xb9, 0x44, 0xa1, 0xda, 0xc2, 0x33, 0x4b, 0x32, 0xf2, 0x4b, 0x4b, 0xdc, 0x53, 0x4b, 0x4a, 0x52, - 0x8b, 0x8a, 0x85, 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33, 0x4a, 0xc0, 0xc6, 0x30, 0x07, - 0x41, 0x79, 0x42, 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x60, 0xa3, 0x98, 0x83, 0x20, - 0x1c, 0x2b, 0x8e, 0x8e, 0x05, 0xf2, 0x0c, 0x60, 0x03, 0x75, 0xb8, 0x58, 0xbc, 0x53, 0x0b, 0x4a, - 0x88, 0x73, 0x84, 0x93, 0xc6, 0x83, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, - 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x81, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, - 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8f, 0x47, 0x72, 0x0c, 0x0d, 0x8f, 0xe5, 0x18, 0x92, - 0xd8, 0xc0, 0xde, 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xf8, 0x44, 0x8b, 0x31, 0x01, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto b/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto deleted file mode 100644 index 73f9178e8..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl/typedecl.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package typedecl; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message Dropped { - option (gogoproto.typedecl) = false; - string name = 1; - int32 age = 2; -} - -message DroppedWithoutGetters { - option (gogoproto.typedecl) = false; - option (gogoproto.goproto_getters) = false; - int64 height = 1; - int64 width = 2; -} - -message Kept { - string name = 1; - int32 age = 2; -} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go b/vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go deleted file mode 100644 index 7a686559e..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl/typedeclpb_test.go +++ /dev/null @@ -1,655 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: typedecl.proto - -/* -Package typedecl is a generated protocol buffer package. - -It is generated from these files: - typedecl.proto - -It has these top-level messages: - Dropped - DroppedWithoutGetters - Kept -*/ -package typedecl - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 TestDroppedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDroppedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDroppedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Dropped, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDropped(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDroppedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedDropped(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Dropped{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedWithoutGettersProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDroppedWithoutGettersMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*DroppedWithoutGetters, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &DroppedWithoutGetters{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKeptProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKeptMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkKeptProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Kept, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKept(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKeptProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKept(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Kept{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDroppedWithoutGettersJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKeptJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDroppedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Dropped{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Dropped{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedWithoutGettersProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DroppedWithoutGetters{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DroppedWithoutGetters{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeptProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Kept{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeptProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Kept{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDropped(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDroppedWithoutGetters(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKeptVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKept(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDroppedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDroppedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Dropped, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDropped(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedWithoutGettersSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDroppedWithoutGettersSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*DroppedWithoutGetters, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestKeptSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKeptSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Kept, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKept(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile b/vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile deleted file mode 100644 index 994417461..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl_all/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedeclall.proto diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/models.go b/vendor/github.com/gogo/protobuf/test/typedecl_all/models.go deleted file mode 100644 index ce078f9df..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl_all/models.go +++ /dev/null @@ -1,41 +0,0 @@ -package typedeclall - -import ( - "encoding/json" - - "github.com/gogo/protobuf/jsonpb" -) - -type Dropped struct { - Name string - Age int32 -} - -func (d *Dropped) Drop() bool { - return true -} - -func (d *Dropped) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { - return json.Unmarshal(b, d) -} - -func (d *Dropped) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { - return json.Marshal(d) -} - -type DroppedWithoutGetters struct { - Width int64 - Height int64 -} - -func (d *DroppedWithoutGetters) GetHeight() int64 { - return d.Height -} - -func (d *DroppedWithoutGetters) UnmarshalJSONPB(u *jsonpb.Unmarshaler, b []byte) error { - return json.Unmarshal(b, d) -} - -func (d *DroppedWithoutGetters) MarshalJSONPB(*jsonpb.Marshaler) ([]byte, error) { - return json.Marshal(d) -} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go deleted file mode 100644 index 2986b43da..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.pb.go +++ /dev/null @@ -1,934 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: typedeclall.proto - -/* - Package typedeclall is a generated protocol buffer package. - - It is generated from these files: - typedeclall.proto - - It has these top-level messages: - Dropped - DroppedWithoutGetters - Kept -*/ -package typedeclall - -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 - -// 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 - -func (m *Dropped) Reset() { *m = Dropped{} } -func (m *Dropped) String() string { return proto.CompactTextString(m) } -func (*Dropped) ProtoMessage() {} -func (*Dropped) Descriptor() ([]byte, []int) { return fileDescriptorTypedeclall, []int{0} } - -func (m *Dropped) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Dropped) GetAge() int32 { - if m != nil { - return m.Age - } - return 0 -} - -func (m *DroppedWithoutGetters) Reset() { *m = DroppedWithoutGetters{} } -func (m *DroppedWithoutGetters) String() string { return proto.CompactTextString(m) } -func (*DroppedWithoutGetters) ProtoMessage() {} -func (*DroppedWithoutGetters) Descriptor() ([]byte, []int) { return fileDescriptorTypedeclall, []int{1} } - -type Kept struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` -} - -func (m *Kept) Reset() { *m = Kept{} } -func (m *Kept) String() string { return proto.CompactTextString(m) } -func (*Kept) ProtoMessage() {} -func (*Kept) Descriptor() ([]byte, []int) { return fileDescriptorTypedeclall, []int{2} } - -func (m *Kept) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Kept) GetAge() int32 { - if m != nil { - return m.Age - } - return 0 -} - -func init() { - proto.RegisterType((*Dropped)(nil), "typedeclall.Dropped") - proto.RegisterType((*DroppedWithoutGetters)(nil), "typedeclall.DroppedWithoutGetters") - proto.RegisterType((*Kept)(nil), "typedeclall.Kept") -} -func (this *Dropped) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Dropped) - if !ok { - that2, ok := that.(Dropped) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Dropped") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Dropped but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Dropped 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.Age != that1.Age { - return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) - } - return nil -} -func (this *Dropped) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Dropped) - if !ok { - that2, ok := that.(Dropped) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Age != that1.Age { - return false - } - return true -} -func (this *DroppedWithoutGetters) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DroppedWithoutGetters) - if !ok { - that2, ok := that.(DroppedWithoutGetters) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DroppedWithoutGetters") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DroppedWithoutGetters but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DroppedWithoutGetters but is not nil && this == nil") - } - if this.Height != that1.Height { - return fmt.Errorf("Height this(%v) Not Equal that(%v)", this.Height, that1.Height) - } - if this.Width != that1.Width { - return fmt.Errorf("Width this(%v) Not Equal that(%v)", this.Width, that1.Width) - } - return nil -} -func (this *DroppedWithoutGetters) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DroppedWithoutGetters) - if !ok { - that2, ok := that.(DroppedWithoutGetters) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Height != that1.Height { - return false - } - if this.Width != that1.Width { - return false - } - return true -} -func (this *Kept) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Kept) - if !ok { - that2, ok := that.(Kept) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Kept") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Kept but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Kept 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.Age != that1.Age { - return fmt.Errorf("Age this(%v) Not Equal that(%v)", this.Age, that1.Age) - } - return nil -} -func (this *Kept) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Kept) - if !ok { - that2, ok := that.(Kept) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Age != that1.Age { - return false - } - return true -} -func (m *Dropped) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Dropped) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTypedeclall(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Age != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypedeclall(dAtA, i, uint64(m.Age)) - } - return i, nil -} - -func (m *DroppedWithoutGetters) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DroppedWithoutGetters) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Height != 0 { - dAtA[i] = 0x8 - i++ - i = encodeVarintTypedeclall(dAtA, i, uint64(m.Height)) - } - if m.Width != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypedeclall(dAtA, i, uint64(m.Width)) - } - return i, nil -} - -func (m *Kept) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Kept) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Name) > 0 { - dAtA[i] = 0xa - i++ - i = encodeVarintTypedeclall(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - } - if m.Age != 0 { - dAtA[i] = 0x10 - i++ - i = encodeVarintTypedeclall(dAtA, i, uint64(m.Age)) - } - return i, nil -} - -func encodeVarintTypedeclall(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 NewPopulatedDropped(r randyTypedeclall, easy bool) *Dropped { - this := &Dropped{} - this.Name = string(randStringTypedeclall(r)) - this.Age = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Age *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDroppedWithoutGetters(r randyTypedeclall, easy bool) *DroppedWithoutGetters { - this := &DroppedWithoutGetters{} - this.Height = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Height *= -1 - } - this.Width = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Width *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedKept(r randyTypedeclall, easy bool) *Kept { - this := &Kept{} - this.Name = string(randStringTypedeclall(r)) - this.Age = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Age *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyTypedeclall interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypedeclall(r randyTypedeclall) 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 randStringTypedeclall(r randyTypedeclall) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneTypedeclall(r) - } - return string(tmps) -} -func randUnrecognizedTypedeclall(r randyTypedeclall, 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 = randFieldTypedeclall(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypedeclall(dAtA []byte, r randyTypedeclall, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateTypedeclall(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 = encodeVarintPopulateTypedeclall(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypedeclall(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypedeclall(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 encodeVarintPopulateTypedeclall(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 *Dropped) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypedeclall(uint64(l)) - } - if m.Age != 0 { - n += 1 + sovTypedeclall(uint64(m.Age)) - } - return n -} - -func (m *DroppedWithoutGetters) Size() (n int) { - var l int - _ = l - if m.Height != 0 { - n += 1 + sovTypedeclall(uint64(m.Height)) - } - if m.Width != 0 { - n += 1 + sovTypedeclall(uint64(m.Width)) - } - return n -} - -func (m *Kept) Size() (n int) { - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTypedeclall(uint64(l)) - } - if m.Age != 0 { - n += 1 + sovTypedeclall(uint64(m.Age)) - } - return n -} - -func sovTypedeclall(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypedeclall(x uint64) (n int) { - return sovTypedeclall(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Dropped) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Dropped: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Dropped: 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 ErrIntOverflowTypedeclall - } - 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 ErrInvalidLengthTypedeclall - } - 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 Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypedeclall(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedeclall - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DroppedWithoutGetters) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DroppedWithoutGetters: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DroppedWithoutGetters: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) - } - m.Width = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Width |= (int64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypedeclall(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedeclall - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Kept) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Kept: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Kept: 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 ErrIntOverflowTypedeclall - } - 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 ErrInvalidLengthTypedeclall - } - 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 Age", wireType) - } - m.Age = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclall - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Age |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypedeclall(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedeclall - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypedeclall(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, ErrIntOverflowTypedeclall - } - 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, ErrIntOverflowTypedeclall - } - 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, ErrIntOverflowTypedeclall - } - 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, ErrInvalidLengthTypedeclall - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypedeclall - } - 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 := skipTypedeclall(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 ( - ErrInvalidLengthTypedeclall = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypedeclall = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("typedeclall.proto", fileDescriptorTypedeclall) } - -var fileDescriptorTypedeclall = []byte{ - // 248 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2c, 0xa9, 0x2c, 0x48, - 0x4d, 0x49, 0x4d, 0xce, 0x49, 0xcc, 0xc9, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x46, - 0x12, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, - 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x57, - 0x49, 0x9f, 0x8b, 0xdd, 0xa5, 0x28, 0xbf, 0xa0, 0x20, 0x35, 0x45, 0x48, 0x88, 0x8b, 0x25, 0x2f, - 0x31, 0x37, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xcc, 0x16, 0x12, 0xe0, 0x62, 0x4e, - 0x4c, 0x4f, 0x95, 0x60, 0x52, 0x60, 0xd4, 0x60, 0x0d, 0x02, 0x31, 0x95, 0xbc, 0xb9, 0x44, 0xa1, - 0x1a, 0xc2, 0x33, 0x4b, 0x32, 0xf2, 0x4b, 0x4b, 0xdc, 0x53, 0x4b, 0x4a, 0x52, 0x8b, 0x8a, 0x85, - 0xc4, 0xb8, 0xd8, 0x32, 0x52, 0x33, 0xd3, 0x33, 0x4a, 0xc0, 0x06, 0x30, 0x07, 0x41, 0x79, 0x42, - 0x22, 0x5c, 0xac, 0xe5, 0x99, 0x29, 0x25, 0x19, 0x60, 0x43, 0x98, 0x83, 0x20, 0x1c, 0x2b, 0x96, - 0x8e, 0x05, 0xf2, 0x0c, 0x4a, 0x46, 0x5c, 0x2c, 0xde, 0xa9, 0x05, 0x25, 0xc4, 0x59, 0x6d, 0xc5, - 0xf2, 0x61, 0xa1, 0x3c, 0xa3, 0x93, 0xce, 0x83, 0x87, 0x72, 0x8c, 0x3f, 0x1e, 0xca, 0x31, 0xae, - 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x81, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, - 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8f, 0x47, 0x72, 0x0c, 0x0d, 0x8f, 0xe5, - 0x18, 0x36, 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0x7b, 0xd3, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, - 0xc0, 0xcd, 0x29, 0x18, 0x37, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto deleted file mode 100644 index 76636e474..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclall.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; - -package typedeclall; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; -option (gogoproto.typedecl_all) = false; - -message Dropped { - string name = 1; - int32 age = 2; -} - -message DroppedWithoutGetters { - option (gogoproto.goproto_getters) = false; - int64 height = 1; - int64 width = 2; -} - -message Kept { - option (gogoproto.typedecl) = true; - string name = 1; - int32 age = 2; -} diff --git a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go b/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go deleted file mode 100644 index 5693f580f..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedecl_all/typedeclallpb_test.go +++ /dev/null @@ -1,655 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: typedeclall.proto - -/* -Package typedeclall is a generated protocol buffer package. - -It is generated from these files: - typedeclall.proto - -It has these top-level messages: - Dropped - DroppedWithoutGetters - Kept -*/ -package typedeclall - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -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 TestDroppedProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDroppedMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDroppedProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Dropped, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDropped(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDroppedProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedDropped(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Dropped{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedWithoutGettersProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDroppedWithoutGettersMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkDroppedWithoutGettersProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*DroppedWithoutGetters, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkDroppedWithoutGettersProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedDroppedWithoutGetters(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &DroppedWithoutGetters{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKeptProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKeptMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkKeptProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Kept, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKept(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKeptProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKept(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &Kept{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Dropped{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDroppedWithoutGettersJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DroppedWithoutGetters{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKeptJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Kept{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDroppedProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Dropped{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Dropped{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedWithoutGettersProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &DroppedWithoutGetters{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedWithoutGettersProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - dAtA := proto.CompactTextString(p) - msg := &DroppedWithoutGetters{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeptProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Kept{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeptProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Kept{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDroppedVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDropped(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Dropped{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDroppedWithoutGettersVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDroppedWithoutGetters(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DroppedWithoutGetters{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKeptVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKept(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Kept{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDroppedSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDropped(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDroppedSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Dropped, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDropped(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestDroppedWithoutGettersSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedDroppedWithoutGetters(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkDroppedWithoutGettersSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*DroppedWithoutGetters, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedDroppedWithoutGetters(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestKeptSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKept(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKeptSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*Kept, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKept(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile b/vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile deleted file mode 100644 index d8a8e1f3f..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedeclimport/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. typedeclimport.proto - protoc-min-version --version="3.0.0" --gogo_out=. --proto_path=../../../../../:../../protobuf/:. ./subpkg/subpkg.proto \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/models.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/models.go deleted file mode 100644 index 4044b91b6..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedeclimport/models.go +++ /dev/null @@ -1,7 +0,0 @@ -package typedeclimport - -import subpkg "github.com/gogo/protobuf/test/typedeclimport/subpkg" - -type SomeMessage struct { - Imported subpkg.AnotherMessage -} diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go deleted file mode 100644 index a738d11ff..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.pb.go +++ /dev/null @@ -1,384 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: typedeclimport.proto - -/* -Package typedeclimport is a generated protocol buffer package. - -It is generated from these files: - typedeclimport.proto - -It has these top-level messages: - SomeMessage -*/ -package typedeclimport - -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/typedeclimport/subpkg" - -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 - -func (m *SomeMessage) Reset() { *m = SomeMessage{} } -func (m *SomeMessage) String() string { return proto.CompactTextString(m) } -func (*SomeMessage) ProtoMessage() {} -func (*SomeMessage) Descriptor() ([]byte, []int) { return fileDescriptorTypedeclimport, []int{0} } - -func (m *SomeMessage) GetImported() subpkg.AnotherMessage { - if m != nil { - return m.Imported - } - return subpkg.AnotherMessage{} -} - -func init() { - proto.RegisterType((*SomeMessage)(nil), "typedeclimport.SomeMessage") -} -func (this *SomeMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*SomeMessage) - if !ok { - that2, ok := that.(SomeMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *SomeMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *SomeMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *SomeMessage but is not nil && this == nil") - } - if !this.Imported.Equal(&that1.Imported) { - return fmt.Errorf("Imported this(%v) Not Equal that(%v)", this.Imported, that1.Imported) - } - return nil -} -func (this *SomeMessage) Equal(that interface{}) bool { - if that == nil { - if this == nil { - return true - } - return false - } - - that1, ok := that.(*SomeMessage) - if !ok { - that2, ok := that.(SomeMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - if this == nil { - return true - } - return false - } else if this == nil { - return false - } - if !this.Imported.Equal(&that1.Imported) { - return false - } - return true -} -func (m *SomeMessage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SomeMessage) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintTypedeclimport(dAtA, i, uint64(m.Imported.Size())) - n1, err := m.Imported.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - return i, nil -} - -func encodeFixed64Typedeclimport(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 encodeFixed32Typedeclimport(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 encodeVarintTypedeclimport(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 *SomeMessage) Size() (n int) { - var l int - _ = l - l = m.Imported.Size() - n += 1 + l + sovTypedeclimport(uint64(l)) - return n -} - -func sovTypedeclimport(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypedeclimport(x uint64) (n int) { - return sovTypedeclimport(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SomeMessage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclimport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SomeMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SomeMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Imported", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypedeclimport - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypedeclimport - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Imported.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypedeclimport(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypedeclimport - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypedeclimport(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, ErrIntOverflowTypedeclimport - } - 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, ErrIntOverflowTypedeclimport - } - 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, ErrIntOverflowTypedeclimport - } - 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, ErrInvalidLengthTypedeclimport - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypedeclimport - } - 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 := skipTypedeclimport(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 ( - ErrInvalidLengthTypedeclimport = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypedeclimport = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("typedeclimport.proto", fileDescriptorTypedeclimport) } - -var fileDescriptorTypedeclimport = []byte{ - // 189 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0xa9, 0x2c, 0x48, - 0x4d, 0x49, 0x4d, 0xce, 0xc9, 0xcc, 0x2d, 0xc8, 0x2f, 0x2a, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0xe2, 0x43, 0x15, 0x95, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, - 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4b, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, - 0x0b, 0xa2, 0x5d, 0xca, 0x01, 0xa7, 0xf2, 0x92, 0xd4, 0xe2, 0x12, 0x7d, 0x54, 0xc3, 0xf5, 0x8b, - 0x4b, 0x93, 0x0a, 0xb2, 0xd3, 0xa1, 0x14, 0xc4, 0x04, 0x25, 0x5f, 0x2e, 0xee, 0xe0, 0xfc, 0xdc, - 0x54, 0xdf, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x21, 0x0b, 0x2e, 0x0e, 0x88, 0xe2, 0xd4, 0x14, - 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x31, 0x3d, 0xa8, 0x7a, 0xc7, 0xbc, 0xfc, 0x92, 0x8c, - 0xd4, 0x22, 0xa8, 0x4a, 0x27, 0x96, 0x13, 0xf7, 0xe4, 0x19, 0x82, 0xe0, 0xaa, 0xad, 0x58, 0x3e, - 0x2c, 0x94, 0x67, 0x70, 0x12, 0x79, 0xf0, 0x50, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, - 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0x6c, 0x97, 0x31, - 0x20, 0x00, 0x00, 0xff, 0xff, 0x54, 0x23, 0xca, 0x44, 0x04, 0x01, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto deleted file mode 100644 index 8ab8dbf24..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package typedeclimport; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -import "github.com/gogo/protobuf/test/typedeclimport/subpkg/subpkg.proto"; - -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; - -message SomeMessage { - option (gogoproto.typedecl) = false; - subpkg.AnotherMessage imported = 1 [(gogoproto.nullable) = false]; -} \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go b/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go deleted file mode 100644 index bea4cae73..000000000 --- a/vendor/github.com/gogo/protobuf/test/typedeclimport/typedeclimport_test.go +++ /dev/null @@ -1,7 +0,0 @@ -package typedeclimport - -import "testing" - -func Test(t *testing.T) { - // No need to do anything, if this test runs, it means it works -} diff --git a/vendor/github.com/gogo/protobuf/test/types/Makefile b/vendor/github.com/gogo/protobuf/test/types/Makefile deleted file mode 100644 index 7f489b367..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/Makefile +++ /dev/null @@ -1,39 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2016, 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. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-combo - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc-gen-combo --version="3.0.0" --gogo_out=\ - Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\ - Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \ - --proto_path=../../../../../:../../protobuf/:. types.proto - find combos -type d -not -name combos -exec cp types_test.go.in {}/types_test.go \; diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go deleted file mode 100644 index 305bf74e1..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/both/types.pb.go +++ /dev/null @@ -1,5819 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/types.proto - -/* - Package types is a generated protocol buffer package. - - It is generated from these files: - combos/both/types.proto - - It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import google_protobuf1 "github.com/gogo/protobuf/types" -import google_protobuf2 "github.com/gogo/protobuf/types" -import google_protobuf3 "github.com/gogo/protobuf/types" - -import time "time" -import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - -import types1 "github.com/gogo/protobuf/types" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 KnownTypes struct { - Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` - Ts *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` - Dbl *google_protobuf3.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` - Flt *google_protobuf3.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` - I64 *google_protobuf3.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` - U64 *google_protobuf3.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` - I32 *google_protobuf3.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` - U32 *google_protobuf3.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` - Bool *google_protobuf3.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` - Str *google_protobuf3.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` - Bytes *google_protobuf3.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` -} - -func (m *KnownTypes) Reset() { *m = KnownTypes{} } -func (m *KnownTypes) String() string { return proto.CompactTextString(m) } -func (*KnownTypes) ProtoMessage() {} -func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } - -func (m *KnownTypes) GetDur() *google_protobuf1.Duration { - if m != nil { - return m.Dur - } - return nil -} - -func (m *KnownTypes) GetTs() *google_protobuf2.Timestamp { - if m != nil { - return m.Ts - } - return nil -} - -func (m *KnownTypes) GetDbl() *google_protobuf3.DoubleValue { - if m != nil { - return m.Dbl - } - return nil -} - -func (m *KnownTypes) GetFlt() *google_protobuf3.FloatValue { - if m != nil { - return m.Flt - } - return nil -} - -func (m *KnownTypes) GetI64() *google_protobuf3.Int64Value { - if m != nil { - return m.I64 - } - return nil -} - -func (m *KnownTypes) GetU64() *google_protobuf3.UInt64Value { - if m != nil { - return m.U64 - } - return nil -} - -func (m *KnownTypes) GetI32() *google_protobuf3.Int32Value { - if m != nil { - return m.I32 - } - return nil -} - -func (m *KnownTypes) GetU32() *google_protobuf3.UInt32Value { - if m != nil { - return m.U32 - } - return nil -} - -func (m *KnownTypes) GetBool() *google_protobuf3.BoolValue { - if m != nil { - return m.Bool - } - return nil -} - -func (m *KnownTypes) GetStr() *google_protobuf3.StringValue { - if m != nil { - return m.Str - } - return nil -} - -func (m *KnownTypes) GetBytes() *google_protobuf3.BytesValue { - if m != nil { - return m.Bytes - } - return nil -} - -type ProtoTypes struct { - NullableTimestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` - NullableDuration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` - Timestamp google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` - Duration google_protobuf1.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` -} - -func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } -func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } -func (*ProtoTypes) ProtoMessage() {} -func (*ProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } - -func (m *ProtoTypes) GetNullableTimestamp() *google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *ProtoTypes) GetNullableDuration() *google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *ProtoTypes) GetTimestamp() google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return google_protobuf2.Timestamp{} -} - -func (m *ProtoTypes) GetDuration() google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return google_protobuf1.Duration{} -} - -type StdTypes struct { - NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` - NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` - Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` -} - -func (m *StdTypes) Reset() { *m = StdTypes{} } -func (m *StdTypes) String() string { return proto.CompactTextString(m) } -func (*StdTypes) ProtoMessage() {} -func (*StdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } - -func (m *StdTypes) GetNullableTimestamp() *time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *StdTypes) GetNullableDuration() *time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *StdTypes) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *StdTypes) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -type RepProtoTypes struct { - NullableTimestamps []*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` - NullableDurations []*google_protobuf1.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` - Timestamps []google_protobuf2.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` - Durations []google_protobuf1.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` -} - -func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } -func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } -func (*RepProtoTypes) ProtoMessage() {} -func (*RepProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} } - -func (m *RepProtoTypes) GetNullableTimestamps() []*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepProtoTypes) GetNullableDurations() []*google_protobuf1.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepProtoTypes) GetTimestamps() []google_protobuf2.Timestamp { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepProtoTypes) GetDurations() []google_protobuf1.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type RepStdTypes struct { - NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` - NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` - Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` - Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` -} - -func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } -func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } -func (*RepStdTypes) ProtoMessage() {} -func (*RepStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} } - -func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepStdTypes) GetNullableDurations() []*time.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepStdTypes) GetTimestamps() []time.Time { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepStdTypes) GetDurations() []time.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type MapProtoTypes struct { - NullableTimestamp map[int32]*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]google_protobuf2.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*google_protobuf1.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]google_protobuf1.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } -func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } -func (*MapProtoTypes) ProtoMessage() {} -func (*MapProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} } - -func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapProtoTypes) GetTimestamp() map[int32]google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapProtoTypes) GetNullableDuration() map[int32]*google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapProtoTypes) GetDuration() map[int32]google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type MapStdTypes struct { - NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } -func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } -func (*MapStdTypes) ProtoMessage() {} -func (*MapStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} } - -func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapStdTypes) GetDuration() map[int32]time.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type OneofProtoTypes struct { - // Types that are valid to be assigned to OneOfProtoTimes: - // *OneofProtoTypes_Timestamp - // *OneofProtoTypes_Duration - OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` -} - -func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } -func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } -func (*OneofProtoTypes) ProtoMessage() {} -func (*OneofProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} } - -type isOneofProtoTypes_OneOfProtoTimes interface { - isOneofProtoTypes_OneOfProtoTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type OneofProtoTypes_Timestamp struct { - Timestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` -} -type OneofProtoTypes_Duration struct { - Duration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` -} - -func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} -func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} - -func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { - if m != nil { - return m.OneOfProtoTimes - } - return nil -} - -func (m *OneofProtoTypes) GetTimestamp() *google_protobuf2.Timestamp { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofProtoTypes) GetDuration() *google_protobuf1.Duration { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ - (*OneofProtoTypes_Timestamp)(nil), - (*OneofProtoTypes_Duration)(nil), - } -} - -func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timestamp); err != nil { - return err - } - case *OneofProtoTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Duration); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) - } - return nil -} - -func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofProtoTypes) - switch tag { - case 1: // OneOfProtoTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf2.Timestamp) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} - return true, err - case 2: // OneOfProtoTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf1.Duration) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} - return true, err - default: - return false, nil - } -} - -func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - s := proto.Size(x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofProtoTypes_Duration: - s := proto.Size(x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type OneofStdTypes struct { - // Types that are valid to be assigned to OneOfStdTimes: - // *OneofStdTypes_Timestamp - // *OneofStdTypes_Duration - OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` -} - -func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } -func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } -func (*OneofStdTypes) ProtoMessage() {} -func (*OneofStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} } - -type isOneofStdTypes_OneOfStdTimes interface { - isOneofStdTypes_OneOfStdTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type OneofStdTypes_Timestamp struct { - Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` -} -type OneofStdTypes_Duration struct { - Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` -} - -func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} -func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} - -func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { - if m != nil { - return m.OneOfStdTimes - } - return nil -} - -func (m *OneofStdTypes) GetTimestamp() *time.Time { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofStdTypes) GetDuration() *time.Duration { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ - (*OneofStdTypes_Timestamp)(nil), - (*OneofStdTypes_Duration)(nil), - } -} - -func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case *OneofStdTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) - } - return nil -} - -func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofStdTypes) - switch tag { - case 1: // OneOfStdTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Time) - if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} - return true, err - case 2: // OneOfStdTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Duration) - if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{c} - return true, err - default: - return false, nil - } -} - -func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofStdTypes_Duration: - s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") - proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") - proto.RegisterType((*StdTypes)(nil), "types.StdTypes") - proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") - proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") - proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") - proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") - proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") - proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") -} -func (this *KnownTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Dur.Compare(that1.Dur); c != 0 { - return c - } - if c := this.Ts.Compare(that1.Ts); c != 0 { - return c - } - if c := this.Dbl.Compare(that1.Dbl); c != 0 { - return c - } - if c := this.Flt.Compare(that1.Flt); c != 0 { - return c - } - if c := this.I64.Compare(that1.I64); c != 0 { - return c - } - if c := this.U64.Compare(that1.U64); c != 0 { - return c - } - if c := this.I32.Compare(that1.I32); c != 0 { - return c - } - if c := this.U32.Compare(that1.U32); c != 0 { - return c - } - if c := this.Bool.Compare(that1.Bool); c != 0 { - return c - } - if c := this.Str.Compare(that1.Str); c != 0 { - return c - } - if c := this.Bytes.Compare(that1.Bytes); c != 0 { - return c - } - return 0 -} -func (this *ProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { - return c - } - if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { - return c - } - if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { - return c - } - if c := this.Duration.Compare(&that1.Duration); c != 0 { - return c - } - return 0 -} -func (this *RepProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { - return -1 - } - return 1 - } - for i := range this.NullableTimestamps { - if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { - return c - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - if len(this.NullableDurations) < len(that1.NullableDurations) { - return -1 - } - return 1 - } - for i := range this.NullableDurations { - if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { - return c - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - if len(this.Timestamps) < len(that1.Timestamps) { - return -1 - } - return 1 - } - for i := range this.Timestamps { - if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { - return c - } - } - if len(this.Durations) != len(that1.Durations) { - if len(this.Durations) < len(that1.Durations) { - return -1 - } - return 1 - } - for i := range this.Durations { - if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { - return c - } - } - return 0 -} -func (this *KnownTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *KnownTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") - } - if !this.Dur.Equal(that1.Dur) { - return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) - } - if !this.Ts.Equal(that1.Ts) { - return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) - } - if !this.Dbl.Equal(that1.Dbl) { - return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) - } - if !this.Flt.Equal(that1.Flt) { - return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) - } - if !this.I64.Equal(that1.I64) { - return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) - } - if !this.U64.Equal(that1.U64) { - return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) - } - if !this.I32.Equal(that1.I32) { - return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) - } - if !this.U32.Equal(that1.U32) { - return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) - } - if !this.Bool.Equal(that1.Bool) { - return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) - } - if !this.Str.Equal(that1.Str) { - return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) - } - if !this.Bytes.Equal(that1.Bytes) { - return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) - } - return nil -} -func (this *KnownTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Dur.Equal(that1.Dur) { - return false - } - if !this.Ts.Equal(that1.Ts) { - return false - } - if !this.Dbl.Equal(that1.Dbl) { - return false - } - if !this.Flt.Equal(that1.Flt) { - return false - } - if !this.I64.Equal(that1.I64) { - return false - } - if !this.U64.Equal(that1.U64) { - return false - } - if !this.I32.Equal(that1.I32) { - return false - } - if !this.U32.Equal(that1.U32) { - return false - } - if !this.Bool.Equal(that1.Bool) { - return false - } - if !this.Str.Equal(that1.Str) { - return false - } - if !this.Bytes.Equal(that1.Bytes) { - return false - } - return true -} -func (this *ProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if !this.Duration.Equal(&that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *ProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return false - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return false - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return false - } - if !this.Duration.Equal(&that1.Duration) { - return false - } - return true -} -func (this *StdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *StdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *StdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) - } - } else if this.NullableDuration != nil { - return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") - } else if that1.NullableDuration != nil { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if this.Duration != that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *StdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return false - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return false - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return false - } - } else if this.NullableDuration != nil { - return false - } else if that1.NullableDuration != nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if this.Duration != that1.Duration { - return false - } - return true -} -func (this *RepProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return false - } - } - return true -} -func (this *RepStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return false - } - } - return true -} -func (this *MapProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return false - } - } - return true -} -func (this *MapStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return false - } - } - return true -} -func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") - } - } else if this.OneOfProtoTimes == nil { - return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") - } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { - return err - } - return nil -} -func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") - } - if !this.Duration.Equal(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return false - } - } else if this.OneOfProtoTimes == nil { - return false - } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { - return false - } - return true -} -func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - return true -} -func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Duration.Equal(that1.Duration) { - return false - } - return true -} -func (this *OneofStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") - } - } else if this.OneOfStdTimes == nil { - return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") - } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { - return err - } - return nil -} -func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) - } - } else if this.Duration != nil { - return fmt.Errorf("this.Duration == nil && that.Duration != nil") - } else if that1.Duration != nil { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return false - } - } else if this.OneOfStdTimes == nil { - return false - } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { - return false - } - return true -} -func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return false - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return false - } - return true -} -func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return false - } - } else if this.Duration != nil { - return false - } else if that1.Duration != nil { - return false - } - return true -} -func (m *KnownTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KnownTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Dur != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Dur.Size())) - n1, err := m.Dur.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Ts != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Ts.Size())) - n2, err := m.Ts.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Dbl != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Dbl.Size())) - n3, err := m.Dbl.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Flt != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Flt.Size())) - n4, err := m.Flt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.I64 != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.I64.Size())) - n5, err := m.I64.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.U64 != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.U64.Size())) - n6, err := m.U64.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.I32 != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.I32.Size())) - n7, err := m.I32.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.U32 != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.U32.Size())) - n8, err := m.U32.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Bool != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Bool.Size())) - n9, err := m.Bool.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.Str != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Str.Size())) - n10, err := m.Str.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.Bytes != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Bytes.Size())) - n11, err := m.Bytes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} - -func (m *ProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NullableTimestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.NullableTimestamp.Size())) - n12, err := m.NullableTimestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if m.NullableDuration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.NullableDuration.Size())) - n13, err := m.NullableDuration.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) - n14, err := m.Timestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) - n15, err := m.Duration.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - return i, nil -} - -func (m *StdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NullableTimestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*m.NullableTimestamp))) - n16, err := types1.StdTimeMarshalTo(*m.NullableTimestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.NullableDuration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*m.NullableDuration))) - n17, err := types1.StdDurationMarshalTo(*m.NullableDuration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(m.Timestamp))) - n18, err := types1.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(m.Duration))) - n19, err := types1.StdDurationMarshalTo(m.Duration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - return i, nil -} - -func (m *RepProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, msg := range m.NullableTimestamps { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NullableDurations) > 0 { - for _, msg := range m.NullableDurations { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Timestamps) > 0 { - for _, msg := range m.Timestamps { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Durations) > 0 { - for _, msg := range m.Durations { - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *RepStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, msg := range m.NullableTimestamps { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*msg))) - n, err := types1.StdTimeMarshalTo(*msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NullableDurations) > 0 { - for _, msg := range m.NullableDurations { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*msg))) - n, err := types1.StdDurationMarshalTo(*msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Timestamps) > 0 { - for _, msg := range m.Timestamps { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(msg))) - n, err := types1.StdTimeMarshalTo(msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Durations) > 0 { - for _, msg := range m.Durations { - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(msg))) - n, err := types1.StdDurationMarshalTo(msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *MapProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k := range m.NullableTimestamp { - dAtA[i] = 0xa - i++ - v := m.NullableTimestamp[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(v.Size())) - n20, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - } - } - if len(m.Timestamp) > 0 { - for k := range m.Timestamp { - dAtA[i] = 0x12 - i++ - v := m.Timestamp[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) - n21, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - } - if len(m.NullableDuration) > 0 { - for k := range m.NullableDuration { - dAtA[i] = 0x1a - i++ - v := m.NullableDuration[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(v.Size())) - n22, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - } - } - if len(m.Duration) > 0 { - for k := range m.Duration { - dAtA[i] = 0x22 - i++ - v := m.Duration[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) - n23, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - } - return i, nil -} - -func (m *MapStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k := range m.NullableTimestamp { - dAtA[i] = 0xa - i++ - v := m.NullableTimestamp[k] - msgSize := 0 - if v != nil { - msgSize = types1.SizeOfStdTime(*v) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*v))) - n24, err := types1.StdTimeMarshalTo(*v, dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - } - } - if len(m.Timestamp) > 0 { - for k := range m.Timestamp { - dAtA[i] = 0x12 - i++ - v := m.Timestamp[k] - msgSize := 0 - if (&v) != nil { - msgSize = types1.SizeOfStdTime(*(&v)) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*(&v)))) - n25, err := types1.StdTimeMarshalTo(*(&v), dAtA[i:]) - if err != nil { - return 0, err - } - i += n25 - } - } - if len(m.NullableDuration) > 0 { - for k := range m.NullableDuration { - dAtA[i] = 0x1a - i++ - v := m.NullableDuration[k] - msgSize := 0 - if v != nil { - msgSize = types1.SizeOfStdDuration(*v) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*v))) - n26, err := types1.StdDurationMarshalTo(*v, dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } - } - } - if len(m.Duration) > 0 { - for k := range m.Duration { - dAtA[i] = 0x22 - i++ - v := m.Duration[k] - msgSize := 0 - if (&v) != nil { - msgSize = types1.SizeOfStdDuration(*(&v)) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*(&v)))) - n27, err := types1.StdDurationMarshalTo(*(&v), dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - } - return i, nil -} - -func (m *OneofProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OneofProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.OneOfProtoTimes != nil { - nn28, err := m.OneOfProtoTimes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn28 - } - return i, nil -} - -func (m *OneofProtoTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Timestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) - n29, err := m.Timestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n29 - } - return i, nil -} -func (m *OneofProtoTypes_Duration) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Duration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) - n30, err := m.Duration.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 - } - return i, nil -} -func (m *OneofStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OneofStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.OneOfStdTimes != nil { - nn31, err := m.OneOfStdTimes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn31 - } - return i, nil -} - -func (m *OneofStdTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Timestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*m.Timestamp))) - n32, err := types1.StdTimeMarshalTo(*m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n32 - } - return i, nil -} -func (m *OneofStdTypes_Duration) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Duration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*m.Duration))) - n33, err := types1.StdDurationMarshalTo(*m.Duration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n33 - } - return i, nil -} -func encodeVarintTypes(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 NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { - this := &KnownTypes{} - if r.Intn(10) != 0 { - this.Dur = google_protobuf1.NewPopulatedDuration(r, easy) - } - if r.Intn(10) != 0 { - this.Ts = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.Dbl = google_protobuf3.NewPopulatedDoubleValue(r, easy) - } - if r.Intn(10) != 0 { - this.Flt = google_protobuf3.NewPopulatedFloatValue(r, easy) - } - if r.Intn(10) != 0 { - this.I64 = google_protobuf3.NewPopulatedInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.U64 = google_protobuf3.NewPopulatedUInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.I32 = google_protobuf3.NewPopulatedInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.U32 = google_protobuf3.NewPopulatedUInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.Bool = google_protobuf3.NewPopulatedBoolValue(r, easy) - } - if r.Intn(10) != 0 { - this.Str = google_protobuf3.NewPopulatedStringValue(r, easy) - } - if r.Intn(10) != 0 { - this.Bytes = google_protobuf3.NewPopulatedBytesValue(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { - this := &ProtoTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = google_protobuf1.NewPopulatedDuration(r, easy) - } - v1 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamp = *v1 - v2 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Duration = *v2 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { - this := &StdTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = types1.NewPopulatedStdTime(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = types1.NewPopulatedStdDuration(r, easy) - } - v3 := types1.NewPopulatedStdTime(r, easy) - this.Timestamp = *v3 - v4 := types1.NewPopulatedStdDuration(r, easy) - this.Duration = *v4 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { - this := &RepProtoTypes{} - if r.Intn(10) != 0 { - v5 := r.Intn(5) - this.NullableTimestamps = make([]*google_protobuf2.Timestamp, v5) - for i := 0; i < v5; i++ { - this.NullableTimestamps[i] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(5) - this.NullableDurations = make([]*google_protobuf1.Duration, v6) - for i := 0; i < v6; i++ { - this.NullableDurations[i] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(5) - this.Timestamps = make([]google_protobuf2.Timestamp, v7) - for i := 0; i < v7; i++ { - v8 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamps[i] = *v8 - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(5) - this.Durations = make([]google_protobuf1.Duration, v9) - for i := 0; i < v9; i++ { - v10 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Durations[i] = *v10 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { - this := &RepStdTypes{} - if r.Intn(10) != 0 { - v11 := r.Intn(5) - this.NullableTimestamps = make([]*time.Time, v11) - for i := 0; i < v11; i++ { - this.NullableTimestamps[i] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(5) - this.NullableDurations = make([]*time.Duration, v12) - for i := 0; i < v12; i++ { - this.NullableDurations[i] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(5) - this.Timestamps = make([]time.Time, v13) - for i := 0; i < v13; i++ { - v14 := types1.NewPopulatedStdTime(r, easy) - this.Timestamps[i] = *v14 - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(5) - this.Durations = make([]time.Duration, v15) - for i := 0; i < v15; i++ { - v16 := types1.NewPopulatedStdDuration(r, easy) - this.Durations[i] = *v16 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { - this := &MapProtoTypes{} - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*google_protobuf2.Timestamp) - for i := 0; i < v17; i++ { - this.NullableTimestamp[int32(r.Int31())] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Timestamp = make(map[int32]google_protobuf2.Timestamp) - for i := 0; i < v18; i++ { - this.Timestamp[int32(r.Int31())] = *google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.NullableDuration = make(map[int32]*google_protobuf1.Duration) - for i := 0; i < v19; i++ { - this.NullableDuration[int32(r.Int31())] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Duration = make(map[int32]google_protobuf1.Duration) - for i := 0; i < v20; i++ { - this.Duration[int32(r.Int31())] = *google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { - this := &MapStdTypes{} - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*time.Time) - for i := 0; i < v21; i++ { - this.NullableTimestamp[int32(r.Int31())] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Timestamp = make(map[int32]time.Time) - for i := 0; i < v22; i++ { - this.Timestamp[int32(r.Int31())] = *types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.NullableDuration = make(map[int32]*time.Duration) - for i := 0; i < v23; i++ { - this.NullableDuration[int32(r.Int31())] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Duration = make(map[int32]time.Duration) - for i := 0; i < v24; i++ { - this.Duration[int32(r.Int31())] = *types1.NewPopulatedStdDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { - this := &OneofProtoTypes{} - oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfProtoTimes { - case 1: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) - case 2: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { - this := &OneofProtoTypes_Timestamp{} - this.Timestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - return this -} -func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { - this := &OneofProtoTypes_Duration{} - this.Duration = google_protobuf1.NewPopulatedDuration(r, easy) - return this -} -func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { - this := &OneofStdTypes{} - oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfStdTimes { - case 1: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) - case 2: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { - this := &OneofStdTypes_Timestamp{} - this.Timestamp = types1.NewPopulatedStdTime(r, easy) - return this -} -func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { - this := &OneofStdTypes_Duration{} - this.Duration = types1.NewPopulatedStdDuration(r, easy) - return this -} - -type randyTypes interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypes(r randyTypes) 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 randStringTypes(r randyTypes) string { - v25 := r.Intn(100) - tmps := make([]rune, v25) - for i := 0; i < v25; i++ { - tmps[i] = randUTF8RuneTypes(r) - } - return string(tmps) -} -func randUnrecognizedTypes(r randyTypes, 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 = randFieldTypes(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v26 := r.Int63() - if r.Intn(2) == 0 { - v26 *= -1 - } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) - case 1: - dAtA = encodeVarintPopulateTypes(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 = encodeVarintPopulateTypes(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypes(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 encodeVarintPopulateTypes(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 *KnownTypes) Size() (n int) { - var l int - _ = l - if m.Dur != nil { - l = m.Dur.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Ts != nil { - l = m.Ts.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Dbl != nil { - l = m.Dbl.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Flt != nil { - l = m.Flt.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I64 != nil { - l = m.I64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U64 != nil { - l = m.U64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I32 != nil { - l = m.I32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U32 != nil { - l = m.U32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bool != nil { - l = m.Bool.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Str != nil { - l = m.Str.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bytes != nil { - l = m.Bytes.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ProtoTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = m.NullableTimestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = m.NullableDuration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *StdTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = types1.SizeOfStdTime(*m.NullableTimestamp) - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = types1.SizeOfStdDuration(*m.NullableDuration) - n += 1 + l + sovTypes(uint64(l)) - } - l = types1.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = types1.SizeOfStdDuration(m.Duration) - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *RepProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *RepStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = types1.SizeOfStdTime(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = types1.SizeOfStdDuration(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = types1.SizeOfStdTime(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = types1.SizeOfStdDuration(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *MapProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MapStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdTime(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = types1.SizeOfStdTime(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdDuration(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = types1.SizeOfStdDuration(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *OneofProtoTypes) Size() (n int) { - var l int - _ = l - if m.OneOfProtoTimes != nil { - n += m.OneOfProtoTimes.Size() - } - return n -} - -func (m *OneofProtoTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofProtoTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes) Size() (n int) { - var l int - _ = l - if m.OneOfStdTimes != nil { - n += m.OneOfStdTimes.Size() - } - return n -} - -func (m *OneofStdTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = types1.SizeOfStdTime(*m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = types1.SizeOfStdDuration(*m.Duration) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *KnownTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KnownTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KnownTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dur", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dur == nil { - m.Dur = &google_protobuf1.Duration{} - } - if err := m.Dur.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ts == nil { - m.Ts = &google_protobuf2.Timestamp{} - } - if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dbl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dbl == nil { - m.Dbl = &google_protobuf3.DoubleValue{} - } - if err := m.Dbl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Flt == nil { - m.Flt = &google_protobuf3.FloatValue{} - } - if err := m.Flt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.I64 == nil { - m.I64 = &google_protobuf3.Int64Value{} - } - if err := m.I64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.U64 == nil { - m.U64 = &google_protobuf3.UInt64Value{} - } - if err := m.U64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.I32 == nil { - m.I32 = &google_protobuf3.Int32Value{} - } - if err := m.I32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.U32 == nil { - m.U32 = &google_protobuf3.UInt32Value{} - } - if err := m.U32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bool == nil { - m.Bool = &google_protobuf3.BoolValue{} - } - if err := m.Bool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Str == nil { - m.Str = &google_protobuf3.StringValue{} - } - if err := m.Str.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bytes == nil { - m.Bytes = &google_protobuf3.BytesValue{} - } - if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = &google_protobuf2.Timestamp{} - } - if err := m.NullableTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = &google_protobuf1.Duration{} - } - if err := m.NullableDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = new(time.Time) - } - if err := types1.StdTimeUnmarshal(m.NullableTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = new(time.Duration) - } - if err := types1.StdDurationUnmarshal(m.NullableDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableTimestamps = append(m.NullableTimestamps, &google_protobuf2.Timestamp{}) - if err := m.NullableTimestamps[len(m.NullableTimestamps)-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 NullableDurations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableDurations = append(m.NullableDurations, &google_protobuf1.Duration{}) - if err := m.NullableDurations[len(m.NullableDurations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamps = append(m.Timestamps, google_protobuf2.Timestamp{}) - if err := m.Timestamps[len(m.Timestamps)-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 Durations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Durations = append(m.Durations, google_protobuf1.Duration{}) - if err := m.Durations[len(m.Durations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableTimestamps = append(m.NullableTimestamps, new(time.Time)) - if err := types1.StdTimeUnmarshal(m.NullableTimestamps[len(m.NullableTimestamps)-1], dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableDurations = append(m.NullableDurations, new(time.Duration)) - if err := types1.StdDurationUnmarshal(m.NullableDurations[len(m.NullableDurations)-1], dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamps = append(m.Timestamps, time.Time{}) - if err := types1.StdTimeUnmarshal(&(m.Timestamps[len(m.Timestamps)-1]), dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Durations = append(m.Durations, time.Duration(0)) - if err := types1.StdDurationUnmarshal(&(m.Durations[len(m.Durations)-1]), dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = make(map[int32]*google_protobuf2.Timestamp) - } - var mapkey int32 - var mapvalue *google_protobuf2.Timestamp - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf2.Timestamp{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableTimestamp[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = make(map[int32]google_protobuf2.Timestamp) - } - var mapkey int32 - mapvalue := &google_protobuf2.Timestamp{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf2.Timestamp{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Timestamp[mapkey] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = make(map[int32]*google_protobuf1.Duration) - } - var mapkey int32 - var mapvalue *google_protobuf1.Duration - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf1.Duration{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableDuration[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Duration == nil { - m.Duration = make(map[int32]google_protobuf1.Duration) - } - var mapkey int32 - mapvalue := &google_protobuf1.Duration{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf1.Duration{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Duration[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MapStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = make(map[int32]*time.Time) - } - var mapkey int32 - mapvalue := new(time.Time) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableTimestamp[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = make(map[int32]time.Time) - } - var mapkey int32 - mapvalue := new(time.Time) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Timestamp[mapkey] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = make(map[int32]*time.Duration) - } - var mapkey int32 - mapvalue := new(time.Duration) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableDuration[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Duration == nil { - m.Duration = make(map[int32]time.Duration) - } - var mapkey int32 - mapvalue := new(time.Duration) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Duration[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OneofProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OneofProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OneofProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &google_protobuf2.Timestamp{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &google_protobuf1.Duration{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfProtoTimes = &OneofProtoTypes_Duration{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OneofStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OneofStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OneofStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := new(time.Time) - if err := types1.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := new(time.Duration) - if err := types1.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(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, ErrIntOverflowTypes - } - 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, ErrIntOverflowTypes - } - 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, ErrIntOverflowTypes - } - 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, ErrInvalidLengthTypes - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - 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 := skipTypes(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 ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/both/types.proto", fileDescriptorTypes) } - -var fileDescriptorTypes = []byte{ - // 923 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x4f, 0x8f, 0xdb, 0x44, - 0x1c, 0xdd, 0xb1, 0x9d, 0xb2, 0xfb, 0x5b, 0x2d, 0x6d, 0x2d, 0x01, 0x26, 0x20, 0x67, 0x09, 0x97, - 0xa5, 0x55, 0x1d, 0x48, 0xa2, 0x80, 0x16, 0x15, 0x8a, 0xb5, 0x6d, 0xb7, 0x54, 0xdb, 0xad, 0xd2, - 0xb2, 0x02, 0x24, 0x10, 0x76, 0xe3, 0xa4, 0x11, 0x8e, 0x27, 0xb2, 0xc7, 0x54, 0xb9, 0xf1, 0x11, - 0x38, 0x82, 0xb8, 0xd0, 0x1b, 0x12, 0xdc, 0xe1, 0xc8, 0x05, 0xa9, 0x37, 0xf8, 0x04, 0xd0, 0x86, - 0x0b, 0x1f, 0xa1, 0x47, 0x34, 0xe3, 0xf1, 0xbf, 0x78, 0xec, 0x90, 0x48, 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, 0x6f, 0x66, 0xba, 0xb0, 0xcc, 0xc7, 0x61, 0x66, 0x9d, 0x99, 0xe7, 0x99, 0x8f, - 0x63, 0xee, 0x83, 0xea, 0x35, 0x1f, 0x22, 0xd8, 0x61, 0xde, 0x92, 0x79, 0xbb, 0xb2, 0x92, 0xb3, - 0x68, 0xb0, 0xf2, 0xfe, 0x2e, 0xaf, 0xe0, 0x2f, 0x2a, 0x7c, 0xce, 0xe5, 0x59, 0xe6, 0xe8, 0x98, - 0x39, 0xa2, 0x9a, 0xe6, 0xde, 0xe3, 0x27, 0x3a, 0x7a, 0xfa, 0x44, 0x47, 0xdf, 0xcf, 0x75, 0xf4, - 0xf3, 0x5c, 0x47, 0xbf, 0xcc, 0x75, 0xf4, 0x68, 0xae, 0xa3, 0xdf, 0xe7, 0x3a, 0x7a, 0x3c, 0xd7, - 0xd1, 0xd3, 0xb9, 0xbe, 0xf1, 0xe5, 0x5f, 0xfa, 0x86, 0x7d, 0x86, 0xe9, 0x77, 0xfe, 0x09, 0x00, - 0x00, 0xff, 0xff, 0x48, 0x89, 0xae, 0xdb, 0x94, 0x0e, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto deleted file mode 100644 index 6c0377763..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/both/types.proto +++ /dev/null @@ -1,131 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package types; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -//import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -//import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message KnownTypes { - option (gogoproto.compare) = true; - google.protobuf.Duration dur = 1; - google.protobuf.Timestamp ts = 2; - google.protobuf.DoubleValue dbl = 3; - google.protobuf.FloatValue flt = 4; - google.protobuf.Int64Value i64 = 5; - google.protobuf.UInt64Value u64 = 6; - google.protobuf.Int32Value i32 = 7; - google.protobuf.UInt32Value u32 = 8; - google.protobuf.BoolValue bool = 9; - google.protobuf.StringValue str = 10; - google.protobuf.BytesValue bytes = 11; - - // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed - // google.protobuf.Struct st = 12; - // google.protobuf.Any an = 14; -} - -message ProtoTypes { - // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare - option (gogoproto.compare) = true; - google.protobuf.Timestamp nullableTimestamp = 1; - google.protobuf.Duration nullableDuration = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; -} - -message StdTypes { - google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message RepProtoTypes { - option (gogoproto.compare) = true; - repeated google.protobuf.Timestamp nullableTimestamps = 1; - repeated google.protobuf.Duration nullableDurations = 2; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; -} - -message RepStdTypes { - repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; - repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message MapProtoTypes { - map nullableTimestamp = 1; - map timestamp = 2 [(gogoproto.nullable) = false]; - - map nullableDuration = 3; - map duration = 4 [(gogoproto.nullable) = false]; -} - -message MapStdTypes { - map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - map nullableDuration = 3 [(gogoproto.stdduration) = true]; - map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message OneofProtoTypes { - oneof OneOfProtoTimes { - google.protobuf.Timestamp timestamp = 1; - google.protobuf.Duration duration = 2; - } -} - -message OneofStdTypes { - oneof OneOfStdTimes { - google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go deleted file mode 100644 index 7d24f58e6..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/both/types_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 types - -import ( - math_rand "math/rand" - "testing" - "time" - - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -func TestFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go deleted file mode 100644 index 5b1fb2b45..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/both/typespb_test.go +++ /dev/null @@ -1,1984 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/both/types.proto - -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - combos/both/types.proto - -It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestKnownTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKnownTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkKnownTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKnownTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &KnownTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &StdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRepProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRepStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOneofProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOneofStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKnownTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKnownTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedKnownTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestRepProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedRepProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestKnownTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKnownTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKnownTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go deleted file mode 100644 index cd197b59e..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.pb.go +++ /dev/null @@ -1,3380 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/types.proto - -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/types.proto - -It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import google_protobuf1 "github.com/gogo/protobuf/types" -import google_protobuf2 "github.com/gogo/protobuf/types" -import google_protobuf3 "github.com/gogo/protobuf/types" - -import time "time" -import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - -import types1 "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 KnownTypes struct { - Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` - Ts *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` - Dbl *google_protobuf3.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` - Flt *google_protobuf3.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` - I64 *google_protobuf3.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` - U64 *google_protobuf3.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` - I32 *google_protobuf3.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` - U32 *google_protobuf3.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` - Bool *google_protobuf3.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` - Str *google_protobuf3.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` - Bytes *google_protobuf3.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` -} - -func (m *KnownTypes) Reset() { *m = KnownTypes{} } -func (m *KnownTypes) String() string { return proto.CompactTextString(m) } -func (*KnownTypes) ProtoMessage() {} -func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } - -func (m *KnownTypes) GetDur() *google_protobuf1.Duration { - if m != nil { - return m.Dur - } - return nil -} - -func (m *KnownTypes) GetTs() *google_protobuf2.Timestamp { - if m != nil { - return m.Ts - } - return nil -} - -func (m *KnownTypes) GetDbl() *google_protobuf3.DoubleValue { - if m != nil { - return m.Dbl - } - return nil -} - -func (m *KnownTypes) GetFlt() *google_protobuf3.FloatValue { - if m != nil { - return m.Flt - } - return nil -} - -func (m *KnownTypes) GetI64() *google_protobuf3.Int64Value { - if m != nil { - return m.I64 - } - return nil -} - -func (m *KnownTypes) GetU64() *google_protobuf3.UInt64Value { - if m != nil { - return m.U64 - } - return nil -} - -func (m *KnownTypes) GetI32() *google_protobuf3.Int32Value { - if m != nil { - return m.I32 - } - return nil -} - -func (m *KnownTypes) GetU32() *google_protobuf3.UInt32Value { - if m != nil { - return m.U32 - } - return nil -} - -func (m *KnownTypes) GetBool() *google_protobuf3.BoolValue { - if m != nil { - return m.Bool - } - return nil -} - -func (m *KnownTypes) GetStr() *google_protobuf3.StringValue { - if m != nil { - return m.Str - } - return nil -} - -func (m *KnownTypes) GetBytes() *google_protobuf3.BytesValue { - if m != nil { - return m.Bytes - } - return nil -} - -type ProtoTypes struct { - NullableTimestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` - NullableDuration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` - Timestamp google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` - Duration google_protobuf1.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` -} - -func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } -func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } -func (*ProtoTypes) ProtoMessage() {} -func (*ProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } - -func (m *ProtoTypes) GetNullableTimestamp() *google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *ProtoTypes) GetNullableDuration() *google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *ProtoTypes) GetTimestamp() google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return google_protobuf2.Timestamp{} -} - -func (m *ProtoTypes) GetDuration() google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return google_protobuf1.Duration{} -} - -type StdTypes struct { - NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` - NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` - Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` -} - -func (m *StdTypes) Reset() { *m = StdTypes{} } -func (m *StdTypes) String() string { return proto.CompactTextString(m) } -func (*StdTypes) ProtoMessage() {} -func (*StdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } - -func (m *StdTypes) GetNullableTimestamp() *time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *StdTypes) GetNullableDuration() *time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *StdTypes) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *StdTypes) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -type RepProtoTypes struct { - NullableTimestamps []*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` - NullableDurations []*google_protobuf1.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` - Timestamps []google_protobuf2.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` - Durations []google_protobuf1.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` -} - -func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } -func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } -func (*RepProtoTypes) ProtoMessage() {} -func (*RepProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} } - -func (m *RepProtoTypes) GetNullableTimestamps() []*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepProtoTypes) GetNullableDurations() []*google_protobuf1.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepProtoTypes) GetTimestamps() []google_protobuf2.Timestamp { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepProtoTypes) GetDurations() []google_protobuf1.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type RepStdTypes struct { - NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` - NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` - Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` - Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` -} - -func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } -func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } -func (*RepStdTypes) ProtoMessage() {} -func (*RepStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} } - -func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepStdTypes) GetNullableDurations() []*time.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepStdTypes) GetTimestamps() []time.Time { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepStdTypes) GetDurations() []time.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type MapProtoTypes struct { - NullableTimestamp map[int32]*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]google_protobuf2.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*google_protobuf1.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]google_protobuf1.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } -func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } -func (*MapProtoTypes) ProtoMessage() {} -func (*MapProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} } - -func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapProtoTypes) GetTimestamp() map[int32]google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapProtoTypes) GetNullableDuration() map[int32]*google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapProtoTypes) GetDuration() map[int32]google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type MapStdTypes struct { - NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } -func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } -func (*MapStdTypes) ProtoMessage() {} -func (*MapStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} } - -func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapStdTypes) GetDuration() map[int32]time.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type OneofProtoTypes struct { - // Types that are valid to be assigned to OneOfProtoTimes: - // *OneofProtoTypes_Timestamp - // *OneofProtoTypes_Duration - OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` -} - -func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } -func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } -func (*OneofProtoTypes) ProtoMessage() {} -func (*OneofProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} } - -type isOneofProtoTypes_OneOfProtoTimes interface { - isOneofProtoTypes_OneOfProtoTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type OneofProtoTypes_Timestamp struct { - Timestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` -} -type OneofProtoTypes_Duration struct { - Duration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` -} - -func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} -func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} - -func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { - if m != nil { - return m.OneOfProtoTimes - } - return nil -} - -func (m *OneofProtoTypes) GetTimestamp() *google_protobuf2.Timestamp { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofProtoTypes) GetDuration() *google_protobuf1.Duration { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ - (*OneofProtoTypes_Timestamp)(nil), - (*OneofProtoTypes_Duration)(nil), - } -} - -func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timestamp); err != nil { - return err - } - case *OneofProtoTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Duration); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) - } - return nil -} - -func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofProtoTypes) - switch tag { - case 1: // OneOfProtoTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf2.Timestamp) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} - return true, err - case 2: // OneOfProtoTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf1.Duration) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} - return true, err - default: - return false, nil - } -} - -func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - s := proto.Size(x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofProtoTypes_Duration: - s := proto.Size(x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type OneofStdTypes struct { - // Types that are valid to be assigned to OneOfStdTimes: - // *OneofStdTypes_Timestamp - // *OneofStdTypes_Duration - OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` -} - -func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } -func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } -func (*OneofStdTypes) ProtoMessage() {} -func (*OneofStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} } - -type isOneofStdTypes_OneOfStdTimes interface { - isOneofStdTypes_OneOfStdTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - MarshalTo([]byte) (int, error) - Size() int -} - -type OneofStdTypes_Timestamp struct { - Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` -} -type OneofStdTypes_Duration struct { - Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` -} - -func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} -func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} - -func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { - if m != nil { - return m.OneOfStdTimes - } - return nil -} - -func (m *OneofStdTypes) GetTimestamp() *time.Time { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofStdTypes) GetDuration() *time.Duration { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ - (*OneofStdTypes_Timestamp)(nil), - (*OneofStdTypes_Duration)(nil), - } -} - -func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case *OneofStdTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) - } - return nil -} - -func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofStdTypes) - switch tag { - case 1: // OneOfStdTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Time) - if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} - return true, err - case 2: // OneOfStdTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Duration) - if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{c} - return true, err - default: - return false, nil - } -} - -func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofStdTypes_Duration: - s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") - proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") - proto.RegisterType((*StdTypes)(nil), "types.StdTypes") - proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") - proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") - proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") - proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") - proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") - proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") -} -func (this *KnownTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Dur.Compare(that1.Dur); c != 0 { - return c - } - if c := this.Ts.Compare(that1.Ts); c != 0 { - return c - } - if c := this.Dbl.Compare(that1.Dbl); c != 0 { - return c - } - if c := this.Flt.Compare(that1.Flt); c != 0 { - return c - } - if c := this.I64.Compare(that1.I64); c != 0 { - return c - } - if c := this.U64.Compare(that1.U64); c != 0 { - return c - } - if c := this.I32.Compare(that1.I32); c != 0 { - return c - } - if c := this.U32.Compare(that1.U32); c != 0 { - return c - } - if c := this.Bool.Compare(that1.Bool); c != 0 { - return c - } - if c := this.Str.Compare(that1.Str); c != 0 { - return c - } - if c := this.Bytes.Compare(that1.Bytes); c != 0 { - return c - } - return 0 -} -func (this *ProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { - return c - } - if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { - return c - } - if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { - return c - } - if c := this.Duration.Compare(&that1.Duration); c != 0 { - return c - } - return 0 -} -func (this *RepProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { - return -1 - } - return 1 - } - for i := range this.NullableTimestamps { - if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { - return c - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - if len(this.NullableDurations) < len(that1.NullableDurations) { - return -1 - } - return 1 - } - for i := range this.NullableDurations { - if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { - return c - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - if len(this.Timestamps) < len(that1.Timestamps) { - return -1 - } - return 1 - } - for i := range this.Timestamps { - if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { - return c - } - } - if len(this.Durations) != len(that1.Durations) { - if len(this.Durations) < len(that1.Durations) { - return -1 - } - return 1 - } - for i := range this.Durations { - if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { - return c - } - } - return 0 -} -func (this *KnownTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *KnownTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") - } - if !this.Dur.Equal(that1.Dur) { - return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) - } - if !this.Ts.Equal(that1.Ts) { - return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) - } - if !this.Dbl.Equal(that1.Dbl) { - return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) - } - if !this.Flt.Equal(that1.Flt) { - return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) - } - if !this.I64.Equal(that1.I64) { - return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) - } - if !this.U64.Equal(that1.U64) { - return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) - } - if !this.I32.Equal(that1.I32) { - return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) - } - if !this.U32.Equal(that1.U32) { - return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) - } - if !this.Bool.Equal(that1.Bool) { - return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) - } - if !this.Str.Equal(that1.Str) { - return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) - } - if !this.Bytes.Equal(that1.Bytes) { - return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) - } - return nil -} -func (this *KnownTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Dur.Equal(that1.Dur) { - return false - } - if !this.Ts.Equal(that1.Ts) { - return false - } - if !this.Dbl.Equal(that1.Dbl) { - return false - } - if !this.Flt.Equal(that1.Flt) { - return false - } - if !this.I64.Equal(that1.I64) { - return false - } - if !this.U64.Equal(that1.U64) { - return false - } - if !this.I32.Equal(that1.I32) { - return false - } - if !this.U32.Equal(that1.U32) { - return false - } - if !this.Bool.Equal(that1.Bool) { - return false - } - if !this.Str.Equal(that1.Str) { - return false - } - if !this.Bytes.Equal(that1.Bytes) { - return false - } - return true -} -func (this *ProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if !this.Duration.Equal(&that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *ProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return false - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return false - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return false - } - if !this.Duration.Equal(&that1.Duration) { - return false - } - return true -} -func (this *StdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *StdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *StdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) - } - } else if this.NullableDuration != nil { - return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") - } else if that1.NullableDuration != nil { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if this.Duration != that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *StdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return false - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return false - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return false - } - } else if this.NullableDuration != nil { - return false - } else if that1.NullableDuration != nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if this.Duration != that1.Duration { - return false - } - return true -} -func (this *RepProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return false - } - } - return true -} -func (this *RepStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return false - } - } - return true -} -func (this *MapProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return false - } - } - return true -} -func (this *MapStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return false - } - } - return true -} -func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") - } - } else if this.OneOfProtoTimes == nil { - return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") - } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { - return err - } - return nil -} -func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") - } - if !this.Duration.Equal(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return false - } - } else if this.OneOfProtoTimes == nil { - return false - } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { - return false - } - return true -} -func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - return true -} -func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Duration.Equal(that1.Duration) { - return false - } - return true -} -func (this *OneofStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") - } - } else if this.OneOfStdTimes == nil { - return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") - } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { - return err - } - return nil -} -func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) - } - } else if this.Duration != nil { - return fmt.Errorf("this.Duration == nil && that.Duration != nil") - } else if that1.Duration != nil { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return false - } - } else if this.OneOfStdTimes == nil { - return false - } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { - return false - } - return true -} -func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return false - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return false - } - return true -} -func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return false - } - } else if this.Duration != nil { - return false - } else if that1.Duration != nil { - return false - } - return true -} -func (m *KnownTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KnownTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Dur != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Dur.Size())) - n1, err := m.Dur.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Ts != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Ts.Size())) - n2, err := m.Ts.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.Dbl != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Dbl.Size())) - n3, err := m.Dbl.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Flt != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Flt.Size())) - n4, err := m.Flt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.I64 != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.I64.Size())) - n5, err := m.I64.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - if m.U64 != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.U64.Size())) - n6, err := m.U64.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.I32 != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.I32.Size())) - n7, err := m.I32.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.U32 != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.U32.Size())) - n8, err := m.U32.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.Bool != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Bool.Size())) - n9, err := m.Bool.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - if m.Str != nil { - dAtA[i] = 0x52 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Str.Size())) - n10, err := m.Str.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - if m.Bytes != nil { - dAtA[i] = 0x5a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Bytes.Size())) - n11, err := m.Bytes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - return i, nil -} - -func (m *ProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NullableTimestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.NullableTimestamp.Size())) - n12, err := m.NullableTimestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - if m.NullableDuration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.NullableDuration.Size())) - n13, err := m.NullableDuration.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - } - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) - n14, err := m.Timestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) - n15, err := m.Duration.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - return i, nil -} - -func (m *StdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.NullableTimestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*m.NullableTimestamp))) - n16, err := types1.StdTimeMarshalTo(*m.NullableTimestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - } - if m.NullableDuration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*m.NullableDuration))) - n17, err := types1.StdDurationMarshalTo(*m.NullableDuration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - } - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(m.Timestamp))) - n18, err := types1.StdTimeMarshalTo(m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(m.Duration))) - n19, err := types1.StdDurationMarshalTo(m.Duration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - return i, nil -} - -func (m *RepProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, msg := range m.NullableTimestamps { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NullableDurations) > 0 { - for _, msg := range m.NullableDurations { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Timestamps) > 0 { - for _, msg := range m.Timestamps { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Durations) > 0 { - for _, msg := range m.Durations { - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *RepStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, msg := range m.NullableTimestamps { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*msg))) - n, err := types1.StdTimeMarshalTo(*msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.NullableDurations) > 0 { - for _, msg := range m.NullableDurations { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*msg))) - n, err := types1.StdDurationMarshalTo(*msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Timestamps) > 0 { - for _, msg := range m.Timestamps { - dAtA[i] = 0x1a - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(msg))) - n, err := types1.StdTimeMarshalTo(msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Durations) > 0 { - for _, msg := range m.Durations { - dAtA[i] = 0x22 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(msg))) - n, err := types1.StdDurationMarshalTo(msg, dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *MapProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k := range m.NullableTimestamp { - dAtA[i] = 0xa - i++ - v := m.NullableTimestamp[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(v.Size())) - n20, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - } - } - } - if len(m.Timestamp) > 0 { - for k := range m.Timestamp { - dAtA[i] = 0x12 - i++ - v := m.Timestamp[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) - n21, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - } - } - if len(m.NullableDuration) > 0 { - for k := range m.NullableDuration { - dAtA[i] = 0x1a - i++ - v := m.NullableDuration[k] - msgSize := 0 - if v != nil { - msgSize = v.Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(v.Size())) - n22, err := v.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - } - } - } - if len(m.Duration) > 0 { - for k := range m.Duration { - dAtA[i] = 0x22 - i++ - v := m.Duration[k] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64((&v).Size())) - n23, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - } - return i, nil -} - -func (m *MapStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MapStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k := range m.NullableTimestamp { - dAtA[i] = 0xa - i++ - v := m.NullableTimestamp[k] - msgSize := 0 - if v != nil { - msgSize = types1.SizeOfStdTime(*v) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*v))) - n24, err := types1.StdTimeMarshalTo(*v, dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - } - } - if len(m.Timestamp) > 0 { - for k := range m.Timestamp { - dAtA[i] = 0x12 - i++ - v := m.Timestamp[k] - msgSize := 0 - if (&v) != nil { - msgSize = types1.SizeOfStdTime(*(&v)) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*(&v)))) - n25, err := types1.StdTimeMarshalTo(*(&v), dAtA[i:]) - if err != nil { - return 0, err - } - i += n25 - } - } - if len(m.NullableDuration) > 0 { - for k := range m.NullableDuration { - dAtA[i] = 0x1a - i++ - v := m.NullableDuration[k] - msgSize := 0 - if v != nil { - msgSize = types1.SizeOfStdDuration(*v) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - if v != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*v))) - n26, err := types1.StdDurationMarshalTo(*v, dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - } - } - } - if len(m.Duration) > 0 { - for k := range m.Duration { - dAtA[i] = 0x22 - i++ - v := m.Duration[k] - msgSize := 0 - if (&v) != nil { - msgSize = types1.SizeOfStdDuration(*(&v)) - msgSize += 1 + sovTypes(uint64(msgSize)) - } - mapSize := 1 + sovTypes(uint64(k)) + msgSize - i = encodeVarintTypes(dAtA, i, uint64(mapSize)) - dAtA[i] = 0x8 - i++ - i = encodeVarintTypes(dAtA, i, uint64(k)) - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*(&v)))) - n27, err := types1.StdDurationMarshalTo(*(&v), dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - } - return i, nil -} - -func (m *OneofProtoTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OneofProtoTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.OneOfProtoTimes != nil { - nn28, err := m.OneOfProtoTimes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn28 - } - return i, nil -} - -func (m *OneofProtoTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Timestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Timestamp.Size())) - n29, err := m.Timestamp.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n29 - } - return i, nil -} -func (m *OneofProtoTypes_Duration) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Duration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(m.Duration.Size())) - n30, err := m.Duration.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 - } - return i, nil -} -func (m *OneofStdTypes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OneofStdTypes) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.OneOfStdTimes != nil { - nn31, err := m.OneOfStdTimes.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += nn31 - } - return i, nil -} - -func (m *OneofStdTypes_Timestamp) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Timestamp != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdTime(*m.Timestamp))) - n32, err := types1.StdTimeMarshalTo(*m.Timestamp, dAtA[i:]) - if err != nil { - return 0, err - } - i += n32 - } - return i, nil -} -func (m *OneofStdTypes_Duration) MarshalTo(dAtA []byte) (int, error) { - i := 0 - if m.Duration != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintTypes(dAtA, i, uint64(types1.SizeOfStdDuration(*m.Duration))) - n33, err := types1.StdDurationMarshalTo(*m.Duration, dAtA[i:]) - if err != nil { - return 0, err - } - i += n33 - } - return i, nil -} -func encodeVarintTypes(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 NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { - this := &KnownTypes{} - if r.Intn(10) != 0 { - this.Dur = google_protobuf1.NewPopulatedDuration(r, easy) - } - if r.Intn(10) != 0 { - this.Ts = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.Dbl = google_protobuf3.NewPopulatedDoubleValue(r, easy) - } - if r.Intn(10) != 0 { - this.Flt = google_protobuf3.NewPopulatedFloatValue(r, easy) - } - if r.Intn(10) != 0 { - this.I64 = google_protobuf3.NewPopulatedInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.U64 = google_protobuf3.NewPopulatedUInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.I32 = google_protobuf3.NewPopulatedInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.U32 = google_protobuf3.NewPopulatedUInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.Bool = google_protobuf3.NewPopulatedBoolValue(r, easy) - } - if r.Intn(10) != 0 { - this.Str = google_protobuf3.NewPopulatedStringValue(r, easy) - } - if r.Intn(10) != 0 { - this.Bytes = google_protobuf3.NewPopulatedBytesValue(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { - this := &ProtoTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = google_protobuf1.NewPopulatedDuration(r, easy) - } - v1 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamp = *v1 - v2 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Duration = *v2 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { - this := &StdTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = types1.NewPopulatedStdTime(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = types1.NewPopulatedStdDuration(r, easy) - } - v3 := types1.NewPopulatedStdTime(r, easy) - this.Timestamp = *v3 - v4 := types1.NewPopulatedStdDuration(r, easy) - this.Duration = *v4 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { - this := &RepProtoTypes{} - if r.Intn(10) != 0 { - v5 := r.Intn(5) - this.NullableTimestamps = make([]*google_protobuf2.Timestamp, v5) - for i := 0; i < v5; i++ { - this.NullableTimestamps[i] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(5) - this.NullableDurations = make([]*google_protobuf1.Duration, v6) - for i := 0; i < v6; i++ { - this.NullableDurations[i] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(5) - this.Timestamps = make([]google_protobuf2.Timestamp, v7) - for i := 0; i < v7; i++ { - v8 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamps[i] = *v8 - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(5) - this.Durations = make([]google_protobuf1.Duration, v9) - for i := 0; i < v9; i++ { - v10 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Durations[i] = *v10 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { - this := &RepStdTypes{} - if r.Intn(10) != 0 { - v11 := r.Intn(5) - this.NullableTimestamps = make([]*time.Time, v11) - for i := 0; i < v11; i++ { - this.NullableTimestamps[i] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(5) - this.NullableDurations = make([]*time.Duration, v12) - for i := 0; i < v12; i++ { - this.NullableDurations[i] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(5) - this.Timestamps = make([]time.Time, v13) - for i := 0; i < v13; i++ { - v14 := types1.NewPopulatedStdTime(r, easy) - this.Timestamps[i] = *v14 - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(5) - this.Durations = make([]time.Duration, v15) - for i := 0; i < v15; i++ { - v16 := types1.NewPopulatedStdDuration(r, easy) - this.Durations[i] = *v16 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { - this := &MapProtoTypes{} - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*google_protobuf2.Timestamp) - for i := 0; i < v17; i++ { - this.NullableTimestamp[int32(r.Int31())] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Timestamp = make(map[int32]google_protobuf2.Timestamp) - for i := 0; i < v18; i++ { - this.Timestamp[int32(r.Int31())] = *google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.NullableDuration = make(map[int32]*google_protobuf1.Duration) - for i := 0; i < v19; i++ { - this.NullableDuration[int32(r.Int31())] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Duration = make(map[int32]google_protobuf1.Duration) - for i := 0; i < v20; i++ { - this.Duration[int32(r.Int31())] = *google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { - this := &MapStdTypes{} - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*time.Time) - for i := 0; i < v21; i++ { - this.NullableTimestamp[int32(r.Int31())] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Timestamp = make(map[int32]time.Time) - for i := 0; i < v22; i++ { - this.Timestamp[int32(r.Int31())] = *types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.NullableDuration = make(map[int32]*time.Duration) - for i := 0; i < v23; i++ { - this.NullableDuration[int32(r.Int31())] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Duration = make(map[int32]time.Duration) - for i := 0; i < v24; i++ { - this.Duration[int32(r.Int31())] = *types1.NewPopulatedStdDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { - this := &OneofProtoTypes{} - oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfProtoTimes { - case 1: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) - case 2: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { - this := &OneofProtoTypes_Timestamp{} - this.Timestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - return this -} -func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { - this := &OneofProtoTypes_Duration{} - this.Duration = google_protobuf1.NewPopulatedDuration(r, easy) - return this -} -func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { - this := &OneofStdTypes{} - oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfStdTimes { - case 1: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) - case 2: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { - this := &OneofStdTypes_Timestamp{} - this.Timestamp = types1.NewPopulatedStdTime(r, easy) - return this -} -func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { - this := &OneofStdTypes_Duration{} - this.Duration = types1.NewPopulatedStdDuration(r, easy) - return this -} - -type randyTypes interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypes(r randyTypes) 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 randStringTypes(r randyTypes) string { - v25 := r.Intn(100) - tmps := make([]rune, v25) - for i := 0; i < v25; i++ { - tmps[i] = randUTF8RuneTypes(r) - } - return string(tmps) -} -func randUnrecognizedTypes(r randyTypes, 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 = randFieldTypes(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v26 := r.Int63() - if r.Intn(2) == 0 { - v26 *= -1 - } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) - case 1: - dAtA = encodeVarintPopulateTypes(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 = encodeVarintPopulateTypes(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypes(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 encodeVarintPopulateTypes(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 *KnownTypes) Size() (n int) { - var l int - _ = l - if m.Dur != nil { - l = m.Dur.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Ts != nil { - l = m.Ts.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Dbl != nil { - l = m.Dbl.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Flt != nil { - l = m.Flt.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I64 != nil { - l = m.I64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U64 != nil { - l = m.U64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I32 != nil { - l = m.I32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U32 != nil { - l = m.U32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bool != nil { - l = m.Bool.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Str != nil { - l = m.Str.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bytes != nil { - l = m.Bytes.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ProtoTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = m.NullableTimestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = m.NullableDuration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *StdTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = types1.SizeOfStdTime(*m.NullableTimestamp) - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = types1.SizeOfStdDuration(*m.NullableDuration) - n += 1 + l + sovTypes(uint64(l)) - } - l = types1.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = types1.SizeOfStdDuration(m.Duration) - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *RepProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *RepStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = types1.SizeOfStdTime(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = types1.SizeOfStdDuration(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = types1.SizeOfStdTime(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = types1.SizeOfStdDuration(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *MapProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MapStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdTime(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = types1.SizeOfStdTime(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdDuration(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = types1.SizeOfStdDuration(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *OneofProtoTypes) Size() (n int) { - var l int - _ = l - if m.OneOfProtoTimes != nil { - n += m.OneOfProtoTimes.Size() - } - return n -} - -func (m *OneofProtoTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofProtoTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes) Size() (n int) { - var l int - _ = l - if m.OneOfStdTimes != nil { - n += m.OneOfStdTimes.Size() - } - return n -} - -func (m *OneofStdTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = types1.SizeOfStdTime(*m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = types1.SizeOfStdDuration(*m.Duration) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func init() { proto.RegisterFile("combos/marshaler/types.proto", fileDescriptorTypes) } - -var fileDescriptorTypes = []byte{ - // 927 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xdb, 0x54, - 0x18, 0x8d, 0x7f, 0x52, 0x32, 0x5f, 0x14, 0xda, 0x5a, 0x02, 0x99, 0x50, 0x39, 0x43, 0xd8, 0x0c, - 0xad, 0xea, 0x40, 0x12, 0x05, 0x34, 0xa8, 0x50, 0xac, 0x69, 0x3b, 0xa5, 0x9a, 0x4e, 0x95, 0x96, - 0x11, 0x20, 0x81, 0xb0, 0x1b, 0x27, 0x8d, 0x70, 0x7c, 0x23, 0xfb, 0x9a, 0x2a, 0x3b, 0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xe7, 0xfa, 0xbc, 0xcb, 0xd1, 0xcc, 0x6a, 0x71, 0x4e, 0xa3, 0xff, 0x1b, 0xfd, 0x1f, - 0x34, 0xfa, 0x1b, 0x01, 0xce, 0x1e, 0xbb, 0x36, 0x1a, 0xa7, 0x76, 0xf3, 0x7e, 0xba, 0x76, 0x6b, - 0x7f, 0x2f, 0x1d, 0x66, 0x76, 0xe6, 0x9b, 0xa9, 0x2e, 0xac, 0xf3, 0x71, 0x98, 0x5a, 0x67, 0xc6, - 0x79, 0xea, 0xe3, 0x98, 0xf9, 0x20, 0x7a, 0xed, 0x47, 0x02, 0x34, 0xa8, 0xb7, 0x78, 0xde, 0xae, - 0x6e, 0xe4, 0x2c, 0x1c, 0xac, 0xac, 0xbf, 0x2b, 0x1b, 0xf8, 0x0b, 0x0b, 0x9f, 0x71, 0x79, 0x96, - 0x3a, 0x3a, 0xa6, 0x8e, 0x88, 0xa6, 0xb1, 0xf7, 0xe4, 0xa9, 0x26, 0x3c, 0x7b, 0xaa, 0x09, 0xdf, - 0x2f, 0x35, 0xe1, 0xe7, 0xa5, 0x26, 0xfc, 0xb2, 0xd4, 0x84, 0xc7, 0x4b, 0x4d, 0xf8, 0x7d, 0xa9, - 0x55, 0x9e, 0x2c, 0x35, 0xe1, 0xd9, 0x52, 0xab, 0x7c, 0xf9, 0x97, 0x56, 0xb1, 0xce, 0x50, 0xfd, - 0xde, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x8a, 0x72, 0x25, 0x99, 0x0e, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto deleted file mode 100644 index 05cb95567..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types.proto +++ /dev/null @@ -1,131 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package types; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -//import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -//import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message KnownTypes { - option (gogoproto.compare) = true; - google.protobuf.Duration dur = 1; - google.protobuf.Timestamp ts = 2; - google.protobuf.DoubleValue dbl = 3; - google.protobuf.FloatValue flt = 4; - google.protobuf.Int64Value i64 = 5; - google.protobuf.UInt64Value u64 = 6; - google.protobuf.Int32Value i32 = 7; - google.protobuf.UInt32Value u32 = 8; - google.protobuf.BoolValue bool = 9; - google.protobuf.StringValue str = 10; - google.protobuf.BytesValue bytes = 11; - - // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed - // google.protobuf.Struct st = 12; - // google.protobuf.Any an = 14; -} - -message ProtoTypes { - // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare - option (gogoproto.compare) = true; - google.protobuf.Timestamp nullableTimestamp = 1; - google.protobuf.Duration nullableDuration = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; -} - -message StdTypes { - google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message RepProtoTypes { - option (gogoproto.compare) = true; - repeated google.protobuf.Timestamp nullableTimestamps = 1; - repeated google.protobuf.Duration nullableDurations = 2; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; -} - -message RepStdTypes { - repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; - repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message MapProtoTypes { - map nullableTimestamp = 1; - map timestamp = 2 [(gogoproto.nullable) = false]; - - map nullableDuration = 3; - map duration = 4 [(gogoproto.nullable) = false]; -} - -message MapStdTypes { - map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - map nullableDuration = 3 [(gogoproto.stdduration) = true]; - map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message OneofProtoTypes { - oneof OneOfProtoTimes { - google.protobuf.Timestamp timestamp = 1; - google.protobuf.Duration duration = 2; - } -} - -message OneofStdTypes { - oneof OneOfStdTimes { - google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go deleted file mode 100644 index 7d24f58e6..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/types_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 types - -import ( - math_rand "math/rand" - "testing" - "time" - - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -func TestFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go deleted file mode 100644 index 5a2bac94a..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/marshaler/typespb_test.go +++ /dev/null @@ -1,1984 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/marshaler/types.proto - -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - combos/marshaler/types.proto - -It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestKnownTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKnownTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkKnownTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKnownTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &KnownTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &StdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRepProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRepStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestMapStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOneofProtoTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOneofStdTypesMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKnownTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKnownTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedKnownTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestRepProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedRepProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestKnownTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKnownTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKnownTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go deleted file mode 100644 index d99edc8da..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.pb.go +++ /dev/null @@ -1,2651 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/types.proto - -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - combos/neither/types.proto - -It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import google_protobuf1 "github.com/gogo/protobuf/types" -import google_protobuf2 "github.com/gogo/protobuf/types" -import google_protobuf3 "github.com/gogo/protobuf/types" - -import time "time" -import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - -import types1 "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 KnownTypes struct { - Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` - Ts *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` - Dbl *google_protobuf3.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` - Flt *google_protobuf3.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` - I64 *google_protobuf3.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` - U64 *google_protobuf3.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` - I32 *google_protobuf3.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` - U32 *google_protobuf3.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` - Bool *google_protobuf3.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` - Str *google_protobuf3.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` - Bytes *google_protobuf3.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` -} - -func (m *KnownTypes) Reset() { *m = KnownTypes{} } -func (m *KnownTypes) String() string { return proto.CompactTextString(m) } -func (*KnownTypes) ProtoMessage() {} -func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } - -func (m *KnownTypes) GetDur() *google_protobuf1.Duration { - if m != nil { - return m.Dur - } - return nil -} - -func (m *KnownTypes) GetTs() *google_protobuf2.Timestamp { - if m != nil { - return m.Ts - } - return nil -} - -func (m *KnownTypes) GetDbl() *google_protobuf3.DoubleValue { - if m != nil { - return m.Dbl - } - return nil -} - -func (m *KnownTypes) GetFlt() *google_protobuf3.FloatValue { - if m != nil { - return m.Flt - } - return nil -} - -func (m *KnownTypes) GetI64() *google_protobuf3.Int64Value { - if m != nil { - return m.I64 - } - return nil -} - -func (m *KnownTypes) GetU64() *google_protobuf3.UInt64Value { - if m != nil { - return m.U64 - } - return nil -} - -func (m *KnownTypes) GetI32() *google_protobuf3.Int32Value { - if m != nil { - return m.I32 - } - return nil -} - -func (m *KnownTypes) GetU32() *google_protobuf3.UInt32Value { - if m != nil { - return m.U32 - } - return nil -} - -func (m *KnownTypes) GetBool() *google_protobuf3.BoolValue { - if m != nil { - return m.Bool - } - return nil -} - -func (m *KnownTypes) GetStr() *google_protobuf3.StringValue { - if m != nil { - return m.Str - } - return nil -} - -func (m *KnownTypes) GetBytes() *google_protobuf3.BytesValue { - if m != nil { - return m.Bytes - } - return nil -} - -type ProtoTypes struct { - NullableTimestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` - NullableDuration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` - Timestamp google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` - Duration google_protobuf1.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` -} - -func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } -func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } -func (*ProtoTypes) ProtoMessage() {} -func (*ProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } - -func (m *ProtoTypes) GetNullableTimestamp() *google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *ProtoTypes) GetNullableDuration() *google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *ProtoTypes) GetTimestamp() google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return google_protobuf2.Timestamp{} -} - -func (m *ProtoTypes) GetDuration() google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return google_protobuf1.Duration{} -} - -type StdTypes struct { - NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` - NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` - Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` -} - -func (m *StdTypes) Reset() { *m = StdTypes{} } -func (m *StdTypes) String() string { return proto.CompactTextString(m) } -func (*StdTypes) ProtoMessage() {} -func (*StdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } - -func (m *StdTypes) GetNullableTimestamp() *time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *StdTypes) GetNullableDuration() *time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *StdTypes) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *StdTypes) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -type RepProtoTypes struct { - NullableTimestamps []*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` - NullableDurations []*google_protobuf1.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` - Timestamps []google_protobuf2.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` - Durations []google_protobuf1.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` -} - -func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } -func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } -func (*RepProtoTypes) ProtoMessage() {} -func (*RepProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} } - -func (m *RepProtoTypes) GetNullableTimestamps() []*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepProtoTypes) GetNullableDurations() []*google_protobuf1.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepProtoTypes) GetTimestamps() []google_protobuf2.Timestamp { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepProtoTypes) GetDurations() []google_protobuf1.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type RepStdTypes struct { - NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` - NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` - Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` - Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` -} - -func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } -func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } -func (*RepStdTypes) ProtoMessage() {} -func (*RepStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} } - -func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepStdTypes) GetNullableDurations() []*time.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepStdTypes) GetTimestamps() []time.Time { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepStdTypes) GetDurations() []time.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type MapProtoTypes struct { - NullableTimestamp map[int32]*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]google_protobuf2.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*google_protobuf1.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]google_protobuf1.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } -func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } -func (*MapProtoTypes) ProtoMessage() {} -func (*MapProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} } - -func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapProtoTypes) GetTimestamp() map[int32]google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapProtoTypes) GetNullableDuration() map[int32]*google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapProtoTypes) GetDuration() map[int32]google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type MapStdTypes struct { - NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } -func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } -func (*MapStdTypes) ProtoMessage() {} -func (*MapStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} } - -func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapStdTypes) GetDuration() map[int32]time.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type OneofProtoTypes struct { - // Types that are valid to be assigned to OneOfProtoTimes: - // *OneofProtoTypes_Timestamp - // *OneofProtoTypes_Duration - OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` -} - -func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } -func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } -func (*OneofProtoTypes) ProtoMessage() {} -func (*OneofProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} } - -type isOneofProtoTypes_OneOfProtoTimes interface { - isOneofProtoTypes_OneOfProtoTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type OneofProtoTypes_Timestamp struct { - Timestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` -} -type OneofProtoTypes_Duration struct { - Duration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` -} - -func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} -func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} - -func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { - if m != nil { - return m.OneOfProtoTimes - } - return nil -} - -func (m *OneofProtoTypes) GetTimestamp() *google_protobuf2.Timestamp { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofProtoTypes) GetDuration() *google_protobuf1.Duration { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ - (*OneofProtoTypes_Timestamp)(nil), - (*OneofProtoTypes_Duration)(nil), - } -} - -func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timestamp); err != nil { - return err - } - case *OneofProtoTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Duration); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) - } - return nil -} - -func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofProtoTypes) - switch tag { - case 1: // OneOfProtoTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf2.Timestamp) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} - return true, err - case 2: // OneOfProtoTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf1.Duration) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} - return true, err - default: - return false, nil - } -} - -func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - s := proto.Size(x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofProtoTypes_Duration: - s := proto.Size(x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type OneofStdTypes struct { - // Types that are valid to be assigned to OneOfStdTimes: - // *OneofStdTypes_Timestamp - // *OneofStdTypes_Duration - OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` -} - -func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } -func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } -func (*OneofStdTypes) ProtoMessage() {} -func (*OneofStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} } - -type isOneofStdTypes_OneOfStdTimes interface { - isOneofStdTypes_OneOfStdTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type OneofStdTypes_Timestamp struct { - Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` -} -type OneofStdTypes_Duration struct { - Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` -} - -func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} -func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} - -func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { - if m != nil { - return m.OneOfStdTimes - } - return nil -} - -func (m *OneofStdTypes) GetTimestamp() *time.Time { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofStdTypes) GetDuration() *time.Duration { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ - (*OneofStdTypes_Timestamp)(nil), - (*OneofStdTypes_Duration)(nil), - } -} - -func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case *OneofStdTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) - } - return nil -} - -func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofStdTypes) - switch tag { - case 1: // OneOfStdTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Time) - if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} - return true, err - case 2: // OneOfStdTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Duration) - if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{c} - return true, err - default: - return false, nil - } -} - -func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofStdTypes_Duration: - s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") - proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") - proto.RegisterType((*StdTypes)(nil), "types.StdTypes") - proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") - proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") - proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") - proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") - proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") - proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") -} -func (this *KnownTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Dur.Compare(that1.Dur); c != 0 { - return c - } - if c := this.Ts.Compare(that1.Ts); c != 0 { - return c - } - if c := this.Dbl.Compare(that1.Dbl); c != 0 { - return c - } - if c := this.Flt.Compare(that1.Flt); c != 0 { - return c - } - if c := this.I64.Compare(that1.I64); c != 0 { - return c - } - if c := this.U64.Compare(that1.U64); c != 0 { - return c - } - if c := this.I32.Compare(that1.I32); c != 0 { - return c - } - if c := this.U32.Compare(that1.U32); c != 0 { - return c - } - if c := this.Bool.Compare(that1.Bool); c != 0 { - return c - } - if c := this.Str.Compare(that1.Str); c != 0 { - return c - } - if c := this.Bytes.Compare(that1.Bytes); c != 0 { - return c - } - return 0 -} -func (this *ProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { - return c - } - if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { - return c - } - if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { - return c - } - if c := this.Duration.Compare(&that1.Duration); c != 0 { - return c - } - return 0 -} -func (this *RepProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { - return -1 - } - return 1 - } - for i := range this.NullableTimestamps { - if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { - return c - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - if len(this.NullableDurations) < len(that1.NullableDurations) { - return -1 - } - return 1 - } - for i := range this.NullableDurations { - if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { - return c - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - if len(this.Timestamps) < len(that1.Timestamps) { - return -1 - } - return 1 - } - for i := range this.Timestamps { - if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { - return c - } - } - if len(this.Durations) != len(that1.Durations) { - if len(this.Durations) < len(that1.Durations) { - return -1 - } - return 1 - } - for i := range this.Durations { - if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { - return c - } - } - return 0 -} -func (this *KnownTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *KnownTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") - } - if !this.Dur.Equal(that1.Dur) { - return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) - } - if !this.Ts.Equal(that1.Ts) { - return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) - } - if !this.Dbl.Equal(that1.Dbl) { - return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) - } - if !this.Flt.Equal(that1.Flt) { - return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) - } - if !this.I64.Equal(that1.I64) { - return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) - } - if !this.U64.Equal(that1.U64) { - return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) - } - if !this.I32.Equal(that1.I32) { - return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) - } - if !this.U32.Equal(that1.U32) { - return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) - } - if !this.Bool.Equal(that1.Bool) { - return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) - } - if !this.Str.Equal(that1.Str) { - return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) - } - if !this.Bytes.Equal(that1.Bytes) { - return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) - } - return nil -} -func (this *KnownTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Dur.Equal(that1.Dur) { - return false - } - if !this.Ts.Equal(that1.Ts) { - return false - } - if !this.Dbl.Equal(that1.Dbl) { - return false - } - if !this.Flt.Equal(that1.Flt) { - return false - } - if !this.I64.Equal(that1.I64) { - return false - } - if !this.U64.Equal(that1.U64) { - return false - } - if !this.I32.Equal(that1.I32) { - return false - } - if !this.U32.Equal(that1.U32) { - return false - } - if !this.Bool.Equal(that1.Bool) { - return false - } - if !this.Str.Equal(that1.Str) { - return false - } - if !this.Bytes.Equal(that1.Bytes) { - return false - } - return true -} -func (this *ProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if !this.Duration.Equal(&that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *ProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return false - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return false - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return false - } - if !this.Duration.Equal(&that1.Duration) { - return false - } - return true -} -func (this *StdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *StdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *StdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) - } - } else if this.NullableDuration != nil { - return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") - } else if that1.NullableDuration != nil { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if this.Duration != that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *StdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return false - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return false - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return false - } - } else if this.NullableDuration != nil { - return false - } else if that1.NullableDuration != nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if this.Duration != that1.Duration { - return false - } - return true -} -func (this *RepProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return false - } - } - return true -} -func (this *RepStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return false - } - } - return true -} -func (this *MapProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return false - } - } - return true -} -func (this *MapStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return false - } - } - return true -} -func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") - } - } else if this.OneOfProtoTimes == nil { - return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") - } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { - return err - } - return nil -} -func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") - } - if !this.Duration.Equal(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return false - } - } else if this.OneOfProtoTimes == nil { - return false - } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { - return false - } - return true -} -func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - return true -} -func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Duration.Equal(that1.Duration) { - return false - } - return true -} -func (this *OneofStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") - } - } else if this.OneOfStdTimes == nil { - return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") - } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { - return err - } - return nil -} -func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) - } - } else if this.Duration != nil { - return fmt.Errorf("this.Duration == nil && that.Duration != nil") - } else if that1.Duration != nil { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return false - } - } else if this.OneOfStdTimes == nil { - return false - } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { - return false - } - return true -} -func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return false - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return false - } - return true -} -func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return false - } - } else if this.Duration != nil { - return false - } else if that1.Duration != nil { - return false - } - return true -} -func NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { - this := &KnownTypes{} - if r.Intn(10) != 0 { - this.Dur = google_protobuf1.NewPopulatedDuration(r, easy) - } - if r.Intn(10) != 0 { - this.Ts = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.Dbl = google_protobuf3.NewPopulatedDoubleValue(r, easy) - } - if r.Intn(10) != 0 { - this.Flt = google_protobuf3.NewPopulatedFloatValue(r, easy) - } - if r.Intn(10) != 0 { - this.I64 = google_protobuf3.NewPopulatedInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.U64 = google_protobuf3.NewPopulatedUInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.I32 = google_protobuf3.NewPopulatedInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.U32 = google_protobuf3.NewPopulatedUInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.Bool = google_protobuf3.NewPopulatedBoolValue(r, easy) - } - if r.Intn(10) != 0 { - this.Str = google_protobuf3.NewPopulatedStringValue(r, easy) - } - if r.Intn(10) != 0 { - this.Bytes = google_protobuf3.NewPopulatedBytesValue(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { - this := &ProtoTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = google_protobuf1.NewPopulatedDuration(r, easy) - } - v1 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamp = *v1 - v2 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Duration = *v2 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { - this := &StdTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = types1.NewPopulatedStdTime(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = types1.NewPopulatedStdDuration(r, easy) - } - v3 := types1.NewPopulatedStdTime(r, easy) - this.Timestamp = *v3 - v4 := types1.NewPopulatedStdDuration(r, easy) - this.Duration = *v4 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { - this := &RepProtoTypes{} - if r.Intn(10) != 0 { - v5 := r.Intn(5) - this.NullableTimestamps = make([]*google_protobuf2.Timestamp, v5) - for i := 0; i < v5; i++ { - this.NullableTimestamps[i] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(5) - this.NullableDurations = make([]*google_protobuf1.Duration, v6) - for i := 0; i < v6; i++ { - this.NullableDurations[i] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(5) - this.Timestamps = make([]google_protobuf2.Timestamp, v7) - for i := 0; i < v7; i++ { - v8 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamps[i] = *v8 - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(5) - this.Durations = make([]google_protobuf1.Duration, v9) - for i := 0; i < v9; i++ { - v10 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Durations[i] = *v10 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { - this := &RepStdTypes{} - if r.Intn(10) != 0 { - v11 := r.Intn(5) - this.NullableTimestamps = make([]*time.Time, v11) - for i := 0; i < v11; i++ { - this.NullableTimestamps[i] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(5) - this.NullableDurations = make([]*time.Duration, v12) - for i := 0; i < v12; i++ { - this.NullableDurations[i] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(5) - this.Timestamps = make([]time.Time, v13) - for i := 0; i < v13; i++ { - v14 := types1.NewPopulatedStdTime(r, easy) - this.Timestamps[i] = *v14 - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(5) - this.Durations = make([]time.Duration, v15) - for i := 0; i < v15; i++ { - v16 := types1.NewPopulatedStdDuration(r, easy) - this.Durations[i] = *v16 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { - this := &MapProtoTypes{} - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*google_protobuf2.Timestamp) - for i := 0; i < v17; i++ { - this.NullableTimestamp[int32(r.Int31())] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Timestamp = make(map[int32]google_protobuf2.Timestamp) - for i := 0; i < v18; i++ { - this.Timestamp[int32(r.Int31())] = *google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.NullableDuration = make(map[int32]*google_protobuf1.Duration) - for i := 0; i < v19; i++ { - this.NullableDuration[int32(r.Int31())] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Duration = make(map[int32]google_protobuf1.Duration) - for i := 0; i < v20; i++ { - this.Duration[int32(r.Int31())] = *google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { - this := &MapStdTypes{} - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*time.Time) - for i := 0; i < v21; i++ { - this.NullableTimestamp[int32(r.Int31())] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Timestamp = make(map[int32]time.Time) - for i := 0; i < v22; i++ { - this.Timestamp[int32(r.Int31())] = *types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.NullableDuration = make(map[int32]*time.Duration) - for i := 0; i < v23; i++ { - this.NullableDuration[int32(r.Int31())] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Duration = make(map[int32]time.Duration) - for i := 0; i < v24; i++ { - this.Duration[int32(r.Int31())] = *types1.NewPopulatedStdDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { - this := &OneofProtoTypes{} - oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfProtoTimes { - case 1: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) - case 2: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { - this := &OneofProtoTypes_Timestamp{} - this.Timestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - return this -} -func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { - this := &OneofProtoTypes_Duration{} - this.Duration = google_protobuf1.NewPopulatedDuration(r, easy) - return this -} -func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { - this := &OneofStdTypes{} - oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfStdTimes { - case 1: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) - case 2: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { - this := &OneofStdTypes_Timestamp{} - this.Timestamp = types1.NewPopulatedStdTime(r, easy) - return this -} -func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { - this := &OneofStdTypes_Duration{} - this.Duration = types1.NewPopulatedStdDuration(r, easy) - return this -} - -type randyTypes interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypes(r randyTypes) 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 randStringTypes(r randyTypes) string { - v25 := r.Intn(100) - tmps := make([]rune, v25) - for i := 0; i < v25; i++ { - tmps[i] = randUTF8RuneTypes(r) - } - return string(tmps) -} -func randUnrecognizedTypes(r randyTypes, 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 = randFieldTypes(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v26 := r.Int63() - if r.Intn(2) == 0 { - v26 *= -1 - } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) - case 1: - dAtA = encodeVarintPopulateTypes(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 = encodeVarintPopulateTypes(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypes(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 encodeVarintPopulateTypes(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 *KnownTypes) Size() (n int) { - var l int - _ = l - if m.Dur != nil { - l = m.Dur.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Ts != nil { - l = m.Ts.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Dbl != nil { - l = m.Dbl.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Flt != nil { - l = m.Flt.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I64 != nil { - l = m.I64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U64 != nil { - l = m.U64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I32 != nil { - l = m.I32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U32 != nil { - l = m.U32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bool != nil { - l = m.Bool.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Str != nil { - l = m.Str.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bytes != nil { - l = m.Bytes.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ProtoTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = m.NullableTimestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = m.NullableDuration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *StdTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = types1.SizeOfStdTime(*m.NullableTimestamp) - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = types1.SizeOfStdDuration(*m.NullableDuration) - n += 1 + l + sovTypes(uint64(l)) - } - l = types1.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = types1.SizeOfStdDuration(m.Duration) - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *RepProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *RepStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = types1.SizeOfStdTime(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = types1.SizeOfStdDuration(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = types1.SizeOfStdTime(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = types1.SizeOfStdDuration(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *MapProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MapStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdTime(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = types1.SizeOfStdTime(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdDuration(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = types1.SizeOfStdDuration(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *OneofProtoTypes) Size() (n int) { - var l int - _ = l - if m.OneOfProtoTimes != nil { - n += m.OneOfProtoTimes.Size() - } - return n -} - -func (m *OneofProtoTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofProtoTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes) Size() (n int) { - var l int - _ = l - if m.OneOfStdTimes != nil { - n += m.OneOfStdTimes.Size() - } - return n -} - -func (m *OneofStdTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = types1.SizeOfStdTime(*m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = types1.SizeOfStdDuration(*m.Duration) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -func init() { proto.RegisterFile("combos/neither/types.proto", fileDescriptorTypes) } - -var fileDescriptorTypes = []byte{ - // 925 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xdb, 0x54, - 0x18, 0x8d, 0x7f, 0x52, 0x32, 0x5f, 0x14, 0xda, 0x5a, 0x02, 0x99, 0x80, 0x9c, 0x21, 0x6c, 0x86, - 0x56, 0x75, 0x20, 0x89, 0x02, 0x1a, 0x54, 0x28, 0xd6, 0xb4, 0x9d, 0x52, 0x4d, 0xa7, 0x4a, 0xcb, - 0x08, 0x90, 0x40, 0xd8, 0x8d, 0x93, 0x46, 0x38, 0xbe, 0x91, 0x7d, 0x4d, 0x95, 0x1d, 0x8f, 0xc0, - 0x12, 0xc4, 0x86, 0xee, 0x90, 0x60, 0x0f, 0x4b, 0x36, 0x48, 0xdd, 0xc1, 0x13, 0x40, 0x1b, 0x36, - 0x3c, 0x42, 0x97, 0xe8, 0x5e, 0x5f, 0xff, 0xc5, 0xd7, 0x0e, 0x89, 0x34, 0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c, 0xb7, 0x52, 0x5d, 0x58, 0xe7, 0xe3, 0x30, 0xb5, 0xce, 0x8c, 0xf3, 0xd4, - 0xc7, 0x31, 0xf3, 0x41, 0xf4, 0xda, 0x0f, 0x05, 0x68, 0x50, 0x6f, 0xf1, 0xbc, 0x5d, 0xd9, 0xc8, - 0x59, 0x38, 0x58, 0x59, 0x7f, 0x97, 0x37, 0xf0, 0x17, 0x16, 0x3e, 0xe3, 0xf2, 0x2c, 0x75, 0x74, - 0x4c, 0x1d, 0x11, 0x4d, 0x63, 0xef, 0xf1, 0x13, 0x4d, 0x78, 0xfa, 0x44, 0x13, 0x7e, 0x58, 0x6a, - 0xc2, 0x2f, 0x4b, 0x4d, 0xf8, 0x75, 0xa9, 0x09, 0x8f, 0x96, 0x5a, 0xe5, 0x8f, 0xa5, 0x56, 0x79, - 0xbc, 0xd4, 0x84, 0xa7, 0x4b, 0xad, 0xf2, 0xd5, 0xdf, 0x5a, 0xc5, 0x3a, 0x43, 0xf5, 0x7b, 0xff, - 0x06, 0x00, 0x00, 0xff, 0xff, 0x72, 0x11, 0x02, 0x8e, 0x97, 0x0e, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto deleted file mode 100644 index 3c26fae20..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types.proto +++ /dev/null @@ -1,131 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package types; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -//import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -//import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message KnownTypes { - option (gogoproto.compare) = true; - google.protobuf.Duration dur = 1; - google.protobuf.Timestamp ts = 2; - google.protobuf.DoubleValue dbl = 3; - google.protobuf.FloatValue flt = 4; - google.protobuf.Int64Value i64 = 5; - google.protobuf.UInt64Value u64 = 6; - google.protobuf.Int32Value i32 = 7; - google.protobuf.UInt32Value u32 = 8; - google.protobuf.BoolValue bool = 9; - google.protobuf.StringValue str = 10; - google.protobuf.BytesValue bytes = 11; - - // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed - // google.protobuf.Struct st = 12; - // google.protobuf.Any an = 14; -} - -message ProtoTypes { - // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare - option (gogoproto.compare) = true; - google.protobuf.Timestamp nullableTimestamp = 1; - google.protobuf.Duration nullableDuration = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; -} - -message StdTypes { - google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message RepProtoTypes { - option (gogoproto.compare) = true; - repeated google.protobuf.Timestamp nullableTimestamps = 1; - repeated google.protobuf.Duration nullableDurations = 2; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; -} - -message RepStdTypes { - repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; - repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message MapProtoTypes { - map nullableTimestamp = 1; - map timestamp = 2 [(gogoproto.nullable) = false]; - - map nullableDuration = 3; - map duration = 4 [(gogoproto.nullable) = false]; -} - -message MapStdTypes { - map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - map nullableDuration = 3 [(gogoproto.stdduration) = true]; - map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message OneofProtoTypes { - oneof OneOfProtoTimes { - google.protobuf.Timestamp timestamp = 1; - google.protobuf.Duration duration = 2; - } -} - -message OneofStdTypes { - oneof OneOfStdTimes { - google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go deleted file mode 100644 index 7d24f58e6..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/neither/types_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 types - -import ( - math_rand "math/rand" - "testing" - "time" - - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -func TestFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go deleted file mode 100644 index 5b1edbb28..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/neither/typespb_test.go +++ /dev/null @@ -1,1732 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/neither/types.proto - -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - combos/neither/types.proto - -It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestKnownTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkKnownTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKnownTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &KnownTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &StdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKnownTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKnownTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedKnownTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestRepProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedRepProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestKnownTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKnownTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKnownTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go deleted file mode 100644 index 9cfd2a84c..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.pb.go +++ /dev/null @@ -1,5090 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/types.proto - -/* - Package types is a generated protocol buffer package. - - It is generated from these files: - combos/unmarshaler/types.proto - - It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import proto "github.com/gogo/protobuf/proto" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import google_protobuf1 "github.com/gogo/protobuf/types" -import google_protobuf2 "github.com/gogo/protobuf/types" -import google_protobuf3 "github.com/gogo/protobuf/types" - -import time "time" -import github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - -import types1 "github.com/gogo/protobuf/types" - -import io "io" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// 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 KnownTypes struct { - Dur *google_protobuf1.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` - Ts *google_protobuf2.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` - Dbl *google_protobuf3.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` - Flt *google_protobuf3.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` - I64 *google_protobuf3.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` - U64 *google_protobuf3.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` - I32 *google_protobuf3.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` - U32 *google_protobuf3.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` - Bool *google_protobuf3.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` - Str *google_protobuf3.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` - Bytes *google_protobuf3.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` -} - -func (m *KnownTypes) Reset() { *m = KnownTypes{} } -func (m *KnownTypes) String() string { return proto.CompactTextString(m) } -func (*KnownTypes) ProtoMessage() {} -func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{0} } - -func (m *KnownTypes) GetDur() *google_protobuf1.Duration { - if m != nil { - return m.Dur - } - return nil -} - -func (m *KnownTypes) GetTs() *google_protobuf2.Timestamp { - if m != nil { - return m.Ts - } - return nil -} - -func (m *KnownTypes) GetDbl() *google_protobuf3.DoubleValue { - if m != nil { - return m.Dbl - } - return nil -} - -func (m *KnownTypes) GetFlt() *google_protobuf3.FloatValue { - if m != nil { - return m.Flt - } - return nil -} - -func (m *KnownTypes) GetI64() *google_protobuf3.Int64Value { - if m != nil { - return m.I64 - } - return nil -} - -func (m *KnownTypes) GetU64() *google_protobuf3.UInt64Value { - if m != nil { - return m.U64 - } - return nil -} - -func (m *KnownTypes) GetI32() *google_protobuf3.Int32Value { - if m != nil { - return m.I32 - } - return nil -} - -func (m *KnownTypes) GetU32() *google_protobuf3.UInt32Value { - if m != nil { - return m.U32 - } - return nil -} - -func (m *KnownTypes) GetBool() *google_protobuf3.BoolValue { - if m != nil { - return m.Bool - } - return nil -} - -func (m *KnownTypes) GetStr() *google_protobuf3.StringValue { - if m != nil { - return m.Str - } - return nil -} - -func (m *KnownTypes) GetBytes() *google_protobuf3.BytesValue { - if m != nil { - return m.Bytes - } - return nil -} - -type ProtoTypes struct { - NullableTimestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=nullableTimestamp" json:"nullableTimestamp,omitempty"` - NullableDuration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=nullableDuration" json:"nullableDuration,omitempty"` - Timestamp google_protobuf2.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp"` - Duration google_protobuf1.Duration `protobuf:"bytes,4,opt,name=duration" json:"duration"` -} - -func (m *ProtoTypes) Reset() { *m = ProtoTypes{} } -func (m *ProtoTypes) String() string { return proto.CompactTextString(m) } -func (*ProtoTypes) ProtoMessage() {} -func (*ProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{1} } - -func (m *ProtoTypes) GetNullableTimestamp() *google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *ProtoTypes) GetNullableDuration() *google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *ProtoTypes) GetTimestamp() google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return google_protobuf2.Timestamp{} -} - -func (m *ProtoTypes) GetDuration() google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return google_protobuf1.Duration{} -} - -type StdTypes struct { - NullableTimestamp *time.Time `protobuf:"bytes,1,opt,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty"` - NullableDuration *time.Duration `protobuf:"bytes,2,opt,name=nullableDuration,stdduration" json:"nullableDuration,omitempty"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,stdtime" json:"timestamp"` - Duration time.Duration `protobuf:"bytes,4,opt,name=duration,stdduration" json:"duration"` -} - -func (m *StdTypes) Reset() { *m = StdTypes{} } -func (m *StdTypes) String() string { return proto.CompactTextString(m) } -func (*StdTypes) ProtoMessage() {} -func (*StdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{2} } - -func (m *StdTypes) GetNullableTimestamp() *time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *StdTypes) GetNullableDuration() *time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *StdTypes) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -func (m *StdTypes) GetDuration() time.Duration { - if m != nil { - return m.Duration - } - return 0 -} - -type RepProtoTypes struct { - NullableTimestamps []*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamps" json:"nullableTimestamps,omitempty"` - NullableDurations []*google_protobuf1.Duration `protobuf:"bytes,2,rep,name=nullableDurations" json:"nullableDurations,omitempty"` - Timestamps []google_protobuf2.Timestamp `protobuf:"bytes,3,rep,name=timestamps" json:"timestamps"` - Durations []google_protobuf1.Duration `protobuf:"bytes,4,rep,name=durations" json:"durations"` -} - -func (m *RepProtoTypes) Reset() { *m = RepProtoTypes{} } -func (m *RepProtoTypes) String() string { return proto.CompactTextString(m) } -func (*RepProtoTypes) ProtoMessage() {} -func (*RepProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{3} } - -func (m *RepProtoTypes) GetNullableTimestamps() []*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepProtoTypes) GetNullableDurations() []*google_protobuf1.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepProtoTypes) GetTimestamps() []google_protobuf2.Timestamp { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepProtoTypes) GetDurations() []google_protobuf1.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type RepStdTypes struct { - NullableTimestamps []*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamps,stdtime" json:"nullableTimestamps,omitempty"` - NullableDurations []*time.Duration `protobuf:"bytes,2,rep,name=nullableDurations,stdduration" json:"nullableDurations,omitempty"` - Timestamps []time.Time `protobuf:"bytes,3,rep,name=timestamps,stdtime" json:"timestamps"` - Durations []time.Duration `protobuf:"bytes,4,rep,name=durations,stdduration" json:"durations"` -} - -func (m *RepStdTypes) Reset() { *m = RepStdTypes{} } -func (m *RepStdTypes) String() string { return proto.CompactTextString(m) } -func (*RepStdTypes) ProtoMessage() {} -func (*RepStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{4} } - -func (m *RepStdTypes) GetNullableTimestamps() []*time.Time { - if m != nil { - return m.NullableTimestamps - } - return nil -} - -func (m *RepStdTypes) GetNullableDurations() []*time.Duration { - if m != nil { - return m.NullableDurations - } - return nil -} - -func (m *RepStdTypes) GetTimestamps() []time.Time { - if m != nil { - return m.Timestamps - } - return nil -} - -func (m *RepStdTypes) GetDurations() []time.Duration { - if m != nil { - return m.Durations - } - return nil -} - -type MapProtoTypes struct { - NullableTimestamp map[int32]*google_protobuf2.Timestamp `protobuf:"bytes,1,rep,name=nullableTimestamp" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]google_protobuf2.Timestamp `protobuf:"bytes,2,rep,name=timestamp" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*google_protobuf1.Duration `protobuf:"bytes,3,rep,name=nullableDuration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]google_protobuf1.Duration `protobuf:"bytes,4,rep,name=duration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapProtoTypes) Reset() { *m = MapProtoTypes{} } -func (m *MapProtoTypes) String() string { return proto.CompactTextString(m) } -func (*MapProtoTypes) ProtoMessage() {} -func (*MapProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{5} } - -func (m *MapProtoTypes) GetNullableTimestamp() map[int32]*google_protobuf2.Timestamp { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapProtoTypes) GetTimestamp() map[int32]google_protobuf2.Timestamp { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapProtoTypes) GetNullableDuration() map[int32]*google_protobuf1.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapProtoTypes) GetDuration() map[int32]google_protobuf1.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type MapStdTypes struct { - NullableTimestamp map[int32]*time.Time `protobuf:"bytes,1,rep,name=nullableTimestamp,stdtime" json:"nullableTimestamp,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Timestamp map[int32]time.Time `protobuf:"bytes,2,rep,name=timestamp,stdtime" json:"timestamp" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - NullableDuration map[int32]*time.Duration `protobuf:"bytes,3,rep,name=nullableDuration,stdduration" json:"nullableDuration,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` - Duration map[int32]time.Duration `protobuf:"bytes,4,rep,name=duration,stdduration" json:"duration" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"` -} - -func (m *MapStdTypes) Reset() { *m = MapStdTypes{} } -func (m *MapStdTypes) String() string { return proto.CompactTextString(m) } -func (*MapStdTypes) ProtoMessage() {} -func (*MapStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{6} } - -func (m *MapStdTypes) GetNullableTimestamp() map[int32]*time.Time { - if m != nil { - return m.NullableTimestamp - } - return nil -} - -func (m *MapStdTypes) GetTimestamp() map[int32]time.Time { - if m != nil { - return m.Timestamp - } - return nil -} - -func (m *MapStdTypes) GetNullableDuration() map[int32]*time.Duration { - if m != nil { - return m.NullableDuration - } - return nil -} - -func (m *MapStdTypes) GetDuration() map[int32]time.Duration { - if m != nil { - return m.Duration - } - return nil -} - -type OneofProtoTypes struct { - // Types that are valid to be assigned to OneOfProtoTimes: - // *OneofProtoTypes_Timestamp - // *OneofProtoTypes_Duration - OneOfProtoTimes isOneofProtoTypes_OneOfProtoTimes `protobuf_oneof:"OneOfProtoTimes"` -} - -func (m *OneofProtoTypes) Reset() { *m = OneofProtoTypes{} } -func (m *OneofProtoTypes) String() string { return proto.CompactTextString(m) } -func (*OneofProtoTypes) ProtoMessage() {} -func (*OneofProtoTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{7} } - -type isOneofProtoTypes_OneOfProtoTimes interface { - isOneofProtoTypes_OneOfProtoTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type OneofProtoTypes_Timestamp struct { - Timestamp *google_protobuf2.Timestamp `protobuf:"bytes,1,opt,name=timestamp,oneof"` -} -type OneofProtoTypes_Duration struct { - Duration *google_protobuf1.Duration `protobuf:"bytes,2,opt,name=duration,oneof"` -} - -func (*OneofProtoTypes_Timestamp) isOneofProtoTypes_OneOfProtoTimes() {} -func (*OneofProtoTypes_Duration) isOneofProtoTypes_OneOfProtoTimes() {} - -func (m *OneofProtoTypes) GetOneOfProtoTimes() isOneofProtoTypes_OneOfProtoTimes { - if m != nil { - return m.OneOfProtoTimes - } - return nil -} - -func (m *OneofProtoTypes) GetTimestamp() *google_protobuf2.Timestamp { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofProtoTypes) GetDuration() *google_protobuf1.Duration { - if x, ok := m.GetOneOfProtoTimes().(*OneofProtoTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofProtoTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofProtoTypes_OneofMarshaler, _OneofProtoTypes_OneofUnmarshaler, _OneofProtoTypes_OneofSizer, []interface{}{ - (*OneofProtoTypes_Timestamp)(nil), - (*OneofProtoTypes_Duration)(nil), - } -} - -func _OneofProtoTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timestamp); err != nil { - return err - } - case *OneofProtoTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Duration); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofProtoTypes.OneOfProtoTimes has unexpected type %T", x) - } - return nil -} - -func _OneofProtoTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofProtoTypes) - switch tag { - case 1: // OneOfProtoTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf2.Timestamp) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{msg} - return true, err - case 2: // OneOfProtoTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(google_protobuf1.Duration) - err := b.DecodeMessage(msg) - m.OneOfProtoTimes = &OneofProtoTypes_Duration{msg} - return true, err - default: - return false, nil - } -} - -func _OneofProtoTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofProtoTypes) - // OneOfProtoTimes - switch x := m.OneOfProtoTimes.(type) { - case *OneofProtoTypes_Timestamp: - s := proto.Size(x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofProtoTypes_Duration: - s := proto.Size(x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -type OneofStdTypes struct { - // Types that are valid to be assigned to OneOfStdTimes: - // *OneofStdTypes_Timestamp - // *OneofStdTypes_Duration - OneOfStdTimes isOneofStdTypes_OneOfStdTimes `protobuf_oneof:"OneOfStdTimes"` -} - -func (m *OneofStdTypes) Reset() { *m = OneofStdTypes{} } -func (m *OneofStdTypes) String() string { return proto.CompactTextString(m) } -func (*OneofStdTypes) ProtoMessage() {} -func (*OneofStdTypes) Descriptor() ([]byte, []int) { return fileDescriptorTypes, []int{8} } - -type isOneofStdTypes_OneOfStdTimes interface { - isOneofStdTypes_OneOfStdTimes() - Equal(interface{}) bool - VerboseEqual(interface{}) error - Size() int -} - -type OneofStdTypes_Timestamp struct { - Timestamp *time.Time `protobuf:"bytes,1,opt,name=timestamp,oneof,stdtime"` -} -type OneofStdTypes_Duration struct { - Duration *time.Duration `protobuf:"bytes,2,opt,name=duration,oneof,stdduration"` -} - -func (*OneofStdTypes_Timestamp) isOneofStdTypes_OneOfStdTimes() {} -func (*OneofStdTypes_Duration) isOneofStdTypes_OneOfStdTimes() {} - -func (m *OneofStdTypes) GetOneOfStdTimes() isOneofStdTypes_OneOfStdTimes { - if m != nil { - return m.OneOfStdTimes - } - return nil -} - -func (m *OneofStdTypes) GetTimestamp() *time.Time { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Timestamp); ok { - return x.Timestamp - } - return nil -} - -func (m *OneofStdTypes) GetDuration() *time.Duration { - if x, ok := m.GetOneOfStdTimes().(*OneofStdTypes_Duration); ok { - return x.Duration - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*OneofStdTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _OneofStdTypes_OneofMarshaler, _OneofStdTypes_OneofUnmarshaler, _OneofStdTypes_OneofSizer, []interface{}{ - (*OneofStdTypes_Timestamp)(nil), - (*OneofStdTypes_Duration)(nil), - } -} - -func _OneofStdTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - _ = b.EncodeVarint(1<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdTimeMarshal(*x.Timestamp) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case *OneofStdTypes_Duration: - _ = b.EncodeVarint(2<<3 | proto.WireBytes) - dAtA, err := github_com_gogo_protobuf_types.StdDurationMarshal(*x.Duration) - if err != nil { - return err - } - if err := b.EncodeRawBytes(dAtA); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("OneofStdTypes.OneOfStdTimes has unexpected type %T", x) - } - return nil -} - -func _OneofStdTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*OneofStdTypes) - switch tag { - case 1: // OneOfStdTimes.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Time) - if err2 := github_com_gogo_protobuf_types.StdTimeUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{c} - return true, err - case 2: // OneOfStdTimes.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeRawBytes(true) - if err != nil { - return true, err - } - c := new(time.Duration) - if err2 := github_com_gogo_protobuf_types.StdDurationUnmarshal(c, x); err2 != nil { - return true, err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{c} - return true, err - default: - return false, nil - } -} - -func _OneofStdTypes_OneofSizer(msg proto.Message) (n int) { - m := msg.(*OneofStdTypes) - // OneOfStdTimes - switch x := m.OneOfStdTimes.(type) { - case *OneofStdTypes_Timestamp: - s := github_com_gogo_protobuf_types.SizeOfStdTime(*x.Timestamp) - n += proto.SizeVarint(1<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *OneofStdTypes_Duration: - s := github_com_gogo_protobuf_types.SizeOfStdDuration(*x.Duration) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - -func init() { - proto.RegisterType((*KnownTypes)(nil), "types.KnownTypes") - proto.RegisterType((*ProtoTypes)(nil), "types.ProtoTypes") - proto.RegisterType((*StdTypes)(nil), "types.StdTypes") - proto.RegisterType((*RepProtoTypes)(nil), "types.RepProtoTypes") - proto.RegisterType((*RepStdTypes)(nil), "types.RepStdTypes") - proto.RegisterType((*MapProtoTypes)(nil), "types.MapProtoTypes") - proto.RegisterType((*MapStdTypes)(nil), "types.MapStdTypes") - proto.RegisterType((*OneofProtoTypes)(nil), "types.OneofProtoTypes") - proto.RegisterType((*OneofStdTypes)(nil), "types.OneofStdTypes") -} -func (this *KnownTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.Dur.Compare(that1.Dur); c != 0 { - return c - } - if c := this.Ts.Compare(that1.Ts); c != 0 { - return c - } - if c := this.Dbl.Compare(that1.Dbl); c != 0 { - return c - } - if c := this.Flt.Compare(that1.Flt); c != 0 { - return c - } - if c := this.I64.Compare(that1.I64); c != 0 { - return c - } - if c := this.U64.Compare(that1.U64); c != 0 { - return c - } - if c := this.I32.Compare(that1.I32); c != 0 { - return c - } - if c := this.U32.Compare(that1.U32); c != 0 { - return c - } - if c := this.Bool.Compare(that1.Bool); c != 0 { - return c - } - if c := this.Str.Compare(that1.Str); c != 0 { - return c - } - if c := this.Bytes.Compare(that1.Bytes); c != 0 { - return c - } - return 0 -} -func (this *ProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.NullableTimestamp.Compare(that1.NullableTimestamp); c != 0 { - return c - } - if c := this.NullableDuration.Compare(that1.NullableDuration); c != 0 { - return c - } - if c := this.Timestamp.Compare(&that1.Timestamp); c != 0 { - return c - } - if c := this.Duration.Compare(&that1.Duration); c != 0 { - return c - } - return 0 -} -func (this *RepProtoTypes) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - if len(this.NullableTimestamps) < len(that1.NullableTimestamps) { - return -1 - } - return 1 - } - for i := range this.NullableTimestamps { - if c := this.NullableTimestamps[i].Compare(that1.NullableTimestamps[i]); c != 0 { - return c - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - if len(this.NullableDurations) < len(that1.NullableDurations) { - return -1 - } - return 1 - } - for i := range this.NullableDurations { - if c := this.NullableDurations[i].Compare(that1.NullableDurations[i]); c != 0 { - return c - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - if len(this.Timestamps) < len(that1.Timestamps) { - return -1 - } - return 1 - } - for i := range this.Timestamps { - if c := this.Timestamps[i].Compare(&that1.Timestamps[i]); c != 0 { - return c - } - } - if len(this.Durations) != len(that1.Durations) { - if len(this.Durations) < len(that1.Durations) { - return -1 - } - return 1 - } - for i := range this.Durations { - if c := this.Durations[i].Compare(&that1.Durations[i]); c != 0 { - return c - } - } - return 0 -} -func (this *KnownTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *KnownTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *KnownTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *KnownTypes but is not nil && this == nil") - } - if !this.Dur.Equal(that1.Dur) { - return fmt.Errorf("Dur this(%v) Not Equal that(%v)", this.Dur, that1.Dur) - } - if !this.Ts.Equal(that1.Ts) { - return fmt.Errorf("Ts this(%v) Not Equal that(%v)", this.Ts, that1.Ts) - } - if !this.Dbl.Equal(that1.Dbl) { - return fmt.Errorf("Dbl this(%v) Not Equal that(%v)", this.Dbl, that1.Dbl) - } - if !this.Flt.Equal(that1.Flt) { - return fmt.Errorf("Flt this(%v) Not Equal that(%v)", this.Flt, that1.Flt) - } - if !this.I64.Equal(that1.I64) { - return fmt.Errorf("I64 this(%v) Not Equal that(%v)", this.I64, that1.I64) - } - if !this.U64.Equal(that1.U64) { - return fmt.Errorf("U64 this(%v) Not Equal that(%v)", this.U64, that1.U64) - } - if !this.I32.Equal(that1.I32) { - return fmt.Errorf("I32 this(%v) Not Equal that(%v)", this.I32, that1.I32) - } - if !this.U32.Equal(that1.U32) { - return fmt.Errorf("U32 this(%v) Not Equal that(%v)", this.U32, that1.U32) - } - if !this.Bool.Equal(that1.Bool) { - return fmt.Errorf("Bool this(%v) Not Equal that(%v)", this.Bool, that1.Bool) - } - if !this.Str.Equal(that1.Str) { - return fmt.Errorf("Str this(%v) Not Equal that(%v)", this.Str, that1.Str) - } - if !this.Bytes.Equal(that1.Bytes) { - return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) - } - return nil -} -func (this *KnownTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KnownTypes) - if !ok { - that2, ok := that.(KnownTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Dur.Equal(that1.Dur) { - return false - } - if !this.Ts.Equal(that1.Ts) { - return false - } - if !this.Dbl.Equal(that1.Dbl) { - return false - } - if !this.Flt.Equal(that1.Flt) { - return false - } - if !this.I64.Equal(that1.I64) { - return false - } - if !this.U64.Equal(that1.U64) { - return false - } - if !this.I32.Equal(that1.I32) { - return false - } - if !this.U32.Equal(that1.U32) { - return false - } - if !this.Bool.Equal(that1.Bool) { - return false - } - if !this.Str.Equal(that1.Str) { - return false - } - if !this.Bytes.Equal(that1.Bytes) { - return false - } - return true -} -func (this *ProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ProtoTypes but is not nil && this == nil") - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if !this.Duration.Equal(&that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *ProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ProtoTypes) - if !ok { - that2, ok := that.(ProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.NullableTimestamp.Equal(that1.NullableTimestamp) { - return false - } - if !this.NullableDuration.Equal(that1.NullableDuration) { - return false - } - if !this.Timestamp.Equal(&that1.Timestamp) { - return false - } - if !this.Duration.Equal(&that1.Duration) { - return false - } - return true -} -func (this *StdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *StdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *StdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *StdTypes but is not nil && this == nil") - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return fmt.Errorf("this.NullableTimestamp != nil && that1.NullableTimestamp == nil") - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", this.NullableTimestamp, that1.NullableTimestamp) - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", *this.NullableDuration, *that1.NullableDuration) - } - } else if this.NullableDuration != nil { - return fmt.Errorf("this.NullableDuration == nil && that.NullableDuration != nil") - } else if that1.NullableDuration != nil { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", this.NullableDuration, that1.NullableDuration) - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - if this.Duration != that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *StdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StdTypes) - if !ok { - that2, ok := that.(StdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.NullableTimestamp == nil { - if this.NullableTimestamp != nil { - return false - } - } else if !this.NullableTimestamp.Equal(*that1.NullableTimestamp) { - return false - } - if this.NullableDuration != nil && that1.NullableDuration != nil { - if *this.NullableDuration != *that1.NullableDuration { - return false - } - } else if this.NullableDuration != nil { - return false - } else if that1.NullableDuration != nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - if this.Duration != that1.Duration { - return false - } - return true -} -func (this *RepProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepProtoTypes) - if !ok { - that2, ok := that.(RepProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if !this.NullableDurations[i].Equal(that1.NullableDurations[i]) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(&that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if !this.Durations[i].Equal(&that1.Durations[i]) { - return false - } - } - return true -} -func (this *RepStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RepStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RepStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RepStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return fmt.Errorf("NullableTimestamps this(%v) Not Equal that(%v)", len(this.NullableTimestamps), len(that1.NullableTimestamps)) - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return fmt.Errorf("NullableTimestamps this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamps[i], i, that1.NullableTimestamps[i]) - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return fmt.Errorf("NullableDurations this(%v) Not Equal that(%v)", len(this.NullableDurations), len(that1.NullableDurations)) - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDurations this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDurations[i], i, that1.NullableDurations[i]) - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return fmt.Errorf("Timestamps this(%v) Not Equal that(%v)", len(this.Timestamps), len(that1.Timestamps)) - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return fmt.Errorf("Timestamps this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamps[i], i, that1.Timestamps[i]) - } - } - if len(this.Durations) != len(that1.Durations) { - return fmt.Errorf("Durations this(%v) Not Equal that(%v)", len(this.Durations), len(that1.Durations)) - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return fmt.Errorf("Durations this[%v](%v) Not Equal that[%v](%v)", i, this.Durations[i], i, that1.Durations[i]) - } - } - return nil -} -func (this *RepStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RepStdTypes) - if !ok { - that2, ok := that.(RepStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamps) != len(that1.NullableTimestamps) { - return false - } - for i := range this.NullableTimestamps { - if !this.NullableTimestamps[i].Equal(*that1.NullableTimestamps[i]) { - return false - } - } - if len(this.NullableDurations) != len(that1.NullableDurations) { - return false - } - for i := range this.NullableDurations { - if dthis, dthat := this.NullableDurations[i], that1.NullableDurations[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Timestamps) != len(that1.Timestamps) { - return false - } - for i := range this.Timestamps { - if !this.Timestamps[i].Equal(that1.Timestamps[i]) { - return false - } - } - if len(this.Durations) != len(that1.Durations) { - return false - } - for i := range this.Durations { - if this.Durations[i] != that1.Durations[i] { - return false - } - } - return true -} -func (this *MapProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapProtoTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapProtoTypes) - if !ok { - that2, ok := that.(MapProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - a := this.Timestamp[i] - b := that1.Timestamp[i] - if !(&a).Equal(&b) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if !this.NullableDuration[i].Equal(that1.NullableDuration[i]) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - a := this.Duration[i] - b := that1.Duration[i] - if !(&a).Equal(&b) { - return false - } - } - return true -} -func (this *MapStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *MapStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *MapStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *MapStdTypes but is not nil && this == nil") - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return fmt.Errorf("NullableTimestamp this(%v) Not Equal that(%v)", len(this.NullableTimestamp), len(that1.NullableTimestamp)) - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return fmt.Errorf("NullableTimestamp this[%v](%v) Not Equal that[%v](%v)", i, this.NullableTimestamp[i], i, that1.NullableTimestamp[i]) - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", len(this.Timestamp), len(that1.Timestamp)) - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return fmt.Errorf("Timestamp this[%v](%v) Not Equal that[%v](%v)", i, this.Timestamp[i], i, that1.Timestamp[i]) - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return fmt.Errorf("NullableDuration this(%v) Not Equal that(%v)", len(this.NullableDuration), len(that1.NullableDuration)) - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return fmt.Errorf("NullableDuration this[%v](%v) Not Equal that[%v](%v)", i, this.NullableDuration[i], i, that1.NullableDuration[i]) - } - } - if len(this.Duration) != len(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", len(this.Duration), len(that1.Duration)) - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return fmt.Errorf("Duration this[%v](%v) Not Equal that[%v](%v)", i, this.Duration[i], i, that1.Duration[i]) - } - } - return nil -} -func (this *MapStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*MapStdTypes) - if !ok { - that2, ok := that.(MapStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.NullableTimestamp) != len(that1.NullableTimestamp) { - return false - } - for i := range this.NullableTimestamp { - if !this.NullableTimestamp[i].Equal(*that1.NullableTimestamp[i]) { - return false - } - } - if len(this.Timestamp) != len(that1.Timestamp) { - return false - } - for i := range this.Timestamp { - if !this.Timestamp[i].Equal(that1.Timestamp[i]) { - return false - } - } - if len(this.NullableDuration) != len(that1.NullableDuration) { - return false - } - for i := range this.NullableDuration { - if dthis, dthat := this.NullableDuration[i], that1.NullableDuration[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) { - return false - } - } - if len(this.Duration) != len(that1.Duration) { - return false - } - for i := range this.Duration { - if this.Duration[i] != that1.Duration[i] { - return false - } - } - return true -} -func (this *OneofProtoTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes but is not nil && this == nil") - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return fmt.Errorf("this.OneOfProtoTimes != nil && that1.OneOfProtoTimes == nil") - } - } else if this.OneOfProtoTimes == nil { - return fmt.Errorf("this.OneOfProtoTimes == nil && that1.OneOfProtoTimes != nil") - } else if err := this.OneOfProtoTimes.VerboseEqual(that1.OneOfProtoTimes); err != nil { - return err - } - return nil -} -func (this *OneofProtoTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Timestamp but is not nil && this == nil") - } - if !this.Timestamp.Equal(that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofProtoTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofProtoTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofProtoTypes_Duration but is not nil && this == nil") - } - if !this.Duration.Equal(that1.Duration) { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofProtoTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes) - if !ok { - that2, ok := that.(OneofProtoTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfProtoTimes == nil { - if this.OneOfProtoTimes != nil { - return false - } - } else if this.OneOfProtoTimes == nil { - return false - } else if !this.OneOfProtoTimes.Equal(that1.OneOfProtoTimes) { - return false - } - return true -} -func (this *OneofProtoTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Timestamp) - if !ok { - that2, ok := that.(OneofProtoTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Timestamp.Equal(that1.Timestamp) { - return false - } - return true -} -func (this *OneofProtoTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofProtoTypes_Duration) - if !ok { - that2, ok := that.(OneofProtoTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Duration.Equal(that1.Duration) { - return false - } - return true -} -func (this *OneofStdTypes) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes but is not nil && this == nil") - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return fmt.Errorf("this.OneOfStdTimes != nil && that1.OneOfStdTimes == nil") - } - } else if this.OneOfStdTimes == nil { - return fmt.Errorf("this.OneOfStdTimes == nil && that1.OneOfStdTimes != nil") - } else if err := this.OneOfStdTimes.VerboseEqual(that1.OneOfStdTimes); err != nil { - return err - } - return nil -} -func (this *OneofStdTypes_Timestamp) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Timestamp") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Timestamp but is not nil && this == nil") - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return fmt.Errorf("this.Timestamp != nil && that1.Timestamp == nil") - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) - } - return nil -} -func (this *OneofStdTypes_Duration) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *OneofStdTypes_Duration") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *OneofStdTypes_Duration but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *OneofStdTypes_Duration but is not nil && this == nil") - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", *this.Duration, *that1.Duration) - } - } else if this.Duration != nil { - return fmt.Errorf("this.Duration == nil && that.Duration != nil") - } else if that1.Duration != nil { - return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) - } - return nil -} -func (this *OneofStdTypes) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes) - if !ok { - that2, ok := that.(OneofStdTypes) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.OneOfStdTimes == nil { - if this.OneOfStdTimes != nil { - return false - } - } else if this.OneOfStdTimes == nil { - return false - } else if !this.OneOfStdTimes.Equal(that1.OneOfStdTimes) { - return false - } - return true -} -func (this *OneofStdTypes_Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Timestamp) - if !ok { - that2, ok := that.(OneofStdTypes_Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Timestamp == nil { - if this.Timestamp != nil { - return false - } - } else if !this.Timestamp.Equal(*that1.Timestamp) { - return false - } - return true -} -func (this *OneofStdTypes_Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*OneofStdTypes_Duration) - if !ok { - that2, ok := that.(OneofStdTypes_Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Duration != nil && that1.Duration != nil { - if *this.Duration != *that1.Duration { - return false - } - } else if this.Duration != nil { - return false - } else if that1.Duration != nil { - return false - } - return true -} -func NewPopulatedKnownTypes(r randyTypes, easy bool) *KnownTypes { - this := &KnownTypes{} - if r.Intn(10) != 0 { - this.Dur = google_protobuf1.NewPopulatedDuration(r, easy) - } - if r.Intn(10) != 0 { - this.Ts = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.Dbl = google_protobuf3.NewPopulatedDoubleValue(r, easy) - } - if r.Intn(10) != 0 { - this.Flt = google_protobuf3.NewPopulatedFloatValue(r, easy) - } - if r.Intn(10) != 0 { - this.I64 = google_protobuf3.NewPopulatedInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.U64 = google_protobuf3.NewPopulatedUInt64Value(r, easy) - } - if r.Intn(10) != 0 { - this.I32 = google_protobuf3.NewPopulatedInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.U32 = google_protobuf3.NewPopulatedUInt32Value(r, easy) - } - if r.Intn(10) != 0 { - this.Bool = google_protobuf3.NewPopulatedBoolValue(r, easy) - } - if r.Intn(10) != 0 { - this.Str = google_protobuf3.NewPopulatedStringValue(r, easy) - } - if r.Intn(10) != 0 { - this.Bytes = google_protobuf3.NewPopulatedBytesValue(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedProtoTypes(r randyTypes, easy bool) *ProtoTypes { - this := &ProtoTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = google_protobuf1.NewPopulatedDuration(r, easy) - } - v1 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamp = *v1 - v2 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Duration = *v2 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedStdTypes(r randyTypes, easy bool) *StdTypes { - this := &StdTypes{} - if r.Intn(10) != 0 { - this.NullableTimestamp = types1.NewPopulatedStdTime(r, easy) - } - if r.Intn(10) != 0 { - this.NullableDuration = types1.NewPopulatedStdDuration(r, easy) - } - v3 := types1.NewPopulatedStdTime(r, easy) - this.Timestamp = *v3 - v4 := types1.NewPopulatedStdDuration(r, easy) - this.Duration = *v4 - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepProtoTypes(r randyTypes, easy bool) *RepProtoTypes { - this := &RepProtoTypes{} - if r.Intn(10) != 0 { - v5 := r.Intn(5) - this.NullableTimestamps = make([]*google_protobuf2.Timestamp, v5) - for i := 0; i < v5; i++ { - this.NullableTimestamps[i] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v6 := r.Intn(5) - this.NullableDurations = make([]*google_protobuf1.Duration, v6) - for i := 0; i < v6; i++ { - this.NullableDurations[i] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v7 := r.Intn(5) - this.Timestamps = make([]google_protobuf2.Timestamp, v7) - for i := 0; i < v7; i++ { - v8 := google_protobuf2.NewPopulatedTimestamp(r, easy) - this.Timestamps[i] = *v8 - } - } - if r.Intn(10) != 0 { - v9 := r.Intn(5) - this.Durations = make([]google_protobuf1.Duration, v9) - for i := 0; i < v9; i++ { - v10 := google_protobuf1.NewPopulatedDuration(r, easy) - this.Durations[i] = *v10 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRepStdTypes(r randyTypes, easy bool) *RepStdTypes { - this := &RepStdTypes{} - if r.Intn(10) != 0 { - v11 := r.Intn(5) - this.NullableTimestamps = make([]*time.Time, v11) - for i := 0; i < v11; i++ { - this.NullableTimestamps[i] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v12 := r.Intn(5) - this.NullableDurations = make([]*time.Duration, v12) - for i := 0; i < v12; i++ { - this.NullableDurations[i] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v13 := r.Intn(5) - this.Timestamps = make([]time.Time, v13) - for i := 0; i < v13; i++ { - v14 := types1.NewPopulatedStdTime(r, easy) - this.Timestamps[i] = *v14 - } - } - if r.Intn(10) != 0 { - v15 := r.Intn(5) - this.Durations = make([]time.Duration, v15) - for i := 0; i < v15; i++ { - v16 := types1.NewPopulatedStdDuration(r, easy) - this.Durations[i] = *v16 - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapProtoTypes(r randyTypes, easy bool) *MapProtoTypes { - this := &MapProtoTypes{} - if r.Intn(10) != 0 { - v17 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*google_protobuf2.Timestamp) - for i := 0; i < v17; i++ { - this.NullableTimestamp[int32(r.Int31())] = google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v18 := r.Intn(10) - this.Timestamp = make(map[int32]google_protobuf2.Timestamp) - for i := 0; i < v18; i++ { - this.Timestamp[int32(r.Int31())] = *google_protobuf2.NewPopulatedTimestamp(r, easy) - } - } - if r.Intn(10) != 0 { - v19 := r.Intn(10) - this.NullableDuration = make(map[int32]*google_protobuf1.Duration) - for i := 0; i < v19; i++ { - this.NullableDuration[int32(r.Int31())] = google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v20 := r.Intn(10) - this.Duration = make(map[int32]google_protobuf1.Duration) - for i := 0; i < v20; i++ { - this.Duration[int32(r.Int31())] = *google_protobuf1.NewPopulatedDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedMapStdTypes(r randyTypes, easy bool) *MapStdTypes { - this := &MapStdTypes{} - if r.Intn(10) != 0 { - v21 := r.Intn(10) - this.NullableTimestamp = make(map[int32]*time.Time) - for i := 0; i < v21; i++ { - this.NullableTimestamp[int32(r.Int31())] = types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v22 := r.Intn(10) - this.Timestamp = make(map[int32]time.Time) - for i := 0; i < v22; i++ { - this.Timestamp[int32(r.Int31())] = *types1.NewPopulatedStdTime(r, easy) - } - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - this.NullableDuration = make(map[int32]*time.Duration) - for i := 0; i < v23; i++ { - this.NullableDuration[int32(r.Int31())] = types1.NewPopulatedStdDuration(r, easy) - } - } - if r.Intn(10) != 0 { - v24 := r.Intn(10) - this.Duration = make(map[int32]time.Duration) - for i := 0; i < v24; i++ { - this.Duration[int32(r.Int31())] = *types1.NewPopulatedStdDuration(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes(r randyTypes, easy bool) *OneofProtoTypes { - this := &OneofProtoTypes{} - oneofNumber_OneOfProtoTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfProtoTimes { - case 1: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Timestamp(r, easy) - case 2: - this.OneOfProtoTimes = NewPopulatedOneofProtoTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofProtoTypes_Timestamp(r randyTypes, easy bool) *OneofProtoTypes_Timestamp { - this := &OneofProtoTypes_Timestamp{} - this.Timestamp = google_protobuf2.NewPopulatedTimestamp(r, easy) - return this -} -func NewPopulatedOneofProtoTypes_Duration(r randyTypes, easy bool) *OneofProtoTypes_Duration { - this := &OneofProtoTypes_Duration{} - this.Duration = google_protobuf1.NewPopulatedDuration(r, easy) - return this -} -func NewPopulatedOneofStdTypes(r randyTypes, easy bool) *OneofStdTypes { - this := &OneofStdTypes{} - oneofNumber_OneOfStdTimes := []int32{1, 2}[r.Intn(2)] - switch oneofNumber_OneOfStdTimes { - case 1: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Timestamp(r, easy) - case 2: - this.OneOfStdTimes = NewPopulatedOneofStdTypes_Duration(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedOneofStdTypes_Timestamp(r randyTypes, easy bool) *OneofStdTypes_Timestamp { - this := &OneofStdTypes_Timestamp{} - this.Timestamp = types1.NewPopulatedStdTime(r, easy) - return this -} -func NewPopulatedOneofStdTypes_Duration(r randyTypes, easy bool) *OneofStdTypes_Duration { - this := &OneofStdTypes_Duration{} - this.Duration = types1.NewPopulatedStdDuration(r, easy) - return this -} - -type randyTypes interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneTypes(r randyTypes) 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 randStringTypes(r randyTypes) string { - v25 := r.Intn(100) - tmps := make([]rune, v25) - for i := 0; i < v25; i++ { - tmps[i] = randUTF8RuneTypes(r) - } - return string(tmps) -} -func randUnrecognizedTypes(r randyTypes, 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 = randFieldTypes(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldTypes(dAtA []byte, r randyTypes, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateTypes(dAtA, uint64(key)) - v26 := r.Int63() - if r.Intn(2) == 0 { - v26 *= -1 - } - dAtA = encodeVarintPopulateTypes(dAtA, uint64(v26)) - case 1: - dAtA = encodeVarintPopulateTypes(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 = encodeVarintPopulateTypes(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateTypes(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateTypes(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 encodeVarintPopulateTypes(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 *KnownTypes) Size() (n int) { - var l int - _ = l - if m.Dur != nil { - l = m.Dur.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Ts != nil { - l = m.Ts.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Dbl != nil { - l = m.Dbl.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Flt != nil { - l = m.Flt.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I64 != nil { - l = m.I64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U64 != nil { - l = m.U64.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.I32 != nil { - l = m.I32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.U32 != nil { - l = m.U32.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bool != nil { - l = m.Bool.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Str != nil { - l = m.Str.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.Bytes != nil { - l = m.Bytes.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *ProtoTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = m.NullableTimestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = m.NullableDuration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *StdTypes) Size() (n int) { - var l int - _ = l - if m.NullableTimestamp != nil { - l = types1.SizeOfStdTime(*m.NullableTimestamp) - n += 1 + l + sovTypes(uint64(l)) - } - if m.NullableDuration != nil { - l = types1.SizeOfStdDuration(*m.NullableDuration) - n += 1 + l + sovTypes(uint64(l)) - } - l = types1.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - l = types1.SizeOfStdDuration(m.Duration) - n += 1 + l + sovTypes(uint64(l)) - return n -} - -func (m *RepProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *RepStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamps) > 0 { - for _, e := range m.NullableTimestamps { - l = types1.SizeOfStdTime(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.NullableDurations) > 0 { - for _, e := range m.NullableDurations { - l = types1.SizeOfStdDuration(*e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Timestamps) > 0 { - for _, e := range m.Timestamps { - l = types1.SizeOfStdTime(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Durations) > 0 { - for _, e := range m.Durations { - l = types1.SizeOfStdDuration(e) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *MapProtoTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *MapStdTypes) Size() (n int) { - var l int - _ = l - if len(m.NullableTimestamp) > 0 { - for k, v := range m.NullableTimestamp { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdTime(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Timestamp) > 0 { - for k, v := range m.Timestamp { - _ = k - _ = v - l = types1.SizeOfStdTime(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.NullableDuration) > 0 { - for k, v := range m.NullableDuration { - _ = k - _ = v - l = 0 - if v != nil { - l = types1.SizeOfStdDuration(*v) - l += 1 + sovTypes(uint64(l)) - } - mapEntrySize := 1 + sovTypes(uint64(k)) + l - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - if len(m.Duration) > 0 { - for k, v := range m.Duration { - _ = k - _ = v - l = types1.SizeOfStdDuration(v) - mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + l + sovTypes(uint64(l)) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func (m *OneofProtoTypes) Size() (n int) { - var l int - _ = l - if m.OneOfProtoTimes != nil { - n += m.OneOfProtoTimes.Size() - } - return n -} - -func (m *OneofProtoTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = m.Timestamp.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofProtoTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = m.Duration.Size() - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes) Size() (n int) { - var l int - _ = l - if m.OneOfStdTimes != nil { - n += m.OneOfStdTimes.Size() - } - return n -} - -func (m *OneofStdTypes_Timestamp) Size() (n int) { - var l int - _ = l - if m.Timestamp != nil { - l = types1.SizeOfStdTime(*m.Timestamp) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} -func (m *OneofStdTypes_Duration) Size() (n int) { - var l int - _ = l - if m.Duration != nil { - l = types1.SizeOfStdDuration(*m.Duration) - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func sovTypes(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *KnownTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KnownTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KnownTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dur", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dur == nil { - m.Dur = &google_protobuf1.Duration{} - } - if err := m.Dur.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Ts == nil { - m.Ts = &google_protobuf2.Timestamp{} - } - if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dbl", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dbl == nil { - m.Dbl = &google_protobuf3.DoubleValue{} - } - if err := m.Dbl.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Flt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Flt == nil { - m.Flt = &google_protobuf3.FloatValue{} - } - if err := m.Flt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.I64 == nil { - m.I64 = &google_protobuf3.Int64Value{} - } - if err := m.I64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.U64 == nil { - m.U64 = &google_protobuf3.UInt64Value{} - } - if err := m.U64.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.I32 == nil { - m.I32 = &google_protobuf3.Int32Value{} - } - if err := m.I32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.U32 == nil { - m.U32 = &google_protobuf3.UInt32Value{} - } - if err := m.U32.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bool", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bool == nil { - m.Bool = &google_protobuf3.BoolValue{} - } - if err := m.Bool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Str == nil { - m.Str = &google_protobuf3.StringValue{} - } - if err := m.Str.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bytes == nil { - m.Bytes = &google_protobuf3.BytesValue{} - } - if err := m.Bytes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = &google_protobuf2.Timestamp{} - } - if err := m.NullableTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = &google_protobuf1.Duration{} - } - if err := m.NullableDuration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = new(time.Time) - } - if err := types1.StdTimeUnmarshal(m.NullableTimestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = new(time.Duration) - } - if err := types1.StdDurationUnmarshal(m.NullableDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableTimestamps = append(m.NullableTimestamps, &google_protobuf2.Timestamp{}) - if err := m.NullableTimestamps[len(m.NullableTimestamps)-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 NullableDurations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableDurations = append(m.NullableDurations, &google_protobuf1.Duration{}) - if err := m.NullableDurations[len(m.NullableDurations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamps = append(m.Timestamps, google_protobuf2.Timestamp{}) - if err := m.Timestamps[len(m.Timestamps)-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 Durations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Durations = append(m.Durations, google_protobuf1.Duration{}) - if err := m.Durations[len(m.Durations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableTimestamps = append(m.NullableTimestamps, new(time.Time)) - if err := types1.StdTimeUnmarshal(m.NullableTimestamps[len(m.NullableTimestamps)-1], dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDurations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NullableDurations = append(m.NullableDurations, new(time.Duration)) - if err := types1.StdDurationUnmarshal(m.NullableDurations[len(m.NullableDurations)-1], dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Timestamps = append(m.Timestamps, time.Time{}) - if err := types1.StdTimeUnmarshal(&(m.Timestamps[len(m.Timestamps)-1]), dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Durations = append(m.Durations, time.Duration(0)) - if err := types1.StdDurationUnmarshal(&(m.Durations[len(m.Durations)-1]), dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MapProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = make(map[int32]*google_protobuf2.Timestamp) - } - var mapkey int32 - var mapvalue *google_protobuf2.Timestamp - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf2.Timestamp{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableTimestamp[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = make(map[int32]google_protobuf2.Timestamp) - } - var mapkey int32 - mapvalue := &google_protobuf2.Timestamp{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf2.Timestamp{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Timestamp[mapkey] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = make(map[int32]*google_protobuf1.Duration) - } - var mapkey int32 - var mapvalue *google_protobuf1.Duration - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf1.Duration{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableDuration[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Duration == nil { - m.Duration = make(map[int32]google_protobuf1.Duration) - } - var mapkey int32 - mapvalue := &google_protobuf1.Duration{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &google_protobuf1.Duration{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Duration[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MapStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MapStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MapStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableTimestamp == nil { - m.NullableTimestamp = make(map[int32]*time.Time) - } - var mapkey int32 - mapvalue := new(time.Time) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableTimestamp[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Timestamp == nil { - m.Timestamp = make(map[int32]time.Time) - } - var mapkey int32 - mapvalue := new(time.Time) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdTimeUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Timestamp[mapkey] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NullableDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NullableDuration == nil { - m.NullableDuration = make(map[int32]*time.Duration) - } - var mapkey int32 - mapvalue := new(time.Duration) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.NullableDuration[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Duration == nil { - m.Duration = make(map[int32]time.Duration) - } - var mapkey int32 - mapvalue := new(time.Duration) - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapkey |= (int32(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - postmsgIndex := iNdEx + mapmsglen - if mapmsglen < 0 { - return ErrInvalidLengthTypes - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - if err := types1.StdDurationUnmarshal(mapvalue, dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Duration[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OneofProtoTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OneofProtoTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OneofProtoTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &google_protobuf2.Timestamp{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfProtoTimes = &OneofProtoTypes_Timestamp{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &google_protobuf1.Duration{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfProtoTimes = &OneofProtoTypes_Duration{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OneofStdTypes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OneofStdTypes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OneofStdTypes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := new(time.Time) - if err := types1.StdTimeUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfStdTimes = &OneofStdTypes_Timestamp{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := new(time.Duration) - if err := types1.StdDurationUnmarshal(v, dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.OneOfStdTimes = &OneofStdTypes_Duration{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(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, ErrIntOverflowTypes - } - 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, ErrIntOverflowTypes - } - 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, ErrIntOverflowTypes - } - 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, ErrInvalidLengthTypes - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - 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 := skipTypes(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 ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") -) - -func init() { proto.RegisterFile("combos/unmarshaler/types.proto", fileDescriptorTypes) } - -var fileDescriptorTypes = []byte{ - // 928 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xdb, 0x54, - 0x18, 0x8d, 0x7f, 0x52, 0x32, 0x5f, 0x14, 0xda, 0x5a, 0x02, 0x99, 0x80, 0x9c, 0x21, 0x6c, 0x86, - 0x56, 0x75, 0x20, 0x89, 0x02, 0x1a, 0x54, 0x28, 0xd6, 0xb4, 0x9d, 0x52, 0x4d, 0xa7, 0x4a, 0xcb, - 0x08, 0x90, 0x40, 0xd8, 0x8d, 0x93, 0x46, 0x38, 0xbe, 0x91, 0x7d, 0x4d, 0x95, 0x1d, 0x8f, 0xc0, - 0x12, 0xc4, 0x86, 0xee, 0x90, 0x60, 0x0f, 0x4b, 0x36, 0x48, 0xdd, 0xc1, 0x13, 0x40, 0x1b, 0x36, - 0x3c, 0x42, 0x97, 0xe8, 0x5e, 0x5f, 0xff, 0xc5, 0xd7, 0x0e, 0x89, 0x34, 0x62, 0xd3, 0xdd, 0x78, - 0x7c, 0xce, 0xf1, 0xf1, 0xf1, 0xf9, 0xbe, 0x1b, 0xd0, 0xee, 0xa1, 0x99, 0x85, 0xfc, 0x4e, 0xe0, - 0xce, 0x4c, 0xcf, 0xbf, 0x6f, 0x3a, 0xb6, 0xd7, 0xc1, 0x8b, 0xb9, 0xed, 0xeb, 0x73, 0x0f, 0x61, - 0xa4, 0x54, 0xe9, 0x45, 0xf3, 0xd2, 0x64, 0x8a, 0xef, 0x07, 0x96, 0x7e, 0x0f, 0xcd, 0x3a, 0x13, - 0x34, 0x41, 0x1d, 0x7a, 0xd7, 0x0a, 0xc6, 0xf4, 0x8a, 0x5e, 0xd0, 0xbf, 0x42, 0x56, 0x53, 0x9b, - 0x20, 0x34, 0x71, 0xec, 0x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, 0x5a, 0xe5, 0x8f, - 0xa5, 0x26, 0x3c, 0x5e, 0x6a, 0xc2, 0xd3, 0xa5, 0x56, 0xf9, 0xea, 0x6f, 0xad, 0x62, 0x9d, 0xa1, - 0xfa, 0xbd, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xea, 0x00, 0x6a, 0x9b, 0x0e, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto deleted file mode 100644 index 0fd0bb6a8..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types.proto +++ /dev/null @@ -1,131 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package types; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -//import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -//import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message KnownTypes { - option (gogoproto.compare) = true; - google.protobuf.Duration dur = 1; - google.protobuf.Timestamp ts = 2; - google.protobuf.DoubleValue dbl = 3; - google.protobuf.FloatValue flt = 4; - google.protobuf.Int64Value i64 = 5; - google.protobuf.UInt64Value u64 = 6; - google.protobuf.Int32Value i32 = 7; - google.protobuf.UInt32Value u32 = 8; - google.protobuf.BoolValue bool = 9; - google.protobuf.StringValue str = 10; - google.protobuf.BytesValue bytes = 11; - - // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed - // google.protobuf.Struct st = 12; - // google.protobuf.Any an = 14; -} - -message ProtoTypes { - // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare - option (gogoproto.compare) = true; - google.protobuf.Timestamp nullableTimestamp = 1; - google.protobuf.Duration nullableDuration = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; -} - -message StdTypes { - google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message RepProtoTypes { - option (gogoproto.compare) = true; - repeated google.protobuf.Timestamp nullableTimestamps = 1; - repeated google.protobuf.Duration nullableDurations = 2; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; -} - -message RepStdTypes { - repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; - repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message MapProtoTypes { - map nullableTimestamp = 1; - map timestamp = 2 [(gogoproto.nullable) = false]; - - map nullableDuration = 3; - map duration = 4 [(gogoproto.nullable) = false]; -} - -message MapStdTypes { - map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - map nullableDuration = 3 [(gogoproto.stdduration) = true]; - map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message OneofProtoTypes { - oneof OneOfProtoTimes { - google.protobuf.Timestamp timestamp = 1; - google.protobuf.Duration duration = 2; - } -} - -message OneofStdTypes { - oneof OneOfStdTimes { - google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go deleted file mode 100644 index 7d24f58e6..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/types_test.go +++ /dev/null @@ -1,242 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 types - -import ( - math_rand "math/rand" - "testing" - "time" - - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -func TestFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go b/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go deleted file mode 100644 index 98aaeda4b..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/combos/unmarshaler/typespb_test.go +++ /dev/null @@ -1,1732 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: combos/unmarshaler/types.proto - -/* -Package types is a generated protocol buffer package. - -It is generated from these files: - combos/unmarshaler/types.proto - -It has these top-level messages: - KnownTypes - ProtoTypes - StdTypes - RepProtoTypes - RepStdTypes - MapProtoTypes - MapStdTypes - OneofProtoTypes - OneofStdTypes -*/ -package types - -import testing "testing" -import rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import math "math" -import _ "github.com/gogo/protobuf/gogoproto" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" -import _ "github.com/gogo/protobuf/types" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestKnownTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkKnownTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkKnownTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedKnownTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &KnownTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &ProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &StdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkRepProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkRepStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkRepStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedRepStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &RepStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMapProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkMapStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkMapStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedMapStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &MapStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOneofProtoTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofProtoTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofProtoTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofProtoTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkOneofStdTypesProtoMarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 10000) - for i := 0; i < 10000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - dAtA, err := proto.Marshal(pops[i%10000]) - if err != nil { - panic(err) - } - total += len(dAtA) - } - b.SetBytes(int64(total / b.N)) -} - -func BenchmarkOneofStdTypesProtoUnmarshal(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := proto.Marshal(NewPopulatedOneofStdTypes(popr, false)) - if err != nil { - panic(err) - } - datas[i] = dAtA - } - msg := &OneofStdTypes{} - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += len(datas[i%10000]) - if err := proto.Unmarshal(datas[i%10000], msg); err != nil { - panic(err) - } - } - b.SetBytes(int64(total / b.N)) -} - -func TestKnownTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KnownTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRepStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RepStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestMapStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &MapStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofProtoTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofProtoTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestOneofStdTypesJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OneofStdTypes{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKnownTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &KnownTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &ProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &StdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRepStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &RepStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestMapStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &MapStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofProtoTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofProtoTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestOneofStdTypesProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OneofStdTypes{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKnownTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedKnownTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestRepProtoTypesCompare(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if c := p.Compare(msg); c != 0 { - t.Fatalf("%#v !Compare %#v, since %d", msg, p, c) - } - p2 := NewPopulatedRepProtoTypes(popr, false) - c := p.Compare(p2) - c2 := p2.Compare(p) - if c != (-1 * c2) { - t.Errorf("p.Compare(p2) = %d", c) - t.Errorf("p2.Compare(p) = %d", c2) - t.Errorf("p = %#v", p) - t.Errorf("p2 = %#v", p2) - } -} -func TestKnownTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKnownTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KnownTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRepStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRepStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RepStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestMapStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedMapStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &MapStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofProtoTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofProtoTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofProtoTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestOneofStdTypesVerboseEqual(t *testing.T) { - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOneofStdTypes(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OneofStdTypes{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKnownTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedKnownTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkKnownTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*KnownTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedKnownTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*ProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*StdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestRepStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedRepStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkRepStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*RepStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedRepStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestMapStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedMapStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkMapStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*MapStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedMapStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofProtoTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofProtoTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofProtoTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofProtoTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofProtoTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -func TestOneofStdTypesSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOneofStdTypes(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func BenchmarkOneofStdTypesSize(b *testing.B) { - popr := rand.New(rand.NewSource(616)) - total := 0 - pops := make([]*OneofStdTypes, 1000) - for i := 0; i < 1000; i++ { - pops[i] = NewPopulatedOneofStdTypes(popr, false) - } - b.ResetTimer() - for i := 0; i < b.N; i++ { - total += pops[i%1000].Size() - } - b.SetBytes(int64(total / b.N)) -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/vendor/github.com/gogo/protobuf/test/types/types.proto b/vendor/github.com/gogo/protobuf/test/types/types.proto deleted file mode 100644 index 3c26fae20..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/types.proto +++ /dev/null @@ -1,131 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 = "proto3"; - -package types; - -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - -//import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -//import "google/protobuf/struct.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/wrappers.proto"; - -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.equal_all) = true; -option (gogoproto.verbose_equal_all) = true; -option (gogoproto.unsafe_marshaler_all) = false; -option (gogoproto.unsafe_unmarshaler_all) = false; - -message KnownTypes { - option (gogoproto.compare) = true; - google.protobuf.Duration dur = 1; - google.protobuf.Timestamp ts = 2; - google.protobuf.DoubleValue dbl = 3; - google.protobuf.FloatValue flt = 4; - google.protobuf.Int64Value i64 = 5; - google.protobuf.UInt64Value u64 = 6; - google.protobuf.Int32Value i32 = 7; - google.protobuf.UInt32Value u32 = 8; - google.protobuf.BoolValue bool = 9; - google.protobuf.StringValue str = 10; - google.protobuf.BytesValue bytes = 11; - - // TODO uncomment this once https://github.com/gogo/protobuf/issues/197 is fixed - // google.protobuf.Struct st = 12; - // google.protobuf.Any an = 14; -} - -message ProtoTypes { - // TODO this should be a compare_all at the top of the file once time.Time, time.Duration, oneof and map is supported by compare - option (gogoproto.compare) = true; - google.protobuf.Timestamp nullableTimestamp = 1; - google.protobuf.Duration nullableDuration = 2; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.nullable) = false]; -} - -message StdTypes { - google.protobuf.Timestamp nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration nullableDuration = 2 [(gogoproto.stdduration) = true]; - google.protobuf.Timestamp timestamp = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - google.protobuf.Duration duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message RepProtoTypes { - option (gogoproto.compare) = true; - repeated google.protobuf.Timestamp nullableTimestamps = 1; - repeated google.protobuf.Duration nullableDurations = 2; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.nullable) = false]; -} - -message RepStdTypes { - repeated google.protobuf.Timestamp nullableTimestamps = 1 [(gogoproto.stdtime) = true]; - repeated google.protobuf.Duration nullableDurations = 2 [(gogoproto.stdduration) = true]; - repeated google.protobuf.Timestamp timestamps = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - repeated google.protobuf.Duration durations = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message MapProtoTypes { - map nullableTimestamp = 1; - map timestamp = 2 [(gogoproto.nullable) = false]; - - map nullableDuration = 3; - map duration = 4 [(gogoproto.nullable) = false]; -} - -message MapStdTypes { - map nullableTimestamp = 1 [(gogoproto.stdtime) = true]; - map timestamp = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - map nullableDuration = 3 [(gogoproto.stdduration) = true]; - map duration = 4 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; -} - -message OneofProtoTypes { - oneof OneOfProtoTimes { - google.protobuf.Timestamp timestamp = 1; - google.protobuf.Duration duration = 2; - } -} - -message OneofStdTypes { - oneof OneOfStdTimes { - google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true]; - google.protobuf.Duration duration = 2 [(gogoproto.stdduration) = true]; - } -} - diff --git a/vendor/github.com/gogo/protobuf/test/types/types_test.go.in b/vendor/github.com/gogo/protobuf/test/types/types_test.go.in deleted file mode 100644 index fcb0974e0..000000000 --- a/vendor/github.com/gogo/protobuf/test/types/types_test.go.in +++ /dev/null @@ -1,243 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, 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 types - -import ( - "testing" - "time" - math_rand "math/rand" - - "github.com/gogo/protobuf/proto" - "github.com/gogo/protobuf/jsonpb" -) - -func TestFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &StdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &ProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleRepProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedRepProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &RepStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &RepProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - - -func TestFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleMapProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedMapProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &MapStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &MapProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - protoData, err := proto.Marshal(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := proto.Unmarshal(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := proto.Marshal(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := proto.Unmarshal(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} - -func TestJsonFullCircleOneofProtoToStd(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - protoMsg := NewPopulatedOneofProtoTypes(popr, true) - j := &jsonpb.Marshaler{} - protoData, err := j.MarshalToString(protoMsg) - if err != nil { - t.Fatal(err) - } - stdMsg := &OneofStdTypes{} - if err2 := jsonpb.UnmarshalString(protoData, stdMsg); err2 != nil { - t.Fatal(err) - } - stdData, err := j.MarshalToString(stdMsg) - if err != nil { - t.Fatal(err) - } - protoMsgOut := &OneofProtoTypes{} - if err3 := jsonpb.UnmarshalString(stdData, protoMsgOut); err3 != nil { - t.Fatal(err) - } - if !protoMsg.Equal(protoMsgOut) { - t.Fatalf("want %#v got %#v", protoMsg, protoMsgOut) - } -} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile deleted file mode 100644 index e9fa8934d..000000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unmarshalmerge.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go deleted file mode 100644 index 1c1f58ee8..000000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.pb.go +++ /dev/null @@ -1,1521 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: unmarshalmerge.proto - -/* - 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 reflect "reflect" - -import io "io" -import binary "encoding/binary" - -// 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 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 (*Big) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{0} } - -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 (*BigUnsafe) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{1} } - -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 (*Sub) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{2} } - -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 (*IntMerge) Descriptor() ([]byte, []int) { return fileDescriptorUnmarshalmerge, []int{3} } - -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 { - return this == nil - } - - that1, ok := that.(*Big) - if !ok { - that2, ok := that.(Big) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*BigUnsafe) - if !ok { - that2, ok := that.(BigUnsafe) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*Sub) - if !ok { - that2, ok := that.(Sub) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*IntMerge) - if !ok { - that2, ok := that.(IntMerge) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 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 *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 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: 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 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 - } - m.Fixed64 = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - m.Fixed32 = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Sfixed32 = int32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - 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 - } - m.Sfixed64 = int64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 proto.NewRequiredNotSetError("Int64") - } - if hasFields[0]&uint64(0x00000002) == 0 { - return proto.NewRequiredNotSetError("Sint32") - } - if hasFields[0]&uint64(0x00000004) == 0 { - return proto.NewRequiredNotSetError("Uint32") - } - if hasFields[0]&uint64(0x00000008) == 0 { - return 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 init() { proto.RegisterFile("unmarshalmerge.proto", fileDescriptorUnmarshalmerge) } - -var fileDescriptorUnmarshalmerge = []byte{ - // 386 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0xd0, 0xcd, 0x8a, 0x9b, 0x50, - 0x14, 0x07, 0xf0, 0x1c, 0x35, 0xc6, 0xdc, 0xd0, 0xaf, 0xdb, 0x52, 0x2e, 0x21, 0xdc, 0x5c, 0x02, - 0x85, 0xdb, 0x45, 0x13, 0x50, 0x71, 0xd1, 0xa5, 0x8b, 0x42, 0x0a, 0x2d, 0x25, 0x92, 0x07, 0x88, - 0xad, 0x31, 0x42, 0xd4, 0x62, 0x14, 0xba, 0xec, 0x23, 0xf4, 0x15, 0xba, 0x9b, 0x47, 0x98, 0x65, - 0x96, 0xf3, 0x08, 0xb3, 0x0a, 0xa3, 0x4f, 0x30, 0xcb, 0x59, 0x0e, 0x5e, 0x6f, 0x3e, 0x9c, 0xed, - 0xec, 0x3c, 0xff, 0xdf, 0xdf, 0x73, 0xe0, 0xa2, 0x77, 0x45, 0x12, 0xaf, 0xb2, 0xdd, 0x66, 0xb5, - 0x8d, 0x83, 0x2c, 0x0c, 0xa6, 0xbf, 0xb3, 0x34, 0x4f, 0xf1, 0xcb, 0x76, 0x3a, 0xfc, 0x14, 0x46, - 0xf9, 0xa6, 0xf0, 0xa7, 0x3f, 0xd3, 0x78, 0x16, 0xa6, 0x61, 0x3a, 0x13, 0x35, 0xbf, 0x58, 0x8b, - 0x49, 0x0c, 0xe2, 0xab, 0xf9, 0x7d, 0xf2, 0x15, 0xa9, 0x6e, 0x14, 0xe2, 0x0f, 0x48,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xdc, 0x70, 0x6c, 0x82, 0x18, 0xf0, 0xd7, 0xed, 0x86, 0x63, 0x63, 0x82, 0x34, - 0x37, 0x4d, 0xb7, 0x64, 0xc0, 0x80, 0x1b, 0x52, 0x45, 0xd2, 0x3c, 0xb0, 0xcb, 0x6e, 0x4b, 0xda, - 0xb9, 0x2b, 0x29, 0xdc, 0x97, 0x14, 0x1e, 0x4a, 0x0a, 0x7f, 0x2b, 0x0a, 0x57, 0x15, 0x85, 0xeb, - 0x8a, 0xc2, 0xbe, 0xa2, 0xf0, 0x18, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x4e, 0xc7, 0x4e, 0xa1, 0x02, - 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto deleted file mode 100644 index 1fdbceaf5..000000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge.proto +++ /dev/null @@ -1,75 +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 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/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go deleted file mode 100644 index b842ef9bf..000000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmerge_test.go +++ /dev/null @@ -1,99 +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 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/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go b/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go deleted file mode 100644 index 1a34a8395..000000000 --- a/vendor/github.com/gogo/protobuf/test/unmarshalmerge/unmarshalmergepb_test.go +++ /dev/null @@ -1,703 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: unmarshalmerge.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import unsafe "unsafe" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBig(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Big{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkBigProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BigUnsafe{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkBigUnsafeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSub(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Sub{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkSubProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IntMerge{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func BenchmarkIntMergeProtoMarshal(b *testing.B) { - popr := rand.New(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 := 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 := rand.New(rand.NewSource(616)) - total := 0 - datas := make([][]byte, 10000) - for i := 0; i < 10000; i++ { - dAtA, err := 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 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Big{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BigUnsafe{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Sub{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IntMerge{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Big{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBig(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Big{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &BigUnsafe{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedBigUnsafe(popr, true) - dAtA := proto.CompactTextString(p) - msg := &BigUnsafe{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &Sub{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedSub(popr, true) - dAtA := proto.CompactTextString(p) - msg := &Sub{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &IntMerge{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedIntMerge(popr, true) - dAtA := proto.CompactTextString(p) - msg := &IntMerge{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBig(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Big{} - if err := proto.Unmarshal(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) { - var bigendian uint32 = 0x01020304 - if *(*byte)(unsafe.Pointer(&bigendian)) == 1 { - t.Skip("unsafe does not work on big endian architectures") - } - popr := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBigUnsafe(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &BigUnsafe{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedSub(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Sub{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIntMerge(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IntMerge{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBigUnsafeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestSubGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestIntMergeGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBigStringer(t *testing.T) { - popr := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/unrecognized/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile deleted file mode 100644 index f09551ae7..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognized.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go b/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go deleted file mode 100644 index 16751014b..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/oldnew_test.go +++ /dev/null @@ -1,200 +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 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/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go deleted file mode 100644 index 38fbcf3fb..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.pb.go +++ /dev/null @@ -1,4047 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: unrecognized.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import binary "encoding/binary" - -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 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() {} -func (*A) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{0} } - -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() {} -func (*B) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{1} } - -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() {} -func (*D) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{2} } - -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() {} -func (*C) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{3} } - -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() {} -func (*U) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{4} } - -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() {} -func (*UnoM) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{5} } - -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() {} -func (*OldA) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{6} } - -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() {} -func (*OldB) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{7} } - -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() {} -func (*OldC) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{8} } - -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() {} -func (*OldU) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{9} } - -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 (*OldUnoM) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognized, []int{10} } - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3976 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5b, 0x5d, 0x70, 0xdc, 0xd6, - 0x75, 0x26, 0xf6, 0x87, 0xdc, 0x3d, 0xbb, 0x5c, 0x82, 0x20, 0x2d, 0xad, 0xe8, 0x98, 0xa4, 0xd6, - 0x76, 0x44, 0xdb, 0x0d, 0x95, 0xd2, 0x12, 0x65, 0x41, 0x4d, 0x9c, 0xe5, 0xee, 0x92, 0xa6, 0x4a, - 0x72, 0x19, 0x90, 0x8c, 0x7f, 0x32, 0x1d, 0x0c, 0x88, 0xbd, 0x5c, 0x42, 0xc2, 0x02, 0x08, 0x80, - 0x95, 0x4c, 0x4d, 0xa7, 0xa3, 0x8e, 0xfb, 0x97, 0xe9, 0xb4, 0x4d, 0x9b, 0xce, 0x24, 0x71, 0x1d, - 0x37, 0xea, 0x4c, 0xeb, 0x34, 0xfd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e5, 0x72, 0x91, 0x64, 0x08, 0x7b, 0xaa, 0xfc, 0xed, 0x28, 0x4c, 0x24, 0x49, 0xb1, 0x2b, - 0x90, 0x3d, 0xc0, 0x6f, 0x59, 0x4e, 0x9d, 0xc4, 0x07, 0x14, 0x13, 0x75, 0xe2, 0xe8, 0xfb, 0x74, - 0x62, 0x15, 0x0a, 0x16, 0xf2, 0x7c, 0xd4, 0xa2, 0x19, 0x91, 0x4e, 0x98, 0x53, 0x40, 0x41, 0x83, - 0x29, 0x95, 0x79, 0x5f, 0x29, 0xf5, 0x02, 0x4c, 0x04, 0x26, 0xa9, 0xae, 0x66, 0xb5, 0x79, 0x6e, - 0x9e, 0x8f, 0xb3, 0x64, 0xb1, 0xc1, 0x71, 0x0a, 0x86, 0x29, 0x25, 0x14, 0x79, 0x96, 0xea, 0x00, - 0xb6, 0x85, 0xec, 0x03, 0xb5, 0x85, 0x74, 0xb3, 0x9c, 0x3b, 0xc6, 0x4b, 0x4d, 0xac, 0x32, 0xe0, - 0x25, 0x9b, 0x4a, 0x75, 0x53, 0xba, 0xdc, 0x4b, 0xb5, 0xb1, 0x63, 0x32, 0x65, 0x93, 0x2e, 0xb2, - 0x81, 0x6c, 0xdb, 0x83, 0x92, 0x8b, 0x70, 0xde, 0xa3, 0x16, 0x7b, 0xb3, 0x3c, 0x31, 0x62, 0x31, - 0xf6, 0xcd, 0x14, 0x06, 0xa3, 0x2f, 0x36, 0xee, 0x86, 0x1f, 0xa5, 0x47, 0x21, 0x10, 0xa8, 0x24, - 0xad, 0x80, 0x54, 0xa1, 0x22, 0x17, 0x6e, 0x69, 0x1d, 0x34, 0x73, 0x0b, 0x4a, 0x51, 0xf7, 0x48, - 0xd3, 0x90, 0xf5, 0x7c, 0xcd, 0xf5, 0x49, 0x16, 0x66, 0x15, 0xfa, 0x20, 0x89, 0x90, 0x46, 0x56, - 0x8b, 0x54, 0xb9, 0xac, 0x82, 0xff, 0x94, 0x3e, 0xd5, 0x7b, 0xe1, 0x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 0x28, 0x55, 0x6a, 0x90, 0x25, 0xd9, - 0x25, 0x49, 0x50, 0xda, 0xa8, 0xae, 0x34, 0x36, 0xd4, 0xe6, 0xf6, 0xee, 0x7a, 0x73, 0xab, 0xba, - 0x21, 0x0a, 0x3d, 0x99, 0xd2, 0xf8, 0xf4, 0xde, 0xba, 0xd2, 0xa8, 0x8b, 0xa9, 0xb0, 0x6c, 0xbb, - 0x51, 0xdd, 0x6d, 0xd4, 0xc5, 0x74, 0x45, 0x87, 0xe9, 0x61, 0x75, 0x72, 0xe8, 0xca, 0x08, 0x85, - 0x38, 0x75, 0x4c, 0x88, 0x09, 0xd7, 0x40, 0x88, 0xff, 0x35, 0x05, 0x53, 0x43, 0x7a, 0xc5, 0xd0, - 0x49, 0x9e, 0x85, 0x2c, 0x4d, 0x51, 0xda, 0x3d, 0x9f, 0x18, 0xda, 0x74, 0x48, 0xc2, 0x0e, 0x74, - 0x50, 0x82, 0x0b, 0xef, 0x20, 0xd2, 0xc7, 0xec, 0x20, 0x30, 0xc5, 0x40, 0x4d, 0xff, 0xb9, 0x81, - 0x9a, 0x4e, 0xdb, 0xde, 0x72, 0x92, 0xb6, 0x47, 0x64, 0x27, 0xab, 0xed, 0xd9, 0x21, 0xb5, 0xfd, - 0x0a, 0x4c, 0x0e, 0x10, 0x25, 0xae, 0xb1, 0xaf, 0x08, 0x50, 0x3e, 0xce, 0x39, 0x31, 0x95, 0x2e, - 0x15, 0xa9, 0x74, 0x57, 0xfa, 0x3d, 0x78, 0xf6, 0xf8, 0x20, 0x0c, 0xc4, 0xfa, 0x0d, 0x01, 0x4e, - 0x0d, 0xdf, 0x29, 0x0e, 0xb5, 0xe1, 0x93, 0x30, 0xda, 0x41, 0xfe, 0xa1, 0xcd, 0x77, 0x4b, 0x1f, - 0x1d, 0xd2, 0x83, 0xf1, 0x70, 0x7f, 0xb0, 0x19, 0x2a, 0xdc, 0xc4, 0xd3, 0xc7, 0x6d, 0xf7, 0xa8, - 0x35, 0x03, 0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0x25, 0x0c, 0xab, 0x05, - 0x28, 0x59, 0x06, 0xf2, 0xc9, 0xa9, 0x85, 0x74, 0x33, 0x86, 0xe1, 0x4d, 0x66, 0x48, 0xa0, 0x2f, - 0x7f, 0x06, 0xa6, 0xf1, 0xdf, 0xa4, 0x2c, 0x85, 0x2d, 0x89, 0xbf, 0xf0, 0x2a, 0x7f, 0xff, 0x15, - 0xba, 0x1c, 0xa7, 0x02, 0x82, 0x90, 0x4d, 0xa1, 0x28, 0xb6, 0x91, 0xef, 0x23, 0xd7, 0x53, 0x35, - 0x73, 0x98, 0x79, 0xa1, 0x1b, 0x83, 0xf2, 0x57, 0xde, 0x8d, 0x46, 0x71, 0x8d, 0x22, 0xab, 0xa6, - 0x29, 0xef, 0xc1, 0xe9, 0x21, 0x59, 0x91, 0x80, 0xf3, 0x55, 0xc6, 0x39, 0x3d, 0x90, 0x19, 0x98, - 0x76, 0x1b, 0xb8, 0x3c, 0x88, 0x65, 0x02, 0xce, 0xdf, 0x63, 0x9c, 0x12, 0xc3, 0xf2, 0x90, 0x62, - 0xc6, 0xab, 0x30, 0x79, 0x03, 0xb9, 0xfb, 0xb6, 0xc7, 0x6e, 0x69, 0x12, 0xd0, 0xbd, 0xc6, 0xe8, - 0x26, 0x18, 0x90, 0x5c, 0xdb, 0x60, 0xae, 0xcb, 0x90, 0x3b, 0xd0, 0x74, 0x94, 0x80, 0xe2, 0xab, - 0x8c, 0x62, 0x0c, 0xeb, 0x63, 0x68, 0x15, 0x8a, 0x6d, 0x9b, 0x75, 0xa6, 0x78, 0xf8, 0xeb, 0x0c, - 0x5e, 0xe0, 0x18, 0x46, 0xe1, 0xd8, 0x4e, 0xd7, 0xc4, 0x6d, 0x2b, 0x9e, 0xe2, 0xf7, 0x39, 0x05, - 0xc7, 0x30, 0x8a, 0x13, 0xb8, 0xf5, 0x6b, 0x9c, 0xc2, 0x0b, 0xf9, 0xf3, 0x59, 0x28, 0xd8, 0x96, - 0x79, 0x64, 0x5b, 0x49,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0e, 0xc0, 0x46, 0xe3, 0xbf, 0xaf, 0xa3, - 0xa3, 0x38, 0xec, 0x0f, 0xb9, 0xd1, 0x4c, 0x5f, 0xfe, 0x04, 0xe4, 0xf1, 0x9f, 0xf4, 0x17, 0x50, - 0x31, 0xe0, 0xff, 0x65, 0xe0, 0x1e, 0x02, 0xcf, 0xec, 0xf9, 0x2d, 0xdf, 0x88, 0x77, 0xf6, 0xff, - 0xb1, 0x48, 0x73, 0x7d, 0xb9, 0x0a, 0x05, 0xcf, 0x6f, 0xb5, 0xba, 0x6c, 0x47, 0x13, 0x03, 0xff, - 0xff, 0xfb, 0xc1, 0x21, 0x37, 0xc0, 0xac, 0x34, 0x86, 0xdf, 0xd7, 0xc1, 0x9a, 0xbd, 0x66, 0xd3, - 0x9b, 0xba, 0x97, 0x2a, 0xf1, 0x57, 0x6e, 0x70, 0x7f, 0x0c, 0x97, 0xaa, 0xde, 0xca, 0x65, 0xd7, - 0x6f, 0xc5, 0xb0, 0x6c, 0xe6, 0x64, 0x77, 0x77, 0x95, 0x4f, 0x81, 0x50, 0x95, 0x4e, 0xc1, 0x28, - 0x79, 0x89, 0x9f, 0x26, 0x77, 0x92, 0x69, 0x85, 0x3d, 0x49, 0x8f, 0x80, 0xb0, 0xc2, 0x2e, 0x47, - 0x27, 0x16, 0x23, 0x33, 0xaf, 0x28, 0xc2, 0x8a, 0x9c, 0x79, 0xeb, 0xce, 0xdc, 0x48, 0x45, 0x07, - 0x61, 0x05, 0x6b, 0xd6, 0xc8, 0x17, 0xab, 0x01, 0xcd, 0x9a, 0x22, 0xd4, 0xf0, 0x70, 0x9d, 0xfd, - 0xa4, 0xae, 0x6f, 0xb8, 0xae, 0x08, 0x75, 0x69, 0x1e, 0x84, 0x55, 0x72, 0x4b, 0x5f, 0x58, 0x92, - 0xa2, 0xc3, 0x4d, 0xb3, 0x55, 0x53, 0x84, 0xd5, 0xca, 0xc3, 0x20, 0xd4, 0x43, 0x66, 0x0a, 0x61, - 0x33, 0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0xc3, 0xbb, 0xb3, 0xc2, 0x8f, 0xee, 0xce, 0x0a, 0xb7, 0xef, 0xcd, - 0x0a, 0x5f, 0xbf, 0x37, 0x2b, 0x7c, 0xf3, 0xde, 0xac, 0xf0, 0xdd, 0x7b, 0xb3, 0xc2, 0x9b, 0xf7, - 0x66, 0x85, 0xb7, 0xee, 0xcd, 0x0a, 0x6f, 0xdf, 0x9b, 0x15, 0x7e, 0x1c, 0x00, 0x00, 0xff, 0xff, - 0xfd, 0x83, 0xff, 0xfe, 0x8a, 0x34, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*B) - if !ok { - that2, ok := that.(B) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*D) - if !ok { - that2, ok := that.(D) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*C) - if !ok { - that2, ok := that.(C) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*U) - if !ok { - that2, ok := that.(U) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*UnoM) - if !ok { - that2, ok := that.(UnoM) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldA) - if !ok { - that2, ok := that.(OldA) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldB) - if !ok { - that2, ok := that.(OldB) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldC) - if !ok { - that2, ok := that.(OldC) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldU) - if !ok { - that2, ok := that.(OldU) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldUnoM) - if !ok { - that2, ok := that.(OldUnoM) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 (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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field2)))) - i += 8 - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field4)))) - i += 8 - } - 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(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f4)) - i += 4 - } - } - 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(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f5)) - i += 8 - } - } - 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++ - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Field2)))) - i += 8 - } - 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(float32(num)) - binary.LittleEndian.PutUint32(dAtA[i:], uint32(f8)) - i += 4 - } - } - 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(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f9)) - i += 8 - } - } - if m.XXX_unrecognized != nil { - i += copy(dAtA[i:], m.XXX_unrecognized) - } - return i, nil -} - -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(5) - 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 := string(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(10) - 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(10) - 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(10) - 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(10) - 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(5) - 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 := string(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(10) - 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 := string(randStringUnrecognized(r)) - this.Field1 = &v22 - } - if r.Intn(10) != 0 { - v23 := r.Intn(10) - 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 := string(randStringUnrecognized(r)) - this.Field1 = &v24 - } - if r.Intn(10) != 0 { - v25 := r.Intn(10) - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - 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 - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - 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 { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - v2 := float32(math.Float32frombits(v)) - m.Field7 = append(m.Field7, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field7", wireType) - } - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognized - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthUnrecognized - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field2 = append(m.Field2, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field2", wireType) - } - 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") -) - -func init() { proto.RegisterFile("unrecognized.proto", fileDescriptorUnrecognized) } - -var fileDescriptorUnrecognized = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x51, 0xbd, 0x4e, 0xc2, 0x50, - 0x18, 0xed, 0x47, 0x0b, 0x84, 0x2b, 0x46, 0xd3, 0xc1, 0xdc, 0x68, 0xbc, 0x6d, 0x3a, 0x75, 0x11, - 0x22, 0xbf, 0x91, 0x49, 0xda, 0xa6, 0x1a, 0x13, 0x43, 0xd2, 0x84, 0x17, 0x80, 0x62, 0x25, 0x41, - 0x6a, 0x08, 0x2c, 0x0e, 0xc6, 0xd1, 0xd1, 0xc4, 0x17, 0xb0, 0x9b, 0xa3, 0xa3, 0x8f, 0xc0, 0xc8, - 0xe8, 0x48, 0xfb, 0x04, 0x8e, 0x8e, 0xa6, 0xd7, 0xd2, 0x5c, 0x04, 0x92, 0xea, 0x76, 0xbf, 0x73, - 0xee, 0x77, 0xce, 0xc9, 0x77, 0x90, 0x38, 0x19, 0x8e, 0x7a, 0x5d, 0xd7, 0x19, 0xf6, 0xef, 0x7a, - 0x76, 0xe1, 0x76, 0xe4, 0x8e, 0x5d, 0x31, 0xcf, 0x62, 0xfb, 0x47, 0x4e, 0x7f, 0x7c, 0x3d, 0xe9, - 0x14, 0xba, 0xee, 0x4d, 0xd1, 0x71, 0x1d, 0xb7, 0x48, 0x3f, 0x75, 0x26, 0x57, 0x74, 0xa2, 0x03, - 0x7d, 0xfd, 0x2c, 0x2b, 0xa7, 0x08, 0x9a, 0xe2, 0x21, 0x02, 0x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, 0x6d, 0x53, 0x7a, 0x82, 0x2e, 0xef, 0xa9, 0x96, 0xbe, 0xa9, 0xce, 0x7f, 0x17, 0x99, - 0xb4, 0x98, 0x1a, 0xf5, 0x6f, 0xff, 0xf2, 0xcf, 0xad, 0xf5, 0x67, 0xae, 0xae, 0x9c, 0xa1, 0x6c, - 0xb8, 0xc7, 0x16, 0x93, 0x70, 0xb5, 0x91, 0x67, 0x8b, 0xd1, 0x2a, 0x53, 0x9f, 0x70, 0x33, 0x9f, - 0x70, 0x1f, 0x3e, 0xe1, 0xe6, 0x3e, 0x81, 0x4f, 0x9f, 0xc0, 0x97, 0x4f, 0xe0, 0x21, 0x20, 0xf0, - 0x1a, 0x10, 0x78, 0x0b, 0x08, 0xbc, 0x07, 0x04, 0xa6, 0x01, 0x81, 0x59, 0x40, 0x60, 0x1e, 0x10, - 0xf8, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x75, 0x16, 0xec, 0x6e, 0xfb, 0x03, 0x00, 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto deleted file mode 100644 index 483227a33..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognized.proto +++ /dev/null @@ -1,131 +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 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/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go b/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go deleted file mode 100644 index 6a595b53a..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognized/unrecognizedpb_test.go +++ /dev/null @@ -1,1880 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: unrecognized.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedD(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnoM{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldAProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldBMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldC(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldCMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldU(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldUMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldUnoM{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &B{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &D{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &C{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &U{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UnoM{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldA{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldB{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldC{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldU{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldUnoM{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &A{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - dAtA := proto.CompactTextString(p) - msg := &A{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &B{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - dAtA := proto.CompactTextString(p) - msg := &B{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &D{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - dAtA := proto.CompactTextString(p) - msg := &D{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &C{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - dAtA := proto.CompactTextString(p) - msg := &C{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &U{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - dAtA := proto.CompactTextString(p) - msg := &U{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &UnoM{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedUnoM(popr, true) - dAtA := proto.CompactTextString(p) - msg := &UnoM{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldA{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldA{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldB{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldB{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldC{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldC{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldU{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldU{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldUnoM{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldUnoM(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldUnoM{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &B{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedD(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &D{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedC(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &C{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedU(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &U{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUnoM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UnoM{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldA{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldB(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldB{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldC(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldC{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldU(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldU{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldUnoM(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldUnoM{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestCGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUnoMGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldAGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldBGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldCGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldUGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldUnoMGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestASize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedB(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedD(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedC(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedU(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldA(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldB(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldC(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldU(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile deleted file mode 100644 index 5ea242c4d..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/Makefile +++ /dev/null @@ -1,30 +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. - -regenerate: - (protoc --proto_path=../../../../../:../../protobuf/:. --gogo_out=. unrecognizedgroup.proto) diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go deleted file mode 100644 index 893cb5dea..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/oldnew_test.go +++ /dev/null @@ -1,128 +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 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/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go deleted file mode 100644 index ed4589ebf..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.pb.go +++ /dev/null @@ -1,1700 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: unrecognizedgroup.proto - -/* - 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 descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import gzip "compress/gzip" -import bytes "bytes" -import ioutil "io/ioutil" - -import strings "strings" -import reflect "reflect" - -import binary "encoding/binary" - -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 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() {} -func (*NewNoGroup) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognizedgroup, []int{0} } - -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() {} -func (*A) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognizedgroup, []int{1} } - -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" 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" json:"group2,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *OldWithGroup) Reset() { *m = OldWithGroup{} } -func (*OldWithGroup) ProtoMessage() {} -func (*OldWithGroup) Descriptor() ([]byte, []int) { return fileDescriptorUnrecognizedgroup, []int{2} } - -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() {} -func (*OldWithGroup_Group1) Descriptor() ([]byte, []int) { - return fileDescriptorUnrecognizedgroup, []int{2, 0} -} - -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 (*OldWithGroup_Group2) Descriptor() ([]byte, []int) { - return fileDescriptorUnrecognizedgroup, []int{2, 1} -} - -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) { - d := &descriptor.FileDescriptorSet{} - var gzipped = []byte{ - // 3866 bytes of a gzipped FileDescriptorSet - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x5a, 0x5b, 0x70, 0x1b, 0xe7, - 0x75, 0xd6, 0xe2, 0x46, 0xe0, 0x00, 0x04, 0x97, 0x4b, 0x9a, 0x82, 0xe8, 0x98, 0x92, 0xe0, 0x8b, - 0x28, 0xbb, 0xa1, 0x62, 0xca, 0x92, 0x25, 0xa8, 0xb1, 0x0b, 0x82, 0x10, 0x03, 0x95, 0x24, 0x90, - 0x05, 0x19, 0x5f, 0x32, 0x9d, 0x9d, 0xe5, 0xe2, 0x07, 0xb8, 0xd2, 0x62, 0x77, 0xb3, 0xbb, 0x90, - 0x4c, 0x4d, 0x1f, 0xd4, 0x71, 0x6f, 0x99, 0x4e, 0xdb, 0xf4, 0x32, 0x93, 0xc4, 0x75, 0xdc, 0xb8, - 0x33, 0xad, 0xd3, 0xf4, 0x96, 0x34, 0x6d, 0x9a, 0xf6, 0xa9, 0x2f, 0x69, 0x33, 0x7d, 0xe8, 0x34, - 0x6f, 0x7d, 0xe8, 0x43, 0xe4, 0x7a, 0xa6, 0x37, 0xa7, 0x49, 0x5b, 0x3f, 0x64, 0x46, 0x2f, 0x9d, - 0xff, 0xb6, 0xd8, 0x05, 0x40, 0xee, 0x32, 0x33, 0xb6, 0x5f, 0x24, 0xee, 0xf9, 0xcf, 0xf7, 0xed, - 0xf9, 0xcf, 0x7f, 0xfe, 0x73, 0xce, 0xff, 0x2f, 0xe0, 0x07, 0x57, 0xe1, 0x4c, 0xcf, 0xb2, 0x7a, - 0x06, 0xba, 0x60, 0x3b, 0x96, 0x67, 0xed, 0x0d, 0xba, 0x17, 0x3a, 0xc8, 0xd5, 0x1c, 0xdd, 0xf6, - 0x2c, 0x67, 0x85, 0xc8, 0xa4, 0x19, 0xaa, 0xb1, 0xc2, 0x35, 0xca, 0x5b, 0x30, 0x7b, 0x5d, 0x37, - 0xd0, 0xba, 0xaf, 0xd8, 0x46, 0x9e, 0x74, 0x05, 0x52, 0x5d, 0xdd, 0x40, 0x25, 0xe1, 0x4c, 0x72, - 0x39, 0xbf, 0xfa, 0xd8, 0xca, 0x08, 0x68, 0x25, 0x8c, 0x68, 0x61, 0xb1, 0x4c, 0x10, 0xe5, 0x77, - 0x52, 0x30, 0x37, 0x61, 0x54, 0x92, 0x20, 0x65, 0xaa, 0x7d, 0xcc, 0x28, 0x2c, 0xe7, 0x64, 0xf2, - 0xb7, 0x54, 0x82, 0x29, 0x5b, 0xd5, 0x6e, 0xa9, 0x3d, 0x54, 0x4a, 0x10, 0x31, 0x7f, 0x94, 0x96, - 0x00, 0x3a, 0xc8, 0x46, 0x66, 0x07, 0x99, 0xda, 0x41, 0x29, 0x79, 0x26, 0xb9, 0x9c, 0x93, 0x03, - 0x12, 0xe9, 0x29, 0x98, 0xb5, 0x07, 0x7b, 0x86, 0xae, 0x29, 0x01, 0x35, 0x38, 0x93, 0x5c, 0x4e, - 0xcb, 0x22, 0x1d, 0x58, 0x1f, 0x2a, 0x9f, 0x83, 0x99, 0x3b, 0x48, 0xbd, 0x15, 0x54, 0xcd, 0x13, - 0xd5, 0x22, 0x16, 0x07, 0x14, 0x6b, 0x50, 0xe8, 0x23, 0xd7, 0x55, 0x7b, 0x48, 0xf1, 0x0e, 0x6c, - 0x54, 0x4a, 0x91, 0xd9, 0x9f, 0x19, 0x9b, 0xfd, 0xe8, 0xcc, 0xf3, 0x0c, 0xb5, 0x73, 0x60, 0x23, - 0xa9, 0x0a, 0x39, 0x64, 0x0e, 0xfa, 0x94, 0x21, 0x7d, 0x88, 0xff, 0xea, 0xe6, 0xa0, 0x3f, 0xca, - 0x92, 0xc5, 0x30, 0x46, 0x31, 0xe5, 0x22, 0xe7, 0xb6, 0xae, 0xa1, 0x52, 0x86, 0x10, 0x9c, 0x1b, - 0x23, 0x68, 0xd3, 0xf1, 0x51, 0x0e, 0x8e, 0x93, 0x6a, 0x90, 0x43, 0xaf, 0x78, 0xc8, 0x74, 0x75, - 0xcb, 0x2c, 0x4d, 0x11, 0x92, 0xc7, 0x27, 0xac, 0x22, 0x32, 0x3a, 0xa3, 0x14, 0x43, 0x9c, 0x74, - 0x19, 0xa6, 0x2c, 0xdb, 0xd3, 0x2d, 0xd3, 0x2d, 0x65, 0xcf, 0x08, 0xcb, 0xf9, 0xd5, 0x8f, 0x4c, - 0x0c, 0x84, 0x26, 0xd5, 0x91, 0xb9, 0xb2, 0xd4, 0x00, 0xd1, 0xb5, 0x06, 0x8e, 0x86, 0x14, 0xcd, - 0xea, 0x20, 0x45, 0x37, 0xbb, 0x56, 0x29, 0x47, 0x08, 0x4e, 0x8f, 0x4f, 0x84, 0x28, 0xd6, 0xac, - 0x0e, 0x6a, 0x98, 0x5d, 0x4b, 0x2e, 0xba, 0xa1, 0x67, 0x69, 0x01, 0x32, 0xee, 0x81, 0xe9, 0xa9, - 0xaf, 0x94, 0x0a, 0x24, 0x42, 0xd8, 0x53, 0xf9, 0xaf, 0x33, 0x30, 0x13, 0x27, 0xc4, 0xae, 0x41, - 0xba, 0x8b, 0x67, 0x59, 0x4a, 0x1c, 0xc7, 0x07, 0x14, 0x13, 0x76, 0x62, 0xe6, 0xc7, 0x74, 0x62, - 0x15, 0xf2, 0x26, 0x72, 0x3d, 0xd4, 0xa1, 0x11, 0x91, 0x8c, 0x19, 0x53, 0x40, 0x41, 0xe3, 0x21, - 0x95, 0xfa, 0xb1, 0x42, 0xea, 0x45, 0x98, 0xf1, 0x4d, 0x52, 0x1c, 0xd5, 0xec, 0xf1, 0xd8, 0xbc, - 0x10, 0x65, 0xc9, 0x4a, 0x9d, 0xe3, 0x64, 0x0c, 0x93, 0x8b, 0x28, 0xf4, 0x2c, 0xad, 0x03, 0x58, - 0x26, 0xb2, 0xba, 0x4a, 0x07, 0x69, 0x46, 0x29, 0x7b, 0x88, 0x97, 0x9a, 0x58, 0x65, 0xcc, 0x4b, - 0x16, 0x95, 0x6a, 0x86, 0x74, 0x75, 0x18, 0x6a, 0x53, 0x87, 0x44, 0xca, 0x16, 0xdd, 0x64, 0x63, - 0xd1, 0xb6, 0x0b, 0x45, 0x07, 0xe1, 0xb8, 0x47, 0x1d, 0x36, 0xb3, 0x1c, 0x31, 0x62, 0x25, 0x72, - 0x66, 0x32, 0x83, 0xd1, 0x89, 0x4d, 0x3b, 0xc1, 0x47, 0xe9, 0x51, 0xf0, 0x05, 0x0a, 0x09, 0x2b, - 0x20, 0x59, 0xa8, 0xc0, 0x85, 0xdb, 0x6a, 0x1f, 0x2d, 0xde, 0x85, 0x62, 0xd8, 0x3d, 0xd2, 0x3c, - 0xa4, 0x5d, 0x4f, 0x75, 0x3c, 0x12, 0x85, 0x69, 0x99, 0x3e, 0x48, 0x22, 0x24, 0x91, 0xd9, 0x21, - 0x59, 0x2e, 0x2d, 0xe3, 0x3f, 0xa5, 0x9f, 0x1a, 0x4e, 0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, - 0x0e, 0x7a, 0x85, 0x64, 0xcf, 0xb4, 0x4c, 0x37, 0x5a, 0x03, 0x4b, 0xf0, 0xeb, 0x6f, 0xba, 0x96, - 0xc9, 0x43, 0x93, 0xbc, 0x02, 0x0b, 0xc8, 0xeb, 0x9f, 0x1d, 0x4d, 0xdc, 0x8f, 0x4c, 0x9e, 0xde, - 0x68, 0x4c, 0x95, 0xbf, 0x99, 0x80, 0x14, 0xc9, 0x17, 0x33, 0x90, 0xdf, 0x79, 0xa9, 0x55, 0x57, - 0xd6, 0x9b, 0xbb, 0x6b, 0x9b, 0x75, 0x51, 0x90, 0x8a, 0x00, 0x44, 0x70, 0x7d, 0xb3, 0x59, 0xdd, - 0x11, 0x13, 0xfe, 0x73, 0x63, 0x7b, 0xe7, 0xf2, 0x33, 0x62, 0xd2, 0x07, 0xec, 0x52, 0x41, 0x2a, - 0xa8, 0x70, 0x71, 0x55, 0x4c, 0x4b, 0x22, 0x14, 0x28, 0x41, 0xe3, 0xc5, 0xfa, 0xfa, 0xe5, 0x67, - 0xc4, 0x4c, 0x58, 0x72, 0x71, 0x55, 0x9c, 0x92, 0xa6, 0x21, 0x47, 0x24, 0x6b, 0xcd, 0xe6, 0xa6, - 0x98, 0xf5, 0x39, 0xdb, 0x3b, 0x72, 0x63, 0x7b, 0x43, 0xcc, 0xf9, 0x9c, 0x1b, 0x72, 0x73, 0xb7, - 0x25, 0x82, 0xcf, 0xb0, 0x55, 0x6f, 0xb7, 0xab, 0x1b, 0x75, 0x31, 0xef, 0x6b, 0xac, 0xbd, 0xb4, - 0x53, 0x6f, 0x8b, 0x85, 0x90, 0x59, 0x17, 0x57, 0xc5, 0x69, 0xff, 0x15, 0xf5, 0xed, 0xdd, 0x2d, - 0xb1, 0x28, 0xcd, 0xc2, 0x34, 0x7d, 0x05, 0x37, 0x62, 0x66, 0x44, 0x74, 0xf9, 0x19, 0x51, 0x1c, - 0x1a, 0x42, 0x59, 0x66, 0x43, 0x82, 0xcb, 0xcf, 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63, - 0x96, 0x7e, 0x36, 0x01, 0x0f, 0x4d, 0x24, 0x9f, 0x68, 0xe8, 0x23, 0x00, 0xba, 0x69, 0x0f, 0x3c, - 0xda, 0x11, 0xd1, 0x04, 0x9b, 0x23, 0x12, 0x92, 0xbc, 0x70, 0xf2, 0x1c, 0x78, 0xfe, 0x78, 0x92, - 0x8c, 0x03, 0x15, 0x11, 0x85, 0x2b, 0x43, 0x43, 0x53, 0xc4, 0xd0, 0xa5, 0x43, 0x66, 0x3a, 0x16, - 0x98, 0x1f, 0x03, 0x51, 0x33, 0x74, 0x64, 0x7a, 0x8a, 0xeb, 0x39, 0x48, 0xed, 0xeb, 0x66, 0x8f, - 0x54, 0x90, 0x6c, 0x25, 0xdd, 0x55, 0x0d, 0x17, 0xc9, 0x33, 0x74, 0xb8, 0xcd, 0x47, 0x31, 0x82, - 0x04, 0x90, 0x13, 0x40, 0x64, 0x42, 0x08, 0x3a, 0xec, 0x23, 0xca, 0xdf, 0xc8, 0x42, 0x3e, 0xd0, - 0x57, 0x4b, 0x67, 0xa1, 0x70, 0x53, 0xbd, 0xad, 0x2a, 0xfc, 0xac, 0x44, 0x3d, 0x91, 0xc7, 0xb2, - 0x16, 0x3b, 0x2f, 0x7d, 0x0c, 0xe6, 0x89, 0x8a, 0x35, 0xf0, 0x90, 0xa3, 0x68, 0x86, 0xea, 0xba, - 0xc4, 0x69, 0x59, 0xa2, 0x2a, 0xe1, 0xb1, 0x26, 0x1e, 0xaa, 0xf1, 0x11, 0xe9, 0x12, 0xcc, 0x11, - 0x44, 0x7f, 0x60, 0x78, 0xba, 0x6d, 0x20, 0x05, 0x9f, 0xde, 0x5c, 0x52, 0x49, 0x7c, 0xcb, 0x66, - 0xb1, 0xc6, 0x16, 0x53, 0xc0, 0x16, 0xb9, 0xd2, 0x3a, 0x3c, 0x42, 0x60, 0x3d, 0x64, 0x22, 0x47, - 0xf5, 0x90, 0x82, 0x3e, 0x33, 0x50, 0x0d, 0x57, 0x51, 0xcd,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42, 0xd3, 0xe8, 0xbc, 0xa0, 0x7b, 0xfb, 0x47, 0x5b, 0xf7, - 0x1c, 0x64, 0xc8, 0xfb, 0x9e, 0x26, 0x97, 0xab, 0xb0, 0xfa, 0xc4, 0x04, 0x53, 0x82, 0x44, 0x2b, - 0xe4, 0xdf, 0xa7, 0x65, 0x86, 0x3a, 0x74, 0x76, 0x9c, 0x77, 0x95, 0xdc, 0xc2, 0xc6, 0xe5, 0x5d, - 0x65, 0xbc, 0xab, 0x8b, 0x2d, 0xc8, 0x6c, 0x84, 0xdf, 0x70, 0x98, 0x5f, 0x57, 0xf9, 0x4f, 0xd5, - 0xe8, 0xd3, 0x61, 0x16, 0x2d, 0x5e, 0x61, 0x8c, 0xab, 0xb1, 0x18, 0x87, 0xc8, 0xd5, 0xb5, 0xe5, - 0xef, 0xdc, 0x5f, 0x3a, 0xf1, 0x4f, 0xf7, 0x97, 0x4e, 0xfc, 0xf3, 0xfd, 0xa5, 0x13, 0xdf, 0xbb, - 0xbf, 0x24, 0xfc, 0xf0, 0xfe, 0x92, 0xf0, 0xa3, 0xfb, 0x4b, 0xc2, 0xbd, 0xb7, 0x97, 0x84, 0xaf, - 0xbc, 0xbd, 0x24, 0x7c, 0xed, 0xed, 0x25, 0xe1, 0x5b, 0x6f, 0x2f, 0x09, 0xff, 0x1f, 0x00, 0x00, - 0xff, 0xff, 0x87, 0x2f, 0x10, 0x76, 0xfc, 0x32, 0x00, 0x00, - } - r := bytes.NewReader(gzipped) - gzipr, err := gzip.NewReader(r) - if err != nil { - panic(err) - } - ungzipped, err := ioutil.ReadAll(gzipr) - if err != nil { - panic(err) - } - if err := proto.Unmarshal(ungzipped, d); err != nil { - panic(err) - } - return d -} -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 { - return this == nil - } - - that1, ok := that.(*NewNoGroup) - if !ok { - that2, ok := that.(NewNoGroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*A) - if !ok { - that2, ok := that.(A) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldWithGroup) - if !ok { - that2, ok := that.(OldWithGroup) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldWithGroup_Group1) - if !ok { - that2, ok := that.(OldWithGroup_Group1) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 { - return this == nil - } - - that1, ok := that.(*OldWithGroup_Group2) - if !ok { - that2, ok := that.(OldWithGroup_Group2) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } 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 (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(float64(num)) - binary.LittleEndian.PutUint64(dAtA[i:], uint64(f1)) - i += 8 - } - } - 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 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(10) - 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(10) - 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(10) - 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(10) - 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 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field3 = append(m.Field3, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowUnrecognizedgroup - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthUnrecognizedgroup - } - postIndex := iNdEx + packedLen - if postIndex > l { - return io.ErrUnexpectedEOF - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Field3 = append(m.Field3, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Field3", wireType) - } - 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") -) - -func init() { proto.RegisterFile("unrecognizedgroup.proto", fileDescriptorUnrecognizedgroup) } - -var fileDescriptorUnrecognizedgroup = []byte{ - // 305 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2f, 0xcd, 0x2b, 0x4a, - 0x4d, 0xce, 0x4f, 0xcf, 0xcb, 0xac, 0x4a, 0x4d, 0x49, 0x2f, 0xca, 0x2f, 0x2d, 0xd0, 0x2b, 0x28, - 0xca,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 0x23, 0xa9, 0x00, 0x2e, 0x36, 0x77, 0x54, 0x1b, - 0x70, 0x85, 0xab, 0x11, 0xd8, 0xe5, 0xac, 0x50, 0x71, 0x23, 0x5c, 0x2e, 0x92, 0xb2, 0x80, 0x9a, - 0x68, 0x44, 0x94, 0x89, 0x08, 0x9d, 0x46, 0x4e, 0x1a, 0x27, 0x1e, 0xca, 0x31, 0x5c, 0x78, 0x28, - 0xc7, 0x70, 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, 0x0d, 0x8f, 0xe4, 0x18, 0x77, - 0x3c, 0x92, 0x63, 0x04, 0x04, 0x00, 0x00, 0xff, 0xff, 0xef, 0x1c, 0xa5, 0xe4, 0x6d, 0x02, 0x00, - 0x00, -} diff --git a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto deleted file mode 100644 index 2e5813658..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgroup.proto +++ /dev/null @@ -1,77 +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 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/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go b/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go deleted file mode 100644 index ea8ce4f1a..000000000 --- a/vendor/github.com/gogo/protobuf/test/unrecognizedgroup/unrecognizedgrouppb_test.go +++ /dev/null @@ -1,766 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: unrecognizedgroup.proto - -/* -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 rand "math/rand" -import time "time" -import proto "github.com/gogo/protobuf/proto" -import jsonpb "github.com/gogo/protobuf/jsonpb" -import fmt "fmt" -import parser "go/parser" -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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewNoGroupMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(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 := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldWithGroup_Group1Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group1{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestOldWithGroup_Group2Proto(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group2{} - if err := proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewNoGroupJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewNoGroup{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &A{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group1{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - marshaler := jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &OldWithGroup_Group2{} - err = jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &NewNoGroup{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - dAtA := proto.CompactTextString(p) - msg := &NewNoGroup{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &A{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - dAtA := proto.CompactTextString(p) - msg := &A{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldWithGroup{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldWithGroup{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldWithGroup_Group1{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group1(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldWithGroup_Group1{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - dAtA := proto.MarshalTextString(p) - msg := &OldWithGroup_Group2{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedOldWithGroup_Group2(popr, true) - dAtA := proto.CompactTextString(p) - msg := &OldWithGroup_Group2{} - if err := proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewNoGroup(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NewNoGroup{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedA(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &A{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group1(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup_Group1{} - if err := proto.Unmarshal(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 := rand.New(rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedOldWithGroup_Group2(popr, false) - dAtA, err := proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &OldWithGroup_Group2{} - if err := proto.Unmarshal(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 := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldWithGroupGoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldWithGroup_Group1GoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestOldWithGroup_Group2GoString(t *testing.T) { - popr := rand.New(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 := parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNewNoGroupSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := rand.New(rand.NewSource(seed)) - p := NewPopulatedNewNoGroup(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(rand.NewSource(seed)) - p := NewPopulatedA(popr, true) - size2 := proto.Size(p) - dAtA, err := proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := 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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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 := rand.New(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/github.com/gogo/protobuf/test/uuid_test.go b/vendor/github.com/gogo/protobuf/test/uuid_test.go deleted file mode 100644 index 5f3b72801..000000000 --- a/vendor/github.com/gogo/protobuf/test/uuid_test.go +++ /dev/null @@ -1,51 +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 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/github.com/gogo/protobuf/types/any_test.go b/vendor/github.com/gogo/protobuf/types/any_test.go deleted file mode 100644 index 14679a244..000000000 --- a/vendor/github.com/gogo/protobuf/types/any_test.go +++ /dev/null @@ -1,112 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types - -import ( - "testing" - - "github.com/gogo/protobuf/proto" - pb "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -) - -func TestMarshalUnmarshal(t *testing.T) { - orig := &Any{Value: []byte("test")} - - packed, err := MarshalAny(orig) - if err != nil { - t.Errorf("MarshalAny(%+v): got: _, %v exp: _, nil", orig, err) - } - - unpacked := &Any{} - err = UnmarshalAny(packed, unpacked) - if err != nil || !proto.Equal(unpacked, orig) { - t.Errorf("got: %v, %+v; want nil, %+v", err, unpacked, orig) - } -} - -func TestIs(t *testing.T) { - a, err := MarshalAny(&pb.FileDescriptorProto{}) - if err != nil { - t.Fatal(err) - } - if Is(a, &pb.DescriptorProto{}) { - t.Error("FileDescriptorProto is not a DescriptorProto, but Is says it is") - } - if !Is(a, &pb.FileDescriptorProto{}) { - t.Error("FileDescriptorProto is indeed a FileDescriptorProto, but Is says it is not") - } -} - -func TestIsDifferentUrlPrefixes(t *testing.T) { - m := &pb.FileDescriptorProto{} - a := &Any{TypeUrl: "foo/bar/" + proto.MessageName(m)} - if !Is(a, m) { - t.Errorf("message with type url %q didn't satisfy Is for type %q", a.TypeUrl, proto.MessageName(m)) - } -} - -func TestUnmarshalDynamic(t *testing.T) { - want := &pb.FileDescriptorProto{Name: proto.String("foo")} - a, err := MarshalAny(want) - if err != nil { - t.Fatal(err) - } - var got DynamicAny - if err := UnmarshalAny(a, &got); err != nil { - t.Fatal(err) - } - if !proto.Equal(got.Message, want) { - t.Errorf("invalid result from UnmarshalAny, got %q want %q", got.Message, want) - } -} - -func TestEmpty(t *testing.T) { - want := &pb.FileDescriptorProto{} - a, err := MarshalAny(want) - if err != nil { - t.Fatal(err) - } - got, err := EmptyAny(a) - if err != nil { - t.Fatal(err) - } - if !proto.Equal(got, want) { - t.Errorf("unequal empty message, got %q, want %q", got, want) - } - - // that's a valid type_url for a message which shouldn't be linked into this - // test binary. We want an error. - a.TypeUrl = "type.googleapis.com/google.protobuf.TestAny" - if _, err := EmptyAny(a); err == nil { - t.Errorf("got no error for an attempt to create a message of type %q, which shouldn't be linked in", a.TypeUrl) - } -} diff --git a/vendor/github.com/gogo/protobuf/types/duration_test.go b/vendor/github.com/gogo/protobuf/types/duration_test.go deleted file mode 100644 index 7f2bcb429..000000000 --- a/vendor/github.com/gogo/protobuf/types/duration_test.go +++ /dev/null @@ -1,120 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types - -import ( - "math" - "testing" - "time" - - "github.com/gogo/protobuf/proto" -) - -const ( - minGoSeconds = math.MinInt64 / int64(1e9) - maxGoSeconds = math.MaxInt64 / int64(1e9) -) - -var durationTests = []struct { - proto *Duration - isValid bool - inRange bool - dur time.Duration -}{ - // The zero duration. - {&Duration{Seconds: 0, Nanos: 0}, true, true, 0}, - // Some ordinary non-zero durations. - {&Duration{Seconds: 100, Nanos: 0}, true, true, 100 * time.Second}, - {&Duration{Seconds: -100, Nanos: 0}, true, true, -100 * time.Second}, - {&Duration{Seconds: 100, Nanos: 987}, true, true, 100*time.Second + 987}, - {&Duration{Seconds: -100, Nanos: -987}, true, true, -(100*time.Second + 987)}, - // The largest duration representable in Go. - {&Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, true, math.MaxInt64}, - // The smallest duration representable in Go. - {&Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, true, math.MinInt64}, - {nil, false, false, 0}, - {&Duration{Seconds: -100, Nanos: 987}, false, false, 0}, - {&Duration{Seconds: 100, Nanos: -987}, false, false, 0}, - {&Duration{Seconds: math.MinInt64, Nanos: 0}, false, false, 0}, - {&Duration{Seconds: math.MaxInt64, Nanos: 0}, false, false, 0}, - // The largest valid duration. - {&Duration{Seconds: maxSeconds, Nanos: 1e9 - 1}, true, false, 0}, - // The smallest valid duration. - {&Duration{Seconds: minSeconds, Nanos: -(1e9 - 1)}, true, false, 0}, - // The smallest invalid duration above the valid range. - {&Duration{Seconds: maxSeconds + 1, Nanos: 0}, false, false, 0}, - // The largest invalid duration below the valid range. - {&Duration{Seconds: minSeconds - 1, Nanos: -(1e9 - 1)}, false, false, 0}, - // One nanosecond past the largest duration representable in Go. - {&Duration{Seconds: maxGoSeconds, Nanos: int32(math.MaxInt64-1e9*maxGoSeconds) + 1}, true, false, 0}, - // One nanosecond past the smallest duration representable in Go. - {&Duration{Seconds: minGoSeconds, Nanos: int32(math.MinInt64-1e9*minGoSeconds) - 1}, true, false, 0}, - // One second past the largest duration representable in Go. - {&Duration{Seconds: maxGoSeconds + 1, Nanos: int32(math.MaxInt64 - 1e9*maxGoSeconds)}, true, false, 0}, - // One second past the smallest duration representable in Go. - {&Duration{Seconds: minGoSeconds - 1, Nanos: int32(math.MinInt64 - 1e9*minGoSeconds)}, true, false, 0}, -} - -func TestValidateDuration(t *testing.T) { - for _, test := range durationTests { - err := validateDuration(test.proto) - gotValid := (err == nil) - if gotValid != test.isValid { - t.Errorf("validateDuration(%v) = %t, want %t", test.proto, gotValid, test.isValid) - } - } -} - -func TestDurationFromProto(t *testing.T) { - for _, test := range durationTests { - got, err := DurationFromProto(test.proto) - gotOK := (err == nil) - wantOK := test.isValid && test.inRange - if gotOK != wantOK { - t.Errorf("DurationFromProto(%v) ok = %t, want %t", test.proto, gotOK, wantOK) - } - if err == nil && got != test.dur { - t.Errorf("DurationFromProto(%v) = %v, want %v", test.proto, got, test.dur) - } - } -} - -func TestDurationProto(t *testing.T) { - for _, test := range durationTests { - if test.isValid && test.inRange { - got := DurationProto(test.dur) - if !proto.Equal(got, test.proto) { - t.Errorf("DurationProto(%v) = %v, want %v", test.dur, got, test.proto) - } - } - } -} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp_test.go b/vendor/github.com/gogo/protobuf/types/timestamp_test.go deleted file mode 100644 index 6af8631e5..000000000 --- a/vendor/github.com/gogo/protobuf/types/timestamp_test.go +++ /dev/null @@ -1,152 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types - -import ( - "math" - "testing" - "time" - - "github.com/gogo/protobuf/proto" -) - -var tests = []struct { - ts *Timestamp - valid bool - t time.Time -}{ - // The timestamp representing the Unix epoch date. - {&Timestamp{Seconds: 0, Nanos: 0}, true, utcDate(1970, 1, 1)}, - // The smallest representable timestamp. - {&Timestamp{Seconds: math.MinInt64, Nanos: math.MinInt32}, false, - time.Unix(math.MinInt64, math.MinInt32).UTC()}, - // The smallest representable timestamp with non-negative nanos. - {&Timestamp{Seconds: math.MinInt64, Nanos: 0}, false, time.Unix(math.MinInt64, 0).UTC()}, - // The earliest valid timestamp. - {&Timestamp{Seconds: minValidSeconds, Nanos: 0}, true, utcDate(1, 1, 1)}, - //"0001-01-01T00:00:00Z"}, - // The largest representable timestamp. - {&Timestamp{Seconds: math.MaxInt64, Nanos: math.MaxInt32}, false, - time.Unix(math.MaxInt64, math.MaxInt32).UTC()}, - // The largest representable timestamp with nanos in range. - {&Timestamp{Seconds: math.MaxInt64, Nanos: 1e9 - 1}, false, - time.Unix(math.MaxInt64, 1e9-1).UTC()}, - // The largest valid timestamp. - {&Timestamp{Seconds: maxValidSeconds - 1, Nanos: 1e9 - 1}, true, - time.Date(9999, 12, 31, 23, 59, 59, 1e9-1, time.UTC)}, - // The smallest invalid timestamp that is larger than the valid range. - {&Timestamp{Seconds: maxValidSeconds, Nanos: 0}, false, time.Unix(maxValidSeconds, 0).UTC()}, - // A date before the epoch. - {&Timestamp{Seconds: -281836800, Nanos: 0}, true, utcDate(1961, 1, 26)}, - // A date after the epoch. - {&Timestamp{Seconds: 1296000000, Nanos: 0}, true, utcDate(2011, 1, 26)}, - // A date after the epoch, in the middle of the day. - {&Timestamp{Seconds: 1296012345, Nanos: 940483}, true, - time.Date(2011, 1, 26, 3, 25, 45, 940483, time.UTC)}, -} - -func TestValidateTimestamp(t *testing.T) { - for _, s := range tests { - got := validateTimestamp(s.ts) - if (got == nil) != s.valid { - t.Errorf("validateTimestamp(%v) = %v, want %v", s.ts, got, s.valid) - } - } -} - -func TestTimestampFromProto(t *testing.T) { - for _, s := range tests { - got, err := TimestampFromProto(s.ts) - if (err == nil) != s.valid { - t.Errorf("TimestampFromProto(%v) error = %v, but valid = %t", s.ts, err, s.valid) - } else if s.valid && got != s.t { - t.Errorf("TimestampFromProto(%v) = %v, want %v", s.ts, got, s.t) - } - } - // Special case: a nil TimestampFromProto is an error, but returns the 0 Unix time. - got, err := TimestampFromProto(nil) - want := time.Unix(0, 0).UTC() - if got != want { - t.Errorf("TimestampFromProto(nil) = %v, want %v", got, want) - } - if err == nil { - t.Errorf("TimestampFromProto(nil) error = nil, expected error") - } -} - -func TestTimestampProto(t *testing.T) { - for _, s := range tests { - got, err := TimestampProto(s.t) - if (err == nil) != s.valid { - t.Errorf("TimestampProto(%v) error = %v, but valid = %t", s.t, err, s.valid) - } else if s.valid && !proto.Equal(got, s.ts) { - t.Errorf("TimestampProto(%v) = %v, want %v", s.t, got, s.ts) - } - } - // No corresponding special case here: no time.Time results in a nil Timestamp. -} - -func TestTimestampString(t *testing.T) { - for _, test := range []struct { - ts *Timestamp - want string - }{ - // Not much testing needed because presumably time.Format is - // well-tested. - {&Timestamp{Seconds: 0, Nanos: 0}, "1970-01-01T00:00:00Z"}, - {&Timestamp{Seconds: minValidSeconds - 1, Nanos: 0}, "(timestamp: &types.Timestamp{Seconds: -62135596801,\nNanos: 0,\n} before 0001-01-01)"}, - } { - got := TimestampString(test.ts) - if got != test.want { - t.Errorf("TimestampString(%v) = %q, want %q", test.ts, got, test.want) - } - } -} - -func utcDate(year, month, day int) time.Time { - return time.Date(year, time.Month(month), day, 0, 0, 0, 0, time.UTC) -} - -func TestTimestampNow(t *testing.T) { - // Bracket the expected time. - before := time.Now() - ts := TimestampNow() - after := time.Now() - - tm, err := TimestampFromProto(ts) - if err != nil { - t.Errorf("between %v and %v\nTimestampNow() = %v\nwhich is invalid (%v)", before, after, ts, err) - } - if tm.Before(before) || tm.After(after) { - t.Errorf("between %v and %v\nTimestamp(TimestampNow()) = %v", before, after, tm) - } -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/Makefile b/vendor/github.com/gogo/protobuf/vanity/test/Makefile deleted file mode 100644 index 0958c4a9e..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/Makefile +++ /dev/null @@ -1,46 +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. - -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/github.com/gogo/protobuf/vanity/test/doc.go b/vendor/github.com/gogo/protobuf/vanity/test/doc.go deleted file mode 100644 index 56e540407..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/doc.go +++ /dev/null @@ -1 +0,0 @@ -package test diff --git a/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore b/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore deleted file mode 100644 index 9b0b440dc..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/gofast/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.pb.go \ No newline at end of file diff --git a/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto b/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto deleted file mode 100644 index b0f9279a1..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/gogovanity.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/gogo/protobuf/vanity/test/proto3.proto b/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto deleted file mode 100644 index aa2f4ac51..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/proto3.proto +++ /dev/null @@ -1,35 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 = "proto3"; - -package vanity; - -message Aproto3 { - string B = 1; -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto b/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto deleted file mode 100644 index c21750bc0..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/vanity.proto +++ /dev/null @@ -1,36 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 vanity; - -message A { - optional string Strings = 1; - required int64 Int = 2; -} diff --git a/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go b/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go deleted file mode 100644 index a0e5b824a..000000000 --- a/vendor/github.com/gogo/protobuf/vanity/test/vanity_test.go +++ /dev/null @@ -1,93 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2015, 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 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/github.com/golang/groupcache/lru/LICENSE b/vendor/github.com/golang/groupcache/LICENSE similarity index 100% rename from vendor/github.com/golang/groupcache/lru/LICENSE rename to vendor/github.com/golang/groupcache/LICENSE diff --git a/vendor/github.com/golang/protobuf/AUTHORS b/vendor/github.com/golang/protobuf/AUTHORS new file mode 100644 index 000000000..15167cd74 --- /dev/null +++ b/vendor/github.com/golang/protobuf/AUTHORS @@ -0,0 +1,3 @@ +# 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/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS b/vendor/github.com/golang/protobuf/CONTRIBUTORS similarity index 55% rename from vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS rename to vendor/github.com/golang/protobuf/CONTRIBUTORS index b368efb7f..1c4577e96 100644 --- a/vendor/github.com/gogo/protobuf/GOLANG_CONTRIBUTORS +++ b/vendor/github.com/golang/protobuf/CONTRIBUTORS @@ -1,5 +1,3 @@ -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. \ No newline at end of file +# visible at http://tip.golang.org/CONTRIBUTORS. diff --git a/vendor/github.com/golang/protobuf/proto/LICENSE b/vendor/github.com/golang/protobuf/LICENSE similarity index 100% rename from vendor/github.com/golang/protobuf/proto/LICENSE rename to vendor/github.com/golang/protobuf/LICENSE diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile b/vendor/github.com/golang/protobuf/proto/Makefile similarity index 84% rename from vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile rename to vendor/github.com/golang/protobuf/proto/Makefile index a42cc3717..e2e0651a9 100644 --- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/Makefile +++ b/vendor/github.com/golang/protobuf/proto/Makefile @@ -29,5 +29,15 @@ # (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 +install: + go install + +test: install generate-test-pbs + go test + + +generate-test-pbs: + make install + make -C testdata + protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto + make diff --git a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go b/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go deleted file mode 100644 index cc4d0489f..000000000 --- a/vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by protoc-gen-go. -// 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 - IntMap - IntMaps -*/ -package proto3_proto - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/any" -import testdata "github.com/golang/protobuf/proto/testdata" - -// 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 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)) -} -func (Message_Humour) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } - -type Message struct { - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Hilarity Message_Humour `protobuf:"varint,2,opt,name=hilarity,enum=proto3_proto.Message_Humour" json:"hilarity,omitempty"` - HeightInCm uint32 `protobuf:"varint,3,opt,name=height_in_cm,json=heightInCm" 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,json=resultCount" json:"result_count,omitempty"` - TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman" json:"true_scotsman,omitempty"` - Score float32 `protobuf:"fixed32,9,opt,name=score" json:"score,omitempty"` - Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"` - ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey" json:"short_key,omitempty"` - Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"` - RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"` - Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"` - Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Anything *google_protobuf.Any `protobuf:"bytes,14,opt,name=anything" json:"anything,omitempty"` - ManyThings []*google_protobuf.Any `protobuf:"bytes,15,rep,name=many_things,json=manyThings" json:"many_things,omitempty"` - Submessage *Message `protobuf:"bytes,17,opt,name=submessage" json:"submessage,omitempty"` - Children []*Message `protobuf:"bytes,18,rep,name=children" json:"children,omitempty"` -} - -func (m *Message) Reset() { *m = Message{} } -func (m *Message) String() string { return proto.CompactTextString(m) } -func (*Message) ProtoMessage() {} -func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } - -func (m *Message) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Message) GetHilarity() Message_Humour { - if m != nil { - return m.Hilarity - } - return Message_UNKNOWN -} - -func (m *Message) GetHeightInCm() uint32 { - if m != nil { - return m.HeightInCm - } - return 0 -} - -func (m *Message) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *Message) GetResultCount() int64 { - if m != nil { - return m.ResultCount - } - return 0 -} - -func (m *Message) GetTrueScotsman() bool { - if m != nil { - return m.TrueScotsman - } - return false -} - -func (m *Message) GetScore() float32 { - if m != nil { - return m.Score - } - return 0 -} - -func (m *Message) GetKey() []uint64 { - if m != nil { - return m.Key - } - return nil -} - -func (m *Message) GetShortKey() []int32 { - if m != nil { - return m.ShortKey - } - return nil -} - -func (m *Message) GetNested() *Nested { - if m != nil { - return m.Nested - } - return nil -} - -func (m *Message) GetRFunny() []Message_Humour { - if m != nil { - return m.RFunny - } - 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 -} - -func (m *Message) GetAnything() *google_protobuf.Any { - if m != nil { - return m.Anything - } - return nil -} - -func (m *Message) GetManyThings() []*google_protobuf.Any { - if m != nil { - return m.ManyThings - } - return nil -} - -func (m *Message) GetSubmessage() *Message { - if m != nil { - return m.Submessage - } - return nil -} - -func (m *Message) GetChildren() []*Message { - if m != nil { - return m.Children - } - return nil -} - -type Nested struct { - Bunny string `protobuf:"bytes,1,opt,name=bunny" json:"bunny,omitempty"` - Cute bool `protobuf:"varint,2,opt,name=cute" json:"cute,omitempty"` -} - -func (m *Nested) Reset() { *m = Nested{} } -func (m *Nested) String() string { return proto.CompactTextString(m) } -func (*Nested) ProtoMessage() {} -func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *Nested) GetBunny() string { - if m != nil { - return m.Bunny - } - return "" -} - -func (m *Nested) GetCute() bool { - if m != nil { - return m.Cute - } - return false -} - -type MessageWithMap struct { - ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" 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 (*MessageWithMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } - -func (m *MessageWithMap) GetByteMapping() map[bool][]byte { - if m != nil { - return m.ByteMapping - } - return nil -} - -type IntMap struct { - Rtt map[int32]int32 `protobuf:"bytes,1,rep,name=rtt" json:"rtt,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` -} - -func (m *IntMap) Reset() { *m = IntMap{} } -func (m *IntMap) String() string { return proto.CompactTextString(m) } -func (*IntMap) ProtoMessage() {} -func (*IntMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *IntMap) GetRtt() map[int32]int32 { - if m != nil { - return m.Rtt - } - return nil -} - -type IntMaps struct { - Maps []*IntMap `protobuf:"bytes,1,rep,name=maps" json:"maps,omitempty"` -} - -func (m *IntMaps) Reset() { *m = IntMaps{} } -func (m *IntMaps) String() string { return proto.CompactTextString(m) } -func (*IntMaps) ProtoMessage() {} -func (*IntMaps) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *IntMaps) GetMaps() []*IntMap { - if m != nil { - return m.Maps - } - 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.RegisterType((*IntMap)(nil), "proto3_proto.IntMap") - proto.RegisterType((*IntMaps)(nil), "proto3_proto.IntMaps") - proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value) -} - -func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 733 bytes of a gzipped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fd, 0x90, 0xf9, 0x8b, 0x08, 0xeb, 0x8e, 0xe6, 0x76, 0x08, 0x28, 0x6c, - 0xc4, 0xae, 0x23, 0xa1, 0x27, 0xec, 0xe0, 0xba, 0xa3, 0xb9, 0x16, 0x91, 0x6b, 0xf4, 0x05, 0x58, - 0x09, 0x4d, 0xb3, 0x2d, 0xf7, 0x17, 0x71, 0xc6, 0x38, 0x6e, 0x39, 0x9a, 0xab, 0x13, 0x53, 0x61, - 0xd7, 0x02, 0x42, 0x5f, 0x42, 0x87, 0x27, 0x19, 0xf5, 0xd3, 0x45, 0xcc, 0xd3, 0x28, 0x60, 0xd8, - 0x70, 0x34, 0xd7, 0x20, 0x96, 0x00, 0x67, 0x05, 0x86, 0xba, 0xd0, 0x48, 0x17, 0x71, 0x42, 0x71, - 0xdb, 0xd1, 0xdc, 0x1a, 0x51, 0x1b, 0x64, 0x83, 0xfe, 0x37, 0xcd, 0x71, 0xc3, 0xd1, 0xdd, 0x3a, - 0x11, 0x4b, 0xf4, 0x29, 0xb4, 0xd3, 0x4d, 0x9c, 0x70, 0x5f, 0xe0, 0x27, 0x8e, 0xee, 0x36, 0x88, - 0x21, 0x81, 0x3b, 0x9a, 0xa3, 0x6f, 0xa1, 0xc9, 0x68, 0xca, 0xe9, 0x12, 0x37, 0x1d, 0xcd, 0x35, - 0x87, 0xdd, 0x97, 0xbf, 0x3e, 0x91, 0x67, 0xa4, 0xe0, 0xa0, 0x73, 0x68, 0x25, 0xfe, 0x2a, 0x63, - 0x2c, 0xc7, 0xb6, 0xa3, 0x7f, 0x30, 0xa9, 0x66, 0x72, 0x2b, 0xb8, 0xe8, 0x67, 0x68, 0x71, 0x9a, - 0x24, 0x41, 0xc8, 0x30, 0x38, 0xba, 0x6b, 0x0e, 0xfb, 0xd5, 0x65, 0x0f, 0x8a, 0x74, 0xc3, 0x78, - 0x92, 0x93, 0x7d, 0x09, 0xba, 0x00, 0x75, 0xff, 0x43, 0x7f, 0x15, 0xd2, 0xed, 0x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a7, 0x8f, 0x93, 0x99, 0xad, 0xa1, 0x0e, 0xb4, 0x67, 0xe3, 0xcb, 0xe9, - 0xec, 0x61, 0x74, 0x7d, 0x67, 0xd7, 0xd0, 0x31, 0x98, 0x57, 0xa3, 0xf1, 0xd8, 0xbf, 0xba, 0x1c, - 0x8d, 0x6f, 0xfe, 0xb2, 0xf5, 0xfe, 0x10, 0x9a, 0xca, 0xac, 0x78, 0x33, 0x73, 0x39, 0xbe, 0xca, - 0x8f, 0xda, 0x88, 0x57, 0xba, 0xc8, 0xb8, 0x32, 0x64, 0x10, 0xb9, 0xee, 0xff, 0xa7, 0xc1, 0x51, - 0x91, 0xd9, 0x53, 0xc8, 0x37, 0xf7, 0xc1, 0x0e, 0x4d, 0xc1, 0x9a, 0xe7, 0x9c, 0xfa, 0x51, 0xb0, - 0xdb, 0x89, 0x39, 0xd0, 0x64, 0xce, 0xdf, 0x55, 0xe6, 0x5c, 0xd4, 0x78, 0x57, 0x39, 0xa7, 0xf7, - 0x8a, 0x5f, 0x4c, 0xd5, 0xfc, 0x19, 0xe9, 0xfd, 0x02, 0xf6, 0x6b, 0x42, 0x39, 0x30, 0x43, 0x05, - 0xd6, 0x2d, 0x07, 0x66, 0x95, 0x93, 0xf9, 0x07, 0x9a, 0x23, 0xc6, 0x85, 0xb7, 0x01, 0xe8, 0x09, - 0xe7, 0x85, 0xa5, 0xcf, 0x5f, 0x5a, 0x52, 0x14, 0x8f, 0x70, 0xae, 0x2c, 0x08, 0x66, 0xef, 0x47, - 0x30, 0xf6, 0x40, 0x59, 0xb2, 0x51, 0x21, 0xd9, 0x28, 0x4b, 0x9e, 0x41, 0x4b, 0xf5, 0x4b, 0x91, - 0x0b, 0xf5, 0x28, 0xd8, 0xa5, 0x85, 0x68, 0xb7, 0x4a, 0x94, 0x48, 0xc6, 0xbc, 0xa9, 0x8e, 0xde, - 0x05, 0x00, 0x00, 0xff, 0xff, 0x75, 0x38, 0xad, 0x84, 0xe4, 0x05, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/protobuf/ptypes/any/LICENSE b/vendor/github.com/golang/protobuf/ptypes/any/LICENSE deleted file mode 100644 index 1b1b1921e..000000000 --- a/vendor/github.com/golang/protobuf/ptypes/any/LICENSE +++ /dev/null @@ -1,31 +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. - diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go deleted file mode 100644 index f34601723..000000000 --- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google/protobuf/any.proto - -/* -Package any is a generated protocol buffer package. - -It is generated from these files: - google/protobuf/any.proto - -It has these top-level messages: - Any -*/ -package any - -import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -type Any struct { - // A URL/resource name whose content describes the type of the - // serialized protocol buffer message. - // - // For URLs which use the scheme `http`, `https`, or no scheme, the - // following restrictions and interpretations apply: - // - // * If no scheme is provided, `https` is assumed. - // * The last segment of the URL's path must represent the fully - // qualified name of the type (as in `path/google.protobuf.Duration`). - // The name should be in a canonical form (e.g., leading "." is - // not accepted). - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *Any) Reset() { *m = Any{} } -func (m *Any) String() string { return proto.CompactTextString(m) } -func (*Any) ProtoMessage() {} -func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (*Any) XXX_WellKnownType() string { return "Any" } - -func (m *Any) GetTypeUrl() string { - if m != nil { - return m.TypeUrl - } - return "" -} - -func (m *Any) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func init() { - proto.RegisterType((*Any)(nil), "google.protobuf.Any") -} - -func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) } - -var fileDescriptor0 = []byte{ - // 185 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, - 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a, - 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, - 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, - 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xca, 0xe7, 0x12, 0x4e, 0xce, - 0xcf, 0xd5, 0x43, 0x33, 0xce, 0x89, 0xc3, 0x31, 0xaf, 0x32, 0x00, 0xc4, 0x09, 0x60, 0x8c, 0x52, - 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, - 0x4b, 0x47, 0xb8, 0xa8, 0x00, 0x64, 0x7a, 0x31, 0xc8, 0x61, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, - 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x8c, 0x0a, 0x80, 0x2a, 0xd1, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, - 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0x29, 0x4d, 0x62, 0x03, 0xeb, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, - 0xff, 0x13, 0xf8, 0xe8, 0x42, 0xdd, 0x00, 0x00, 0x00, -} diff --git a/vendor/github.com/golang/snappy/.gitignore b/vendor/github.com/golang/snappy/.gitignore new file mode 100644 index 000000000..042091d9b --- /dev/null +++ b/vendor/github.com/golang/snappy/.gitignore @@ -0,0 +1,16 @@ +cmd/snappytool/snappytool +testdata/bench + +# These explicitly listed benchmark data files are for an obsolete version of +# snappy_test.go. +testdata/alice29.txt +testdata/asyoulik.txt +testdata/fireworks.jpeg +testdata/geo.protodata +testdata/html +testdata/html_x_4 +testdata/kppkn.gtb +testdata/lcet10.txt +testdata/paper-100k.pdf +testdata/plrabn12.txt +testdata/urls.10K diff --git a/vendor/github.com/golang/snappy/AUTHORS b/vendor/github.com/golang/snappy/AUTHORS new file mode 100644 index 000000000..bcfa19520 --- /dev/null +++ b/vendor/github.com/golang/snappy/AUTHORS @@ -0,0 +1,15 @@ +# This is the official list of Snappy-Go authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Damian Gryski +Google Inc. +Jan Mercl <0xjnml@gmail.com> +Rodolfo Carvalho +Sebastien Binet diff --git a/vendor/github.com/golang/snappy/CONTRIBUTORS b/vendor/github.com/golang/snappy/CONTRIBUTORS new file mode 100644 index 000000000..931ae3160 --- /dev/null +++ b/vendor/github.com/golang/snappy/CONTRIBUTORS @@ -0,0 +1,37 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the Snappy-Go repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name + +# Please keep the list sorted. + +Damian Gryski +Jan Mercl <0xjnml@gmail.com> +Kai Backman +Marc-Antoine Ruel +Nigel Tao +Rob Pike +Rodolfo Carvalho +Russ Cox +Sebastien Binet diff --git a/vendor/github.com/golang/snappy/README b/vendor/github.com/golang/snappy/README new file mode 100644 index 000000000..cea12879a --- /dev/null +++ b/vendor/github.com/golang/snappy/README @@ -0,0 +1,107 @@ +The Snappy compression format in the Go programming language. + +To download and install from source: +$ go get github.com/golang/snappy + +Unless otherwise noted, the Snappy-Go source files are distributed +under the BSD-style license found in the LICENSE file. + + + +Benchmarks. + +The golang/snappy benchmarks include compressing (Z) and decompressing (U) ten +or so files, the same set used by the C++ Snappy code (github.com/google/snappy +and note the "google", not "golang"). On an "Intel(R) Core(TM) i7-3770 CPU @ +3.40GHz", Go's GOARCH=amd64 numbers as of 2016-05-29: + +"go test -test.bench=." + +_UFlat0-8 2.19GB/s ± 0% html +_UFlat1-8 1.41GB/s ± 0% urls +_UFlat2-8 23.5GB/s ± 2% jpg +_UFlat3-8 1.91GB/s ± 0% jpg_200 +_UFlat4-8 14.0GB/s ± 1% pdf +_UFlat5-8 1.97GB/s ± 0% html4 +_UFlat6-8 814MB/s ± 0% txt1 +_UFlat7-8 785MB/s ± 0% txt2 +_UFlat8-8 857MB/s ± 0% txt3 +_UFlat9-8 719MB/s ± 1% txt4 +_UFlat10-8 2.84GB/s ± 0% pb +_UFlat11-8 1.05GB/s ± 0% gaviota + +_ZFlat0-8 1.04GB/s ± 0% html +_ZFlat1-8 534MB/s ± 0% urls +_ZFlat2-8 15.7GB/s ± 1% jpg +_ZFlat3-8 740MB/s ± 3% jpg_200 +_ZFlat4-8 9.20GB/s ± 1% pdf +_ZFlat5-8 991MB/s ± 0% html4 +_ZFlat6-8 379MB/s ± 0% txt1 +_ZFlat7-8 352MB/s ± 0% txt2 +_ZFlat8-8 396MB/s ± 1% txt3 +_ZFlat9-8 327MB/s ± 1% txt4 +_ZFlat10-8 1.33GB/s ± 1% pb +_ZFlat11-8 605MB/s ± 1% gaviota + + + +"go test -test.bench=. -tags=noasm" + +_UFlat0-8 621MB/s ± 2% html +_UFlat1-8 494MB/s ± 1% urls +_UFlat2-8 23.2GB/s ± 1% jpg +_UFlat3-8 1.12GB/s ± 1% jpg_200 +_UFlat4-8 4.35GB/s ± 1% pdf +_UFlat5-8 609MB/s ± 0% html4 +_UFlat6-8 296MB/s ± 0% txt1 +_UFlat7-8 288MB/s ± 0% txt2 +_UFlat8-8 309MB/s ± 1% txt3 +_UFlat9-8 280MB/s ± 1% txt4 +_UFlat10-8 753MB/s ± 0% pb +_UFlat11-8 400MB/s ± 0% gaviota + +_ZFlat0-8 409MB/s ± 1% html +_ZFlat1-8 250MB/s ± 1% urls +_ZFlat2-8 12.3GB/s ± 1% jpg +_ZFlat3-8 132MB/s ± 0% jpg_200 +_ZFlat4-8 2.92GB/s ± 0% pdf +_ZFlat5-8 405MB/s ± 1% html4 +_ZFlat6-8 179MB/s ± 1% txt1 +_ZFlat7-8 170MB/s ± 1% txt2 +_ZFlat8-8 189MB/s ± 1% txt3 +_ZFlat9-8 164MB/s ± 1% txt4 +_ZFlat10-8 479MB/s ± 1% pb +_ZFlat11-8 270MB/s ± 1% gaviota + + + +For comparison (Go's encoded output is byte-for-byte identical to C++'s), here +are the numbers from C++ Snappy's + +make CXXFLAGS="-O2 -DNDEBUG -g" clean snappy_unittest.log && cat snappy_unittest.log + +BM_UFlat/0 2.4GB/s html +BM_UFlat/1 1.4GB/s urls +BM_UFlat/2 21.8GB/s jpg +BM_UFlat/3 1.5GB/s jpg_200 +BM_UFlat/4 13.3GB/s pdf +BM_UFlat/5 2.1GB/s html4 +BM_UFlat/6 1.0GB/s txt1 +BM_UFlat/7 959.4MB/s txt2 +BM_UFlat/8 1.0GB/s txt3 +BM_UFlat/9 864.5MB/s txt4 +BM_UFlat/10 2.9GB/s pb +BM_UFlat/11 1.2GB/s gaviota + +BM_ZFlat/0 944.3MB/s html (22.31 %) +BM_ZFlat/1 501.6MB/s urls (47.78 %) +BM_ZFlat/2 14.3GB/s jpg (99.95 %) +BM_ZFlat/3 538.3MB/s jpg_200 (73.00 %) +BM_ZFlat/4 8.3GB/s pdf (83.30 %) +BM_ZFlat/5 903.5MB/s html4 (22.52 %) +BM_ZFlat/6 336.0MB/s txt1 (57.88 %) +BM_ZFlat/7 312.3MB/s txt2 (61.91 %) +BM_ZFlat/8 353.1MB/s txt3 (54.99 %) +BM_ZFlat/9 289.9MB/s txt4 (66.26 %) +BM_ZFlat/10 1.2GB/s pb (19.68 %) +BM_ZFlat/11 527.4MB/s gaviota (37.72 %) diff --git a/vendor/github.com/golang/snappy/cmd/snappytool/main.cpp b/vendor/github.com/golang/snappy/cmd/snappytool/main.cpp deleted file mode 100644 index fc31f5173..000000000 --- a/vendor/github.com/golang/snappy/cmd/snappytool/main.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* -To build the snappytool binary: -g++ main.cpp /usr/lib/libsnappy.a -o snappytool -or, if you have built the C++ snappy library from source: -g++ main.cpp /path/to/your/snappy/.libs/libsnappy.a -o snappytool -after running "make" from your snappy checkout directory. -*/ - -#include -#include -#include -#include - -#include "snappy.h" - -#define N 1000000 - -char dst[N]; -char src[N]; - -int main(int argc, char** argv) { - // Parse args. - if (argc != 2) { - fprintf(stderr, "exactly one of -d or -e must be given\n"); - return 1; - } - bool decode = strcmp(argv[1], "-d") == 0; - bool encode = strcmp(argv[1], "-e") == 0; - if (decode == encode) { - fprintf(stderr, "exactly one of -d or -e must be given\n"); - return 1; - } - - // Read all of stdin into src[:s]. - size_t s = 0; - while (1) { - if (s == N) { - fprintf(stderr, "input too large\n"); - return 1; - } - ssize_t n = read(0, src+s, N-s); - if (n == 0) { - break; - } - if (n < 0) { - fprintf(stderr, "read error: %s\n", strerror(errno)); - // TODO: handle EAGAIN, EINTR? - return 1; - } - s += n; - } - - // Encode or decode src[:s] to dst[:d], and write to stdout. - size_t d = 0; - if (encode) { - if (N < snappy::MaxCompressedLength(s)) { - fprintf(stderr, "input too large after encoding\n"); - return 1; - } - snappy::RawCompress(src, s, dst, &d); - } else { - if (!snappy::GetUncompressedLength(src, s, &d)) { - fprintf(stderr, "could not get uncompressed length\n"); - return 1; - } - if (N < d) { - fprintf(stderr, "input too large after decoding\n"); - return 1; - } - if (!snappy::RawUncompress(src, s, dst)) { - fprintf(stderr, "input was not valid Snappy-compressed data\n"); - return 1; - } - } - write(1, dst, d); - return 0; -} diff --git a/vendor/github.com/jackpal/gateway/.travis.yml b/vendor/github.com/jackpal/gateway/.travis.yml new file mode 100644 index 000000000..9c3f6547d --- /dev/null +++ b/vendor/github.com/jackpal/gateway/.travis.yml @@ -0,0 +1,13 @@ +language: go + +go: + - 1.6.2 + - tip + +allowed_failures: + - go: tip + +install: + - go get -d -v ./... && go install -race -v ./... + +script: go test -race -v ./... diff --git a/vendor/github.com/jackpal/gateway/README.md b/vendor/github.com/jackpal/gateway/README.md new file mode 100644 index 000000000..6a2b21255 --- /dev/null +++ b/vendor/github.com/jackpal/gateway/README.md @@ -0,0 +1,18 @@ +# gateway + +A simple library for discovering the IP address of the default gateway. + + +[![Build Status](https://travis-ci.org/jackpal/gateway.svg)](https://travis-ci.org/jackpal/gateway) + +Provides implementations for: + ++ FreeBSD ++ Linux ++ OS X (Darwin) ++ Solaris ++ Windows + +Other platforms use an implementation that always returns an error. + +Pull requests for other OSs happily considered! diff --git a/vendor/github.com/kballard/go-shellquote/README b/vendor/github.com/kballard/go-shellquote/README new file mode 100644 index 000000000..4d34e87af --- /dev/null +++ b/vendor/github.com/kballard/go-shellquote/README @@ -0,0 +1,36 @@ +PACKAGE + +package shellquote + import "github.com/kballard/go-shellquote" + + Shellquote provides utilities for joining/splitting strings using sh's + word-splitting rules. + +VARIABLES + +var ( + UnterminatedSingleQuoteError = errors.New("Unterminated single-quoted string") + UnterminatedDoubleQuoteError = errors.New("Unterminated double-quoted string") + UnterminatedEscapeError = errors.New("Unterminated backslash-escape") +) + + +FUNCTIONS + +func Join(args ...string) string + Join quotes each argument and joins them with a space. If passed to + /bin/sh, the resulting string will be split back into the original + arguments. + +func Split(input string) (words []string, err error) + Split splits a string according to /bin/sh's word-splitting rules. It + supports backslash-escapes, single-quotes, and double-quotes. Notably it + does not support the $'' style of quoting. It also doesn't attempt to + perform any other sort of expansion, including brace expansion, shell + expansion, or pathname expansion. + + If the given input has an unterminated quoted string or ends in a + backslash-escape, one of UnterminatedSingleQuoteError, + UnterminatedDoubleQuoteError, or UnterminatedEscapeError is returned. + + diff --git a/vendor/github.com/klauspost/cpuid/LICENSE b/vendor/github.com/klauspost/cpuid/LICENSE deleted file mode 100644 index 5cec7ee94..000000000 --- a/vendor/github.com/klauspost/cpuid/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Klaus Post - -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/klauspost/cpuid/cpuid.go b/vendor/github.com/klauspost/cpuid/cpuid.go deleted file mode 100644 index 44e50946f..000000000 --- a/vendor/github.com/klauspost/cpuid/cpuid.go +++ /dev/null @@ -1,1030 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// Package cpuid provides information about the CPU running the current program. -// -// CPU features are detected on startup, and kept for fast access through the life of the application. -// Currently x86 / x64 (AMD64) is supported. -// -// You can access the CPU information by accessing the shared CPU variable of the cpuid library. -// -// Package home: https://github.com/klauspost/cpuid -package cpuid - -import "strings" - -// Vendor is a representation of a CPU vendor. -type Vendor int - -const ( - Other Vendor = iota - Intel - AMD - VIA - Transmeta - NSC - KVM // Kernel-based Virtual Machine - MSVM // Microsoft Hyper-V or Windows Virtual PC - VMware - XenHVM -) - -const ( - CMOV = 1 << iota // i686 CMOV - NX // NX (No-Execute) bit - AMD3DNOW // AMD 3DNOW - AMD3DNOWEXT // AMD 3DNowExt - MMX // standard MMX - MMXEXT // SSE integer functions or AMD MMX ext - SSE // SSE functions - SSE2 // P4 SSE functions - SSE3 // Prescott SSE3 functions - SSSE3 // Conroe SSSE3 functions - SSE4 // Penryn SSE4.1 functions - SSE4A // AMD Barcelona microarchitecture SSE4a instructions - SSE42 // Nehalem SSE4.2 functions - AVX // AVX functions - AVX2 // AVX2 functions - FMA3 // Intel FMA 3 - FMA4 // Bulldozer FMA4 functions - XOP // Bulldozer XOP functions - F16C // Half-precision floating-point conversion - BMI1 // Bit Manipulation Instruction Set 1 - BMI2 // Bit Manipulation Instruction Set 2 - TBM // AMD Trailing Bit Manipulation - LZCNT // LZCNT instruction - POPCNT // POPCNT instruction - AESNI // Advanced Encryption Standard New Instructions - CLMUL // Carry-less Multiplication - HTT // Hyperthreading (enabled) - HLE // Hardware Lock Elision - RTM // Restricted Transactional Memory - RDRAND // RDRAND instruction is available - RDSEED // RDSEED instruction is available - ADX // Intel ADX (Multi-Precision Add-Carry Instruction Extensions) - SHA // Intel SHA Extensions - AVX512F // AVX-512 Foundation - AVX512DQ // AVX-512 Doubleword and Quadword Instructions - AVX512IFMA // AVX-512 Integer Fused Multiply-Add Instructions - AVX512PF // AVX-512 Prefetch Instructions - AVX512ER // AVX-512 Exponential and Reciprocal Instructions - AVX512CD // AVX-512 Conflict Detection Instructions - AVX512BW // AVX-512 Byte and Word Instructions - AVX512VL // AVX-512 Vector Length Extensions - AVX512VBMI // AVX-512 Vector Bit Manipulation Instructions - MPX // Intel MPX (Memory Protection Extensions) - ERMS // Enhanced REP MOVSB/STOSB - RDTSCP // RDTSCP Instruction - CX16 // CMPXCHG16B Instruction - SGX // Software Guard Extensions - - // Performance indicators - SSE2SLOW // SSE2 is supported, but usually not faster - SSE3SLOW // SSE3 is supported, but usually not faster - ATOM // Atom processor, some SSSE3 instructions are slower -) - -var flagNames = map[Flags]string{ - CMOV: "CMOV", // i686 CMOV - NX: "NX", // NX (No-Execute) bit - AMD3DNOW: "AMD3DNOW", // AMD 3DNOW - AMD3DNOWEXT: "AMD3DNOWEXT", // AMD 3DNowExt - MMX: "MMX", // Standard MMX - MMXEXT: "MMXEXT", // SSE integer functions or AMD MMX ext - SSE: "SSE", // SSE functions - SSE2: "SSE2", // P4 SSE2 functions - SSE3: "SSE3", // Prescott SSE3 functions - SSSE3: "SSSE3", // Conroe SSSE3 functions - SSE4: "SSE4.1", // Penryn SSE4.1 functions - SSE4A: "SSE4A", // AMD Barcelona microarchitecture SSE4a instructions - SSE42: "SSE4.2", // Nehalem SSE4.2 functions - AVX: "AVX", // AVX functions - AVX2: "AVX2", // AVX functions - FMA3: "FMA3", // Intel FMA 3 - FMA4: "FMA4", // Bulldozer FMA4 functions - XOP: "XOP", // Bulldozer XOP functions - F16C: "F16C", // Half-precision floating-point conversion - BMI1: "BMI1", // Bit Manipulation Instruction Set 1 - BMI2: "BMI2", // Bit Manipulation Instruction Set 2 - TBM: "TBM", // AMD Trailing Bit Manipulation - LZCNT: "LZCNT", // LZCNT instruction - POPCNT: "POPCNT", // POPCNT instruction - AESNI: "AESNI", // Advanced Encryption Standard New Instructions - CLMUL: "CLMUL", // Carry-less Multiplication - HTT: "HTT", // Hyperthreading (enabled) - HLE: "HLE", // Hardware Lock Elision - RTM: "RTM", // Restricted Transactional Memory - RDRAND: "RDRAND", // RDRAND instruction is available - RDSEED: "RDSEED", // RDSEED instruction is available - ADX: "ADX", // Intel ADX (Multi-Precision Add-Carry Instruction Extensions) - SHA: "SHA", // Intel SHA Extensions - AVX512F: "AVX512F", // AVX-512 Foundation - AVX512DQ: "AVX512DQ", // AVX-512 Doubleword and Quadword Instructions - AVX512IFMA: "AVX512IFMA", // AVX-512 Integer Fused Multiply-Add Instructions - AVX512PF: "AVX512PF", // AVX-512 Prefetch Instructions - AVX512ER: "AVX512ER", // AVX-512 Exponential and Reciprocal Instructions - AVX512CD: "AVX512CD", // AVX-512 Conflict Detection Instructions - AVX512BW: "AVX512BW", // AVX-512 Byte and Word Instructions - AVX512VL: "AVX512VL", // AVX-512 Vector Length Extensions - AVX512VBMI: "AVX512VBMI", // AVX-512 Vector Bit Manipulation Instructions - MPX: "MPX", // Intel MPX (Memory Protection Extensions) - ERMS: "ERMS", // Enhanced REP MOVSB/STOSB - RDTSCP: "RDTSCP", // RDTSCP Instruction - CX16: "CX16", // CMPXCHG16B Instruction - SGX: "SGX", // Software Guard Extensions - - // Performance indicators - SSE2SLOW: "SSE2SLOW", // SSE2 supported, but usually not faster - SSE3SLOW: "SSE3SLOW", // SSE3 supported, but usually not faster - ATOM: "ATOM", // Atom processor, some SSSE3 instructions are slower - -} - -// CPUInfo contains information about the detected system CPU. -type CPUInfo struct { - BrandName string // Brand name reported by the CPU - VendorID Vendor // Comparable CPU vendor ID - Features Flags // Features of the CPU - PhysicalCores int // Number of physical processor cores in your CPU. Will be 0 if undetectable. - ThreadsPerCore int // Number of threads per physical core. Will be 1 if undetectable. - LogicalCores int // Number of physical cores times threads that can run on each core through the use of hyperthreading. Will be 0 if undetectable. - Family int // CPU family number - Model int // CPU model number - CacheLine int // Cache line size in bytes. Will be 0 if undetectable. - Cache struct { - L1I int // L1 Instruction Cache (per core or shared). Will be -1 if undetected - L1D int // L1 Data Cache (per core or shared). Will be -1 if undetected - L2 int // L2 Cache (per core or shared). Will be -1 if undetected - L3 int // L3 Instruction Cache (per core or shared). Will be -1 if undetected - } - SGX SGXSupport - maxFunc uint32 - maxExFunc uint32 -} - -var cpuid func(op uint32) (eax, ebx, ecx, edx uint32) -var cpuidex func(op, op2 uint32) (eax, ebx, ecx, edx uint32) -var xgetbv func(index uint32) (eax, edx uint32) -var rdtscpAsm func() (eax, ebx, ecx, edx uint32) - -// CPU contains information about the CPU as detected on startup, -// or when Detect last was called. -// -// Use this as the primary entry point to you data, -// this way queries are -var CPU CPUInfo - -func init() { - initCPU() - Detect() -} - -// Detect will re-detect current CPU info. -// This will replace the content of the exported CPU variable. -// -// Unless you expect the CPU to change while you are running your program -// you should not need to call this function. -// If you call this, you must ensure that no other goroutine is accessing the -// exported CPU variable. -func Detect() { - CPU.maxFunc = maxFunctionID() - CPU.maxExFunc = maxExtendedFunction() - CPU.BrandName = brandName() - CPU.CacheLine = cacheLine() - CPU.Family, CPU.Model = familyModel() - CPU.Features = support() - CPU.SGX = hasSGX(CPU.Features&SGX != 0) - CPU.ThreadsPerCore = threadsPerCore() - CPU.LogicalCores = logicalCores() - CPU.PhysicalCores = physicalCores() - CPU.VendorID = vendorID() - CPU.cacheSize() -} - -// Generated here: http://play.golang.org/p/BxFH2Gdc0G - -// Cmov indicates support of CMOV instructions -func (c CPUInfo) Cmov() bool { - return c.Features&CMOV != 0 -} - -// Amd3dnow indicates support of AMD 3DNOW! instructions -func (c CPUInfo) Amd3dnow() bool { - return c.Features&AMD3DNOW != 0 -} - -// Amd3dnowExt indicates support of AMD 3DNOW! Extended instructions -func (c CPUInfo) Amd3dnowExt() bool { - return c.Features&AMD3DNOWEXT != 0 -} - -// MMX indicates support of MMX instructions -func (c CPUInfo) MMX() bool { - return c.Features&MMX != 0 -} - -// MMXExt indicates support of MMXEXT instructions -// (SSE integer functions or AMD MMX ext) -func (c CPUInfo) MMXExt() bool { - return c.Features&MMXEXT != 0 -} - -// SSE indicates support of SSE instructions -func (c CPUInfo) SSE() bool { - return c.Features&SSE != 0 -} - -// SSE2 indicates support of SSE 2 instructions -func (c CPUInfo) SSE2() bool { - return c.Features&SSE2 != 0 -} - -// SSE3 indicates support of SSE 3 instructions -func (c CPUInfo) SSE3() bool { - return c.Features&SSE3 != 0 -} - -// SSSE3 indicates support of SSSE 3 instructions -func (c CPUInfo) SSSE3() bool { - return c.Features&SSSE3 != 0 -} - -// SSE4 indicates support of SSE 4 (also called SSE 4.1) instructions -func (c CPUInfo) SSE4() bool { - return c.Features&SSE4 != 0 -} - -// SSE42 indicates support of SSE4.2 instructions -func (c CPUInfo) SSE42() bool { - return c.Features&SSE42 != 0 -} - -// AVX indicates support of AVX instructions -// and operating system support of AVX instructions -func (c CPUInfo) AVX() bool { - return c.Features&AVX != 0 -} - -// AVX2 indicates support of AVX2 instructions -func (c CPUInfo) AVX2() bool { - return c.Features&AVX2 != 0 -} - -// FMA3 indicates support of FMA3 instructions -func (c CPUInfo) FMA3() bool { - return c.Features&FMA3 != 0 -} - -// FMA4 indicates support of FMA4 instructions -func (c CPUInfo) FMA4() bool { - return c.Features&FMA4 != 0 -} - -// XOP indicates support of XOP instructions -func (c CPUInfo) XOP() bool { - return c.Features&XOP != 0 -} - -// F16C indicates support of F16C instructions -func (c CPUInfo) F16C() bool { - return c.Features&F16C != 0 -} - -// BMI1 indicates support of BMI1 instructions -func (c CPUInfo) BMI1() bool { - return c.Features&BMI1 != 0 -} - -// BMI2 indicates support of BMI2 instructions -func (c CPUInfo) BMI2() bool { - return c.Features&BMI2 != 0 -} - -// TBM indicates support of TBM instructions -// (AMD Trailing Bit Manipulation) -func (c CPUInfo) TBM() bool { - return c.Features&TBM != 0 -} - -// Lzcnt indicates support of LZCNT instruction -func (c CPUInfo) Lzcnt() bool { - return c.Features&LZCNT != 0 -} - -// Popcnt indicates support of POPCNT instruction -func (c CPUInfo) Popcnt() bool { - return c.Features&POPCNT != 0 -} - -// HTT indicates the processor has Hyperthreading enabled -func (c CPUInfo) HTT() bool { - return c.Features&HTT != 0 -} - -// SSE2Slow indicates that SSE2 may be slow on this processor -func (c CPUInfo) SSE2Slow() bool { - return c.Features&SSE2SLOW != 0 -} - -// SSE3Slow indicates that SSE3 may be slow on this processor -func (c CPUInfo) SSE3Slow() bool { - return c.Features&SSE3SLOW != 0 -} - -// AesNi indicates support of AES-NI instructions -// (Advanced Encryption Standard New Instructions) -func (c CPUInfo) AesNi() bool { - return c.Features&AESNI != 0 -} - -// Clmul indicates support of CLMUL instructions -// (Carry-less Multiplication) -func (c CPUInfo) Clmul() bool { - return c.Features&CLMUL != 0 -} - -// NX indicates support of NX (No-Execute) bit -func (c CPUInfo) NX() bool { - return c.Features&NX != 0 -} - -// SSE4A indicates support of AMD Barcelona microarchitecture SSE4a instructions -func (c CPUInfo) SSE4A() bool { - return c.Features&SSE4A != 0 -} - -// HLE indicates support of Hardware Lock Elision -func (c CPUInfo) HLE() bool { - return c.Features&HLE != 0 -} - -// RTM indicates support of Restricted Transactional Memory -func (c CPUInfo) RTM() bool { - return c.Features&RTM != 0 -} - -// Rdrand indicates support of RDRAND instruction is available -func (c CPUInfo) Rdrand() bool { - return c.Features&RDRAND != 0 -} - -// Rdseed indicates support of RDSEED instruction is available -func (c CPUInfo) Rdseed() bool { - return c.Features&RDSEED != 0 -} - -// ADX indicates support of Intel ADX (Multi-Precision Add-Carry Instruction Extensions) -func (c CPUInfo) ADX() bool { - return c.Features&ADX != 0 -} - -// SHA indicates support of Intel SHA Extensions -func (c CPUInfo) SHA() bool { - return c.Features&SHA != 0 -} - -// AVX512F indicates support of AVX-512 Foundation -func (c CPUInfo) AVX512F() bool { - return c.Features&AVX512F != 0 -} - -// AVX512DQ indicates support of AVX-512 Doubleword and Quadword Instructions -func (c CPUInfo) AVX512DQ() bool { - return c.Features&AVX512DQ != 0 -} - -// AVX512IFMA indicates support of AVX-512 Integer Fused Multiply-Add Instructions -func (c CPUInfo) AVX512IFMA() bool { - return c.Features&AVX512IFMA != 0 -} - -// AVX512PF indicates support of AVX-512 Prefetch Instructions -func (c CPUInfo) AVX512PF() bool { - return c.Features&AVX512PF != 0 -} - -// AVX512ER indicates support of AVX-512 Exponential and Reciprocal Instructions -func (c CPUInfo) AVX512ER() bool { - return c.Features&AVX512ER != 0 -} - -// AVX512CD indicates support of AVX-512 Conflict Detection Instructions -func (c CPUInfo) AVX512CD() bool { - return c.Features&AVX512CD != 0 -} - -// AVX512BW indicates support of AVX-512 Byte and Word Instructions -func (c CPUInfo) AVX512BW() bool { - return c.Features&AVX512BW != 0 -} - -// AVX512VL indicates support of AVX-512 Vector Length Extensions -func (c CPUInfo) AVX512VL() bool { - return c.Features&AVX512VL != 0 -} - -// AVX512VBMI indicates support of AVX-512 Vector Bit Manipulation Instructions -func (c CPUInfo) AVX512VBMI() bool { - return c.Features&AVX512VBMI != 0 -} - -// MPX indicates support of Intel MPX (Memory Protection Extensions) -func (c CPUInfo) MPX() bool { - return c.Features&MPX != 0 -} - -// ERMS indicates support of Enhanced REP MOVSB/STOSB -func (c CPUInfo) ERMS() bool { - return c.Features&ERMS != 0 -} - -// RDTSCP Instruction is available. -func (c CPUInfo) RDTSCP() bool { - return c.Features&RDTSCP != 0 -} - -// CX16 indicates if CMPXCHG16B instruction is available. -func (c CPUInfo) CX16() bool { - return c.Features&CX16 != 0 -} - -// TSX is split into HLE (Hardware Lock Elision) and RTM (Restricted Transactional Memory) detection. -// So TSX simply checks that. -func (c CPUInfo) TSX() bool { - return c.Features&(MPX|RTM) == MPX|RTM -} - -// Atom indicates an Atom processor -func (c CPUInfo) Atom() bool { - return c.Features&ATOM != 0 -} - -// Intel returns true if vendor is recognized as Intel -func (c CPUInfo) Intel() bool { - return c.VendorID == Intel -} - -// AMD returns true if vendor is recognized as AMD -func (c CPUInfo) AMD() bool { - return c.VendorID == AMD -} - -// Transmeta returns true if vendor is recognized as Transmeta -func (c CPUInfo) Transmeta() bool { - return c.VendorID == Transmeta -} - -// NSC returns true if vendor is recognized as National Semiconductor -func (c CPUInfo) NSC() bool { - return c.VendorID == NSC -} - -// VIA returns true if vendor is recognized as VIA -func (c CPUInfo) VIA() bool { - return c.VendorID == VIA -} - -// RTCounter returns the 64-bit time-stamp counter -// Uses the RDTSCP instruction. The value 0 is returned -// if the CPU does not support the instruction. -func (c CPUInfo) RTCounter() uint64 { - if !c.RDTSCP() { - return 0 - } - a, _, _, d := rdtscpAsm() - return uint64(a) | (uint64(d) << 32) -} - -// Ia32TscAux returns the IA32_TSC_AUX part of the RDTSCP. -// This variable is OS dependent, but on Linux contains information -// about the current cpu/core the code is running on. -// If the RDTSCP instruction isn't supported on the CPU, the value 0 is returned. -func (c CPUInfo) Ia32TscAux() uint32 { - if !c.RDTSCP() { - return 0 - } - _, _, ecx, _ := rdtscpAsm() - return ecx -} - -// LogicalCPU will return the Logical CPU the code is currently executing on. -// This is likely to change when the OS re-schedules the running thread -// to another CPU. -// If the current core cannot be detected, -1 will be returned. -func (c CPUInfo) LogicalCPU() int { - if c.maxFunc < 1 { - return -1 - } - _, ebx, _, _ := cpuid(1) - return int(ebx >> 24) -} - -// VM Will return true if the cpu id indicates we are in -// a virtual machine. This is only a hint, and will very likely -// have many false negatives. -func (c CPUInfo) VM() bool { - switch c.VendorID { - case MSVM, KVM, VMware, XenHVM: - return true - } - return false -} - -// Flags contains detected cpu features and caracteristics -type Flags uint64 - -// String returns a string representation of the detected -// CPU features. -func (f Flags) String() string { - return strings.Join(f.Strings(), ",") -} - -// Strings returns and array of the detected features. -func (f Flags) Strings() []string { - s := support() - r := make([]string, 0, 20) - for i := uint(0); i < 64; i++ { - key := Flags(1 << i) - val := flagNames[key] - if s&key != 0 { - r = append(r, val) - } - } - return r -} - -func maxExtendedFunction() uint32 { - eax, _, _, _ := cpuid(0x80000000) - return eax -} - -func maxFunctionID() uint32 { - a, _, _, _ := cpuid(0) - return a -} - -func brandName() string { - if maxExtendedFunction() >= 0x80000004 { - v := make([]uint32, 0, 48) - for i := uint32(0); i < 3; i++ { - a, b, c, d := cpuid(0x80000002 + i) - v = append(v, a, b, c, d) - } - return strings.Trim(string(valAsString(v...)), " ") - } - return "unknown" -} - -func threadsPerCore() int { - mfi := maxFunctionID() - if mfi < 0x4 || vendorID() != Intel { - return 1 - } - - if mfi < 0xb { - _, b, _, d := cpuid(1) - if (d & (1 << 28)) != 0 { - // v will contain logical core count - v := (b >> 16) & 255 - if v > 1 { - a4, _, _, _ := cpuid(4) - // physical cores - v2 := (a4 >> 26) + 1 - if v2 > 0 { - return int(v) / int(v2) - } - } - } - return 1 - } - _, b, _, _ := cpuidex(0xb, 0) - if b&0xffff == 0 { - return 1 - } - return int(b & 0xffff) -} - -func logicalCores() int { - mfi := maxFunctionID() - switch vendorID() { - case Intel: - // Use this on old Intel processors - if mfi < 0xb { - if mfi < 1 { - return 0 - } - // CPUID.1:EBX[23:16] represents the maximum number of addressable IDs (initial APIC ID) - // that can be assigned to logical processors in a physical package. - // The value may not be the same as the number of logical processors that are present in the hardware of a physical package. - _, ebx, _, _ := cpuid(1) - logical := (ebx >> 16) & 0xff - return int(logical) - } - _, b, _, _ := cpuidex(0xb, 1) - return int(b & 0xffff) - case AMD: - _, b, _, _ := cpuid(1) - return int((b >> 16) & 0xff) - default: - return 0 - } -} - -func familyModel() (int, int) { - if maxFunctionID() < 0x1 { - return 0, 0 - } - eax, _, _, _ := cpuid(1) - family := ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff) - model := ((eax >> 4) & 0xf) + ((eax >> 12) & 0xf0) - return int(family), int(model) -} - -func physicalCores() int { - switch vendorID() { - case Intel: - return logicalCores() / threadsPerCore() - case AMD: - if maxExtendedFunction() >= 0x80000008 { - _, _, c, _ := cpuid(0x80000008) - return int(c&0xff) + 1 - } - } - return 0 -} - -// Except from http://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Get_vendor_ID -var vendorMapping = map[string]Vendor{ - "AMDisbetter!": AMD, - "AuthenticAMD": AMD, - "CentaurHauls": VIA, - "GenuineIntel": Intel, - "TransmetaCPU": Transmeta, - "GenuineTMx86": Transmeta, - "Geode by NSC": NSC, - "VIA VIA VIA ": VIA, - "KVMKVMKVMKVM": KVM, - "Microsoft Hv": MSVM, - "VMwareVMware": VMware, - "XenVMMXenVMM": XenHVM, -} - -func vendorID() Vendor { - _, b, c, d := cpuid(0) - v := valAsString(b, d, c) - vend, ok := vendorMapping[string(v)] - if !ok { - return Other - } - return vend -} - -func cacheLine() int { - if maxFunctionID() < 0x1 { - return 0 - } - - _, ebx, _, _ := cpuid(1) - cache := (ebx & 0xff00) >> 5 // cflush size - if cache == 0 && maxExtendedFunction() >= 0x80000006 { - _, _, ecx, _ := cpuid(0x80000006) - cache = ecx & 0xff // cacheline size - } - // TODO: Read from Cache and TLB Information - return int(cache) -} - -func (c *CPUInfo) cacheSize() { - c.Cache.L1D = -1 - c.Cache.L1I = -1 - c.Cache.L2 = -1 - c.Cache.L3 = -1 - vendor := vendorID() - switch vendor { - case Intel: - if maxFunctionID() < 4 { - return - } - for i := uint32(0); ; i++ { - eax, ebx, ecx, _ := cpuidex(4, i) - cacheType := eax & 15 - if cacheType == 0 { - break - } - cacheLevel := (eax >> 5) & 7 - coherency := int(ebx&0xfff) + 1 - partitions := int((ebx>>12)&0x3ff) + 1 - associativity := int((ebx>>22)&0x3ff) + 1 - sets := int(ecx) + 1 - size := associativity * partitions * coherency * sets - switch cacheLevel { - case 1: - if cacheType == 1 { - // 1 = Data Cache - c.Cache.L1D = size - } else if cacheType == 2 { - // 2 = Instruction Cache - c.Cache.L1I = size - } else { - if c.Cache.L1D < 0 { - c.Cache.L1I = size - } - if c.Cache.L1I < 0 { - c.Cache.L1I = size - } - } - case 2: - c.Cache.L2 = size - case 3: - c.Cache.L3 = size - } - } - case AMD: - // Untested. - if maxExtendedFunction() < 0x80000005 { - return - } - _, _, ecx, edx := cpuid(0x80000005) - c.Cache.L1D = int(((ecx >> 24) & 0xFF) * 1024) - c.Cache.L1I = int(((edx >> 24) & 0xFF) * 1024) - - if maxExtendedFunction() < 0x80000006 { - return - } - _, _, ecx, _ = cpuid(0x80000006) - c.Cache.L2 = int(((ecx >> 16) & 0xFFFF) * 1024) - } - - return -} - -type SGXSupport struct { - Available bool - SGX1Supported bool - SGX2Supported bool - MaxEnclaveSizeNot64 int64 - MaxEnclaveSize64 int64 -} - -func hasSGX(available bool) (rval SGXSupport) { - rval.Available = available - - if !available { - return - } - - a, _, _, d := cpuidex(0x12, 0) - rval.SGX1Supported = a&0x01 != 0 - rval.SGX2Supported = a&0x02 != 0 - rval.MaxEnclaveSizeNot64 = 1 << (d & 0xFF) // pow 2 - rval.MaxEnclaveSize64 = 1 << ((d >> 8) & 0xFF) // pow 2 - - return -} - -func support() Flags { - mfi := maxFunctionID() - vend := vendorID() - if mfi < 0x1 { - return 0 - } - rval := uint64(0) - _, _, c, d := cpuid(1) - if (d & (1 << 15)) != 0 { - rval |= CMOV - } - if (d & (1 << 23)) != 0 { - rval |= MMX - } - if (d & (1 << 25)) != 0 { - rval |= MMXEXT - } - if (d & (1 << 25)) != 0 { - rval |= SSE - } - if (d & (1 << 26)) != 0 { - rval |= SSE2 - } - if (c & 1) != 0 { - rval |= SSE3 - } - if (c & 0x00000200) != 0 { - rval |= SSSE3 - } - if (c & 0x00080000) != 0 { - rval |= SSE4 - } - if (c & 0x00100000) != 0 { - rval |= SSE42 - } - if (c & (1 << 25)) != 0 { - rval |= AESNI - } - if (c & (1 << 1)) != 0 { - rval |= CLMUL - } - if c&(1<<23) != 0 { - rval |= POPCNT - } - if c&(1<<30) != 0 { - rval |= RDRAND - } - if c&(1<<29) != 0 { - rval |= F16C - } - if c&(1<<13) != 0 { - rval |= CX16 - } - if vend == Intel && (d&(1<<28)) != 0 && mfi >= 4 { - if threadsPerCore() > 1 { - rval |= HTT - } - } - - // Check XGETBV, OXSAVE and AVX bits - if c&(1<<26) != 0 && c&(1<<27) != 0 && c&(1<<28) != 0 { - // Check for OS support - eax, _ := xgetbv(0) - if (eax & 0x6) == 0x6 { - rval |= AVX - if (c & 0x00001000) != 0 { - rval |= FMA3 - } - } - } - - // Check AVX2, AVX2 requires OS support, but BMI1/2 don't. - if mfi >= 7 { - _, ebx, ecx, _ := cpuidex(7, 0) - if (rval&AVX) != 0 && (ebx&0x00000020) != 0 { - rval |= AVX2 - } - if (ebx & 0x00000008) != 0 { - rval |= BMI1 - if (ebx & 0x00000100) != 0 { - rval |= BMI2 - } - } - if ebx&(1<<2) != 0 { - rval |= SGX - } - if ebx&(1<<4) != 0 { - rval |= HLE - } - if ebx&(1<<9) != 0 { - rval |= ERMS - } - if ebx&(1<<11) != 0 { - rval |= RTM - } - if ebx&(1<<14) != 0 { - rval |= MPX - } - if ebx&(1<<18) != 0 { - rval |= RDSEED - } - if ebx&(1<<19) != 0 { - rval |= ADX - } - if ebx&(1<<29) != 0 { - rval |= SHA - } - - // Only detect AVX-512 features if XGETBV is supported - if c&((1<<26)|(1<<27)) == (1<<26)|(1<<27) { - // Check for OS support - eax, _ := xgetbv(0) - - // Verify that XCR0[7:5] = ‘111b’ (OPMASK state, upper 256-bit of ZMM0-ZMM15 and - // ZMM16-ZMM31 state are enabled by OS) - /// and that XCR0[2:1] = ‘11b’ (XMM state and YMM state are enabled by OS). - if (eax>>5)&7 == 7 && (eax>>1)&3 == 3 { - if ebx&(1<<16) != 0 { - rval |= AVX512F - } - if ebx&(1<<17) != 0 { - rval |= AVX512DQ - } - if ebx&(1<<21) != 0 { - rval |= AVX512IFMA - } - if ebx&(1<<26) != 0 { - rval |= AVX512PF - } - if ebx&(1<<27) != 0 { - rval |= AVX512ER - } - if ebx&(1<<28) != 0 { - rval |= AVX512CD - } - if ebx&(1<<30) != 0 { - rval |= AVX512BW - } - if ebx&(1<<31) != 0 { - rval |= AVX512VL - } - // ecx - if ecx&(1<<1) != 0 { - rval |= AVX512VBMI - } - } - } - } - - if maxExtendedFunction() >= 0x80000001 { - _, _, c, d := cpuid(0x80000001) - if (c & (1 << 5)) != 0 { - rval |= LZCNT - rval |= POPCNT - } - if (d & (1 << 31)) != 0 { - rval |= AMD3DNOW - } - if (d & (1 << 30)) != 0 { - rval |= AMD3DNOWEXT - } - if (d & (1 << 23)) != 0 { - rval |= MMX - } - if (d & (1 << 22)) != 0 { - rval |= MMXEXT - } - if (c & (1 << 6)) != 0 { - rval |= SSE4A - } - if d&(1<<20) != 0 { - rval |= NX - } - if d&(1<<27) != 0 { - rval |= RDTSCP - } - - /* Allow for selectively disabling SSE2 functions on AMD processors - with SSE2 support but not SSE4a. This includes Athlon64, some - Opteron, and some Sempron processors. MMX, SSE, or 3DNow! are faster - than SSE2 often enough to utilize this special-case flag. - AV_CPU_FLAG_SSE2 and AV_CPU_FLAG_SSE2SLOW are both set in this case - so that SSE2 is used unless explicitly disabled by checking - AV_CPU_FLAG_SSE2SLOW. */ - if vendorID() != Intel && - rval&SSE2 != 0 && (c&0x00000040) == 0 { - rval |= SSE2SLOW - } - - /* XOP and FMA4 use the AVX instruction coding scheme, so they can't be - * used unless the OS has AVX support. */ - if (rval & AVX) != 0 { - if (c & 0x00000800) != 0 { - rval |= XOP - } - if (c & 0x00010000) != 0 { - rval |= FMA4 - } - } - - if vendorID() == Intel { - family, model := familyModel() - if family == 6 && (model == 9 || model == 13 || model == 14) { - /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and - * 6/14 (core1 "yonah") theoretically support sse2, but it's - * usually slower than mmx. */ - if (rval & SSE2) != 0 { - rval |= SSE2SLOW - } - if (rval & SSE3) != 0 { - rval |= SSE3SLOW - } - } - /* The Atom processor has SSSE3 support, which is useful in many cases, - * but sometimes the SSSE3 version is slower than the SSE2 equivalent - * on the Atom, but is generally faster on other processors supporting - * SSSE3. This flag allows for selectively disabling certain SSSE3 - * functions on the Atom. */ - if family == 6 && model == 28 { - rval |= ATOM - } - } - } - return Flags(rval) -} - -func valAsString(values ...uint32) []byte { - r := make([]byte, 4*len(values)) - for i, v := range values { - dst := r[i*4:] - dst[0] = byte(v & 0xff) - dst[1] = byte((v >> 8) & 0xff) - dst[2] = byte((v >> 16) & 0xff) - dst[3] = byte((v >> 24) & 0xff) - switch { - case dst[0] == 0: - return r[:i*4] - case dst[1] == 0: - return r[:i*4+1] - case dst[2] == 0: - return r[:i*4+2] - case dst[3] == 0: - return r[:i*4+3] - } - } - return r -} diff --git a/vendor/github.com/klauspost/cpuid/cpuid_386.s b/vendor/github.com/klauspost/cpuid/cpuid_386.s deleted file mode 100644 index 4d731711e..000000000 --- a/vendor/github.com/klauspost/cpuid/cpuid_386.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// +build 386,!gccgo - -// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuid(SB), 7, $0 - XORL CX, CX - MOVL op+0(FP), AX - CPUID - MOVL AX, eax+4(FP) - MOVL BX, ebx+8(FP) - MOVL CX, ecx+12(FP) - MOVL DX, edx+16(FP) - RET - -// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuidex(SB), 7, $0 - MOVL op+0(FP), AX - MOVL op2+4(FP), CX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func xgetbv(index uint32) (eax, edx uint32) -TEXT ·asmXgetbv(SB), 7, $0 - MOVL index+0(FP), CX - BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV - MOVL AX, eax+4(FP) - MOVL DX, edx+8(FP) - RET - -// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) -TEXT ·asmRdtscpAsm(SB), 7, $0 - BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP - MOVL AX, eax+0(FP) - MOVL BX, ebx+4(FP) - MOVL CX, ecx+8(FP) - MOVL DX, edx+12(FP) - RET diff --git a/vendor/github.com/klauspost/cpuid/cpuid_amd64.s b/vendor/github.com/klauspost/cpuid/cpuid_amd64.s deleted file mode 100644 index 3c1d60e42..000000000 --- a/vendor/github.com/klauspost/cpuid/cpuid_amd64.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -//+build amd64,!gccgo - -// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuid(SB), 7, $0 - XORQ CX, CX - MOVL op+0(FP), AX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuidex(SB), 7, $0 - MOVL op+0(FP), AX - MOVL op2+4(FP), CX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func asmXgetbv(index uint32) (eax, edx uint32) -TEXT ·asmXgetbv(SB), 7, $0 - MOVL index+0(FP), CX - BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV - MOVL AX, eax+8(FP) - MOVL DX, edx+12(FP) - RET - -// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) -TEXT ·asmRdtscpAsm(SB), 7, $0 - BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP - MOVL AX, eax+0(FP) - MOVL BX, ebx+4(FP) - MOVL CX, ecx+8(FP) - MOVL DX, edx+12(FP) - RET diff --git a/vendor/github.com/klauspost/cpuid/detect_intel.go b/vendor/github.com/klauspost/cpuid/detect_intel.go deleted file mode 100644 index a5f04dd6d..000000000 --- a/vendor/github.com/klauspost/cpuid/detect_intel.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// +build 386,!gccgo amd64,!gccgo - -package cpuid - -func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) -func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -func asmXgetbv(index uint32) (eax, edx uint32) -func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) - -func initCPU() { - cpuid = asmCpuid - cpuidex = asmCpuidex - xgetbv = asmXgetbv - rdtscpAsm = asmRdtscpAsm -} diff --git a/vendor/github.com/klauspost/cpuid/detect_ref.go b/vendor/github.com/klauspost/cpuid/detect_ref.go deleted file mode 100644 index 909c5d9a7..000000000 --- a/vendor/github.com/klauspost/cpuid/detect_ref.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// +build !amd64,!386 gccgo - -package cpuid - -func initCPU() { - cpuid = func(op uint32) (eax, ebx, ecx, edx uint32) { - return 0, 0, 0, 0 - } - - cpuidex = func(op, op2 uint32) (eax, ebx, ecx, edx uint32) { - return 0, 0, 0, 0 - } - - xgetbv = func(index uint32) (eax, edx uint32) { - return 0, 0 - } - - rdtscpAsm = func() (eax, ebx, ecx, edx uint32) { - return 0, 0, 0, 0 - } -} diff --git a/vendor/github.com/klauspost/cpuid/generate.go b/vendor/github.com/klauspost/cpuid/generate.go deleted file mode 100644 index 90e7a98d2..000000000 --- a/vendor/github.com/klauspost/cpuid/generate.go +++ /dev/null @@ -1,4 +0,0 @@ -package cpuid - -//go:generate go run private-gen.go -//go:generate gofmt -w ./private diff --git a/vendor/github.com/klauspost/cpuid/private-gen.go b/vendor/github.com/klauspost/cpuid/private-gen.go deleted file mode 100644 index 437333d29..000000000 --- a/vendor/github.com/klauspost/cpuid/private-gen.go +++ /dev/null @@ -1,476 +0,0 @@ -// +build ignore - -package main - -import ( - "bytes" - "fmt" - "go/ast" - "go/parser" - "go/printer" - "go/token" - "io" - "io/ioutil" - "log" - "os" - "reflect" - "strings" - "unicode" - "unicode/utf8" -) - -var inFiles = []string{"cpuid.go", "cpuid_test.go"} -var copyFiles = []string{"cpuid_amd64.s", "cpuid_386.s", "detect_ref.go", "detect_intel.go"} -var fileSet = token.NewFileSet() -var reWrites = []rewrite{ - initRewrite("CPUInfo -> cpuInfo"), - initRewrite("Vendor -> vendor"), - initRewrite("Flags -> flags"), - initRewrite("Detect -> detect"), - initRewrite("CPU -> cpu"), -} -var excludeNames = map[string]bool{"string": true, "join": true, "trim": true, - // cpuid_test.go - "t": true, "println": true, "logf": true, "log": true, "fatalf": true, "fatal": true, -} - -var excludePrefixes = []string{"test", "benchmark"} - -func main() { - Package := "private" - parserMode := parser.ParseComments - exported := make(map[string]rewrite) - for _, file := range inFiles { - in, err := os.Open(file) - if err != nil { - log.Fatalf("opening input", err) - } - - src, err := ioutil.ReadAll(in) - if err != nil { - log.Fatalf("reading input", err) - } - - astfile, err := parser.ParseFile(fileSet, file, src, parserMode) - if err != nil { - log.Fatalf("parsing input", err) - } - - for _, rw := range reWrites { - astfile = rw(astfile) - } - - // Inspect the AST and print all identifiers and literals. - var startDecl token.Pos - var endDecl token.Pos - ast.Inspect(astfile, func(n ast.Node) bool { - var s string - switch x := n.(type) { - case *ast.Ident: - if x.IsExported() { - t := strings.ToLower(x.Name) - for _, pre := range excludePrefixes { - if strings.HasPrefix(t, pre) { - return true - } - } - if excludeNames[t] != true { - //if x.Pos() > startDecl && x.Pos() < endDecl { - exported[x.Name] = initRewrite(x.Name + " -> " + t) - } - } - - case *ast.GenDecl: - if x.Tok == token.CONST && x.Lparen > 0 { - startDecl = x.Lparen - endDecl = x.Rparen - // fmt.Printf("Decl:%s -> %s\n", fileSet.Position(startDecl), fileSet.Position(endDecl)) - } - } - if s != "" { - fmt.Printf("%s:\t%s\n", fileSet.Position(n.Pos()), s) - } - return true - }) - - for _, rw := range exported { - astfile = rw(astfile) - } - - var buf bytes.Buffer - - printer.Fprint(&buf, fileSet, astfile) - - // Remove package documentation and insert information - s := buf.String() - ind := strings.Index(buf.String(), "\npackage cpuid") - s = s[ind:] - s = "// Generated, DO NOT EDIT,\n" + - "// but copy it to your own project and rename the package.\n" + - "// See more at http://github.com/klauspost/cpuid\n" + - s - - outputName := Package + string(os.PathSeparator) + file - - err = ioutil.WriteFile(outputName, []byte(s), 0644) - if err != nil { - log.Fatalf("writing output: %s", err) - } - log.Println("Generated", outputName) - } - - for _, file := range copyFiles { - dst := "" - if strings.HasPrefix(file, "cpuid") { - dst = Package + string(os.PathSeparator) + file - } else { - dst = Package + string(os.PathSeparator) + "cpuid_" + file - } - err := copyFile(file, dst) - if err != nil { - log.Fatalf("copying file: %s", err) - } - log.Println("Copied", dst) - } -} - -// CopyFile copies a file from src to dst. If src and dst files exist, and are -// the same, then return success. Copy the file contents from src to dst. -func copyFile(src, dst string) (err error) { - sfi, err := os.Stat(src) - if err != nil { - return - } - if !sfi.Mode().IsRegular() { - // cannot copy non-regular files (e.g., directories, - // symlinks, devices, etc.) - return fmt.Errorf("CopyFile: non-regular source file %s (%q)", sfi.Name(), sfi.Mode().String()) - } - dfi, err := os.Stat(dst) - if err != nil { - if !os.IsNotExist(err) { - return - } - } else { - if !(dfi.Mode().IsRegular()) { - return fmt.Errorf("CopyFile: non-regular destination file %s (%q)", dfi.Name(), dfi.Mode().String()) - } - if os.SameFile(sfi, dfi) { - return - } - } - err = copyFileContents(src, dst) - return -} - -// copyFileContents copies the contents of the file named src to the file named -// by dst. The file will be created if it does not already exist. If the -// destination file exists, all it's contents will be replaced by the contents -// of the source file. -func copyFileContents(src, dst string) (err error) { - in, err := os.Open(src) - if err != nil { - return - } - defer in.Close() - out, err := os.Create(dst) - if err != nil { - return - } - defer func() { - cerr := out.Close() - if err == nil { - err = cerr - } - }() - if _, err = io.Copy(out, in); err != nil { - return - } - err = out.Sync() - return -} - -type rewrite func(*ast.File) *ast.File - -// Mostly copied from gofmt -func initRewrite(rewriteRule string) rewrite { - f := strings.Split(rewriteRule, "->") - if len(f) != 2 { - fmt.Fprintf(os.Stderr, "rewrite rule must be of the form 'pattern -> replacement'\n") - os.Exit(2) - } - pattern := parseExpr(f[0], "pattern") - replace := parseExpr(f[1], "replacement") - return func(p *ast.File) *ast.File { return rewriteFile(pattern, replace, p) } -} - -// parseExpr parses s as an expression. -// It might make sense to expand this to allow statement patterns, -// but there are problems with preserving formatting and also -// with what a wildcard for a statement looks like. -func parseExpr(s, what string) ast.Expr { - x, err := parser.ParseExpr(s) - if err != nil { - fmt.Fprintf(os.Stderr, "parsing %s %s at %s\n", what, s, err) - os.Exit(2) - } - return x -} - -// Keep this function for debugging. -/* -func dump(msg string, val reflect.Value) { - fmt.Printf("%s:\n", msg) - ast.Print(fileSet, val.Interface()) - fmt.Println() -} -*/ - -// rewriteFile applies the rewrite rule 'pattern -> replace' to an entire file. -func rewriteFile(pattern, replace ast.Expr, p *ast.File) *ast.File { - cmap := ast.NewCommentMap(fileSet, p, p.Comments) - m := make(map[string]reflect.Value) - pat := reflect.ValueOf(pattern) - repl := reflect.ValueOf(replace) - - var rewriteVal func(val reflect.Value) reflect.Value - rewriteVal = func(val reflect.Value) reflect.Value { - // don't bother if val is invalid to start with - if !val.IsValid() { - return reflect.Value{} - } - for k := range m { - delete(m, k) - } - val = apply(rewriteVal, val) - if match(m, pat, val) { - val = subst(m, repl, reflect.ValueOf(val.Interface().(ast.Node).Pos())) - } - return val - } - - r := apply(rewriteVal, reflect.ValueOf(p)).Interface().(*ast.File) - r.Comments = cmap.Filter(r).Comments() // recreate comments list - return r -} - -// set is a wrapper for x.Set(y); it protects the caller from panics if x cannot be changed to y. -func set(x, y reflect.Value) { - // don't bother if x cannot be set or y is invalid - if !x.CanSet() || !y.IsValid() { - return - } - defer func() { - if x := recover(); x != nil { - if s, ok := x.(string); ok && - (strings.Contains(s, "type mismatch") || strings.Contains(s, "not assignable")) { - // x cannot be set to y - ignore this rewrite - return - } - panic(x) - } - }() - x.Set(y) -} - -// Values/types for special cases. -var ( - objectPtrNil = reflect.ValueOf((*ast.Object)(nil)) - scopePtrNil = reflect.ValueOf((*ast.Scope)(nil)) - - identType = reflect.TypeOf((*ast.Ident)(nil)) - objectPtrType = reflect.TypeOf((*ast.Object)(nil)) - positionType = reflect.TypeOf(token.NoPos) - callExprType = reflect.TypeOf((*ast.CallExpr)(nil)) - scopePtrType = reflect.TypeOf((*ast.Scope)(nil)) -) - -// apply replaces each AST field x in val with f(x), returning val. -// To avoid extra conversions, f operates on the reflect.Value form. -func apply(f func(reflect.Value) reflect.Value, val reflect.Value) reflect.Value { - if !val.IsValid() { - return reflect.Value{} - } - - // *ast.Objects introduce cycles and are likely incorrect after - // rewrite; don't follow them but replace with nil instead - if val.Type() == objectPtrType { - return objectPtrNil - } - - // similarly for scopes: they are likely incorrect after a rewrite; - // replace them with nil - if val.Type() == scopePtrType { - return scopePtrNil - } - - switch v := reflect.Indirect(val); v.Kind() { - case reflect.Slice: - for i := 0; i < v.Len(); i++ { - e := v.Index(i) - set(e, f(e)) - } - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - e := v.Field(i) - set(e, f(e)) - } - case reflect.Interface: - e := v.Elem() - set(v, f(e)) - } - return val -} - -func isWildcard(s string) bool { - rune, size := utf8.DecodeRuneInString(s) - return size == len(s) && unicode.IsLower(rune) -} - -// match returns true if pattern matches val, -// recording wildcard submatches in m. -// If m == nil, match checks whether pattern == val. -func match(m map[string]reflect.Value, pattern, val reflect.Value) bool { - // Wildcard matches any expression. If it appears multiple - // times in the pattern, it must match the same expression - // each time. - if m != nil && pattern.IsValid() && pattern.Type() == identType { - name := pattern.Interface().(*ast.Ident).Name - if isWildcard(name) && val.IsValid() { - // wildcards only match valid (non-nil) expressions. - if _, ok := val.Interface().(ast.Expr); ok && !val.IsNil() { - if old, ok := m[name]; ok { - return match(nil, old, val) - } - m[name] = val - return true - } - } - } - - // Otherwise, pattern and val must match recursively. - if !pattern.IsValid() || !val.IsValid() { - return !pattern.IsValid() && !val.IsValid() - } - if pattern.Type() != val.Type() { - return false - } - - // Special cases. - switch pattern.Type() { - case identType: - // For identifiers, only the names need to match - // (and none of the other *ast.Object information). - // This is a common case, handle it all here instead - // of recursing down any further via reflection. - p := pattern.Interface().(*ast.Ident) - v := val.Interface().(*ast.Ident) - return p == nil && v == nil || p != nil && v != nil && p.Name == v.Name - case objectPtrType, positionType: - // object pointers and token positions always match - return true - case callExprType: - // For calls, the Ellipsis fields (token.Position) must - // match since that is how f(x) and f(x...) are different. - // Check them here but fall through for the remaining fields. - p := pattern.Interface().(*ast.CallExpr) - v := val.Interface().(*ast.CallExpr) - if p.Ellipsis.IsValid() != v.Ellipsis.IsValid() { - return false - } - } - - p := reflect.Indirect(pattern) - v := reflect.Indirect(val) - if !p.IsValid() || !v.IsValid() { - return !p.IsValid() && !v.IsValid() - } - - switch p.Kind() { - case reflect.Slice: - if p.Len() != v.Len() { - return false - } - for i := 0; i < p.Len(); i++ { - if !match(m, p.Index(i), v.Index(i)) { - return false - } - } - return true - - case reflect.Struct: - for i := 0; i < p.NumField(); i++ { - if !match(m, p.Field(i), v.Field(i)) { - return false - } - } - return true - - case reflect.Interface: - return match(m, p.Elem(), v.Elem()) - } - - // Handle token integers, etc. - return p.Interface() == v.Interface() -} - -// subst returns a copy of pattern with values from m substituted in place -// of wildcards and pos used as the position of tokens from the pattern. -// if m == nil, subst returns a copy of pattern and doesn't change the line -// number information. -func subst(m map[string]reflect.Value, pattern reflect.Value, pos reflect.Value) reflect.Value { - if !pattern.IsValid() { - return reflect.Value{} - } - - // Wildcard gets replaced with map value. - if m != nil && pattern.Type() == identType { - name := pattern.Interface().(*ast.Ident).Name - if isWildcard(name) { - if old, ok := m[name]; ok { - return subst(nil, old, reflect.Value{}) - } - } - } - - if pos.IsValid() && pattern.Type() == positionType { - // use new position only if old position was valid in the first place - if old := pattern.Interface().(token.Pos); !old.IsValid() { - return pattern - } - return pos - } - - // Otherwise copy. - switch p := pattern; p.Kind() { - case reflect.Slice: - v := reflect.MakeSlice(p.Type(), p.Len(), p.Len()) - for i := 0; i < p.Len(); i++ { - v.Index(i).Set(subst(m, p.Index(i), pos)) - } - return v - - case reflect.Struct: - v := reflect.New(p.Type()).Elem() - for i := 0; i < p.NumField(); i++ { - v.Field(i).Set(subst(m, p.Field(i), pos)) - } - return v - - case reflect.Ptr: - v := reflect.New(p.Type()).Elem() - if elem := p.Elem(); elem.IsValid() { - v.Set(subst(m, elem, pos).Addr()) - } - return v - - case reflect.Interface: - v := reflect.New(p.Type()).Elem() - if elem := p.Elem(); elem.IsValid() { - v.Set(subst(m, elem, pos)) - } - return v - } - - return pattern -} diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid.go b/vendor/github.com/klauspost/cpuid/private/cpuid.go deleted file mode 100644 index 21712142c..000000000 --- a/vendor/github.com/klauspost/cpuid/private/cpuid.go +++ /dev/null @@ -1,1024 +0,0 @@ -// Generated, DO NOT EDIT, -// but copy it to your own project and rename the package. -// See more at http://github.com/klauspost/cpuid - -package cpuid - -import "strings" - -// Vendor is a representation of a CPU vendor. -type vendor int - -const ( - other vendor = iota - intel - amd - via - transmeta - nsc - kvm // Kernel-based Virtual Machine - msvm // Microsoft Hyper-V or Windows Virtual PC - vmware - xenhvm -) - -const ( - cmov = 1 << iota // i686 CMOV - nx // NX (No-Execute) bit - amd3dnow // AMD 3DNOW - amd3dnowext // AMD 3DNowExt - mmx // standard MMX - mmxext // SSE integer functions or AMD MMX ext - sse // SSE functions - sse2 // P4 SSE functions - sse3 // Prescott SSE3 functions - ssse3 // Conroe SSSE3 functions - sse4 // Penryn SSE4.1 functions - sse4a // AMD Barcelona microarchitecture SSE4a instructions - sse42 // Nehalem SSE4.2 functions - avx // AVX functions - avx2 // AVX2 functions - fma3 // Intel FMA 3 - fma4 // Bulldozer FMA4 functions - xop // Bulldozer XOP functions - f16c // Half-precision floating-point conversion - bmi1 // Bit Manipulation Instruction Set 1 - bmi2 // Bit Manipulation Instruction Set 2 - tbm // AMD Trailing Bit Manipulation - lzcnt // LZCNT instruction - popcnt // POPCNT instruction - aesni // Advanced Encryption Standard New Instructions - clmul // Carry-less Multiplication - htt // Hyperthreading (enabled) - hle // Hardware Lock Elision - rtm // Restricted Transactional Memory - rdrand // RDRAND instruction is available - rdseed // RDSEED instruction is available - adx // Intel ADX (Multi-Precision Add-Carry Instruction Extensions) - sha // Intel SHA Extensions - avx512f // AVX-512 Foundation - avx512dq // AVX-512 Doubleword and Quadword Instructions - avx512ifma // AVX-512 Integer Fused Multiply-Add Instructions - avx512pf // AVX-512 Prefetch Instructions - avx512er // AVX-512 Exponential and Reciprocal Instructions - avx512cd // AVX-512 Conflict Detection Instructions - avx512bw // AVX-512 Byte and Word Instructions - avx512vl // AVX-512 Vector Length Extensions - avx512vbmi // AVX-512 Vector Bit Manipulation Instructions - mpx // Intel MPX (Memory Protection Extensions) - erms // Enhanced REP MOVSB/STOSB - rdtscp // RDTSCP Instruction - cx16 // CMPXCHG16B Instruction - sgx // Software Guard Extensions - - // Performance indicators - sse2slow // SSE2 is supported, but usually not faster - sse3slow // SSE3 is supported, but usually not faster - atom // Atom processor, some SSSE3 instructions are slower -) - -var flagNames = map[flags]string{ - cmov: "CMOV", // i686 CMOV - nx: "NX", // NX (No-Execute) bit - amd3dnow: "AMD3DNOW", // AMD 3DNOW - amd3dnowext: "AMD3DNOWEXT", // AMD 3DNowExt - mmx: "MMX", // Standard MMX - mmxext: "MMXEXT", // SSE integer functions or AMD MMX ext - sse: "SSE", // SSE functions - sse2: "SSE2", // P4 SSE2 functions - sse3: "SSE3", // Prescott SSE3 functions - ssse3: "SSSE3", // Conroe SSSE3 functions - sse4: "SSE4.1", // Penryn SSE4.1 functions - sse4a: "SSE4A", // AMD Barcelona microarchitecture SSE4a instructions - sse42: "SSE4.2", // Nehalem SSE4.2 functions - avx: "AVX", // AVX functions - avx2: "AVX2", // AVX functions - fma3: "FMA3", // Intel FMA 3 - fma4: "FMA4", // Bulldozer FMA4 functions - xop: "XOP", // Bulldozer XOP functions - f16c: "F16C", // Half-precision floating-point conversion - bmi1: "BMI1", // Bit Manipulation Instruction Set 1 - bmi2: "BMI2", // Bit Manipulation Instruction Set 2 - tbm: "TBM", // AMD Trailing Bit Manipulation - lzcnt: "LZCNT", // LZCNT instruction - popcnt: "POPCNT", // POPCNT instruction - aesni: "AESNI", // Advanced Encryption Standard New Instructions - clmul: "CLMUL", // Carry-less Multiplication - htt: "HTT", // Hyperthreading (enabled) - hle: "HLE", // Hardware Lock Elision - rtm: "RTM", // Restricted Transactional Memory - rdrand: "RDRAND", // RDRAND instruction is available - rdseed: "RDSEED", // RDSEED instruction is available - adx: "ADX", // Intel ADX (Multi-Precision Add-Carry Instruction Extensions) - sha: "SHA", // Intel SHA Extensions - avx512f: "AVX512F", // AVX-512 Foundation - avx512dq: "AVX512DQ", // AVX-512 Doubleword and Quadword Instructions - avx512ifma: "AVX512IFMA", // AVX-512 Integer Fused Multiply-Add Instructions - avx512pf: "AVX512PF", // AVX-512 Prefetch Instructions - avx512er: "AVX512ER", // AVX-512 Exponential and Reciprocal Instructions - avx512cd: "AVX512CD", // AVX-512 Conflict Detection Instructions - avx512bw: "AVX512BW", // AVX-512 Byte and Word Instructions - avx512vl: "AVX512VL", // AVX-512 Vector Length Extensions - avx512vbmi: "AVX512VBMI", // AVX-512 Vector Bit Manipulation Instructions - mpx: "MPX", // Intel MPX (Memory Protection Extensions) - erms: "ERMS", // Enhanced REP MOVSB/STOSB - rdtscp: "RDTSCP", // RDTSCP Instruction - cx16: "CX16", // CMPXCHG16B Instruction - sgx: "SGX", // Software Guard Extensions - - // Performance indicators - sse2slow: "SSE2SLOW", // SSE2 supported, but usually not faster - sse3slow: "SSE3SLOW", // SSE3 supported, but usually not faster - atom: "ATOM", // Atom processor, some SSSE3 instructions are slower - -} - -// CPUInfo contains information about the detected system CPU. -type cpuInfo struct { - brandname string // Brand name reported by the CPU - vendorid vendor // Comparable CPU vendor ID - features flags // Features of the CPU - physicalcores int // Number of physical processor cores in your CPU. Will be 0 if undetectable. - threadspercore int // Number of threads per physical core. Will be 1 if undetectable. - logicalcores int // Number of physical cores times threads that can run on each core through the use of hyperthreading. Will be 0 if undetectable. - family int // CPU family number - model int // CPU model number - cacheline int // Cache line size in bytes. Will be 0 if undetectable. - cache struct { - l1i int // L1 Instruction Cache (per core or shared). Will be -1 if undetected - l1d int // L1 Data Cache (per core or shared). Will be -1 if undetected - l2 int // L2 Cache (per core or shared). Will be -1 if undetected - l3 int // L3 Instruction Cache (per core or shared). Will be -1 if undetected - } - sgx sgxsupport - maxFunc uint32 - maxExFunc uint32 -} - -var cpuid func(op uint32) (eax, ebx, ecx, edx uint32) -var cpuidex func(op, op2 uint32) (eax, ebx, ecx, edx uint32) -var xgetbv func(index uint32) (eax, edx uint32) -var rdtscpAsm func() (eax, ebx, ecx, edx uint32) - -// CPU contains information about the CPU as detected on startup, -// or when Detect last was called. -// -// Use this as the primary entry point to you data, -// this way queries are -var cpu cpuInfo - -func init() { - initCPU() - detect() -} - -// Detect will re-detect current CPU info. -// This will replace the content of the exported CPU variable. -// -// Unless you expect the CPU to change while you are running your program -// you should not need to call this function. -// If you call this, you must ensure that no other goroutine is accessing the -// exported CPU variable. -func detect() { - cpu.maxFunc = maxFunctionID() - cpu.maxExFunc = maxExtendedFunction() - cpu.brandname = brandName() - cpu.cacheline = cacheLine() - cpu.family, cpu.model = familyModel() - cpu.features = support() - cpu.sgx = hasSGX(cpu.features&sgx != 0) - cpu.threadspercore = threadsPerCore() - cpu.logicalcores = logicalCores() - cpu.physicalcores = physicalCores() - cpu.vendorid = vendorID() - cpu.cacheSize() -} - -// Generated here: http://play.golang.org/p/BxFH2Gdc0G - -// Cmov indicates support of CMOV instructions -func (c cpuInfo) cmov() bool { - return c.features&cmov != 0 -} - -// Amd3dnow indicates support of AMD 3DNOW! instructions -func (c cpuInfo) amd3dnow() bool { - return c.features&amd3dnow != 0 -} - -// Amd3dnowExt indicates support of AMD 3DNOW! Extended instructions -func (c cpuInfo) amd3dnowext() bool { - return c.features&amd3dnowext != 0 -} - -// MMX indicates support of MMX instructions -func (c cpuInfo) mmx() bool { - return c.features&mmx != 0 -} - -// MMXExt indicates support of MMXEXT instructions -// (SSE integer functions or AMD MMX ext) -func (c cpuInfo) mmxext() bool { - return c.features&mmxext != 0 -} - -// SSE indicates support of SSE instructions -func (c cpuInfo) sse() bool { - return c.features&sse != 0 -} - -// SSE2 indicates support of SSE 2 instructions -func (c cpuInfo) sse2() bool { - return c.features&sse2 != 0 -} - -// SSE3 indicates support of SSE 3 instructions -func (c cpuInfo) sse3() bool { - return c.features&sse3 != 0 -} - -// SSSE3 indicates support of SSSE 3 instructions -func (c cpuInfo) ssse3() bool { - return c.features&ssse3 != 0 -} - -// SSE4 indicates support of SSE 4 (also called SSE 4.1) instructions -func (c cpuInfo) sse4() bool { - return c.features&sse4 != 0 -} - -// SSE42 indicates support of SSE4.2 instructions -func (c cpuInfo) sse42() bool { - return c.features&sse42 != 0 -} - -// AVX indicates support of AVX instructions -// and operating system support of AVX instructions -func (c cpuInfo) avx() bool { - return c.features&avx != 0 -} - -// AVX2 indicates support of AVX2 instructions -func (c cpuInfo) avx2() bool { - return c.features&avx2 != 0 -} - -// FMA3 indicates support of FMA3 instructions -func (c cpuInfo) fma3() bool { - return c.features&fma3 != 0 -} - -// FMA4 indicates support of FMA4 instructions -func (c cpuInfo) fma4() bool { - return c.features&fma4 != 0 -} - -// XOP indicates support of XOP instructions -func (c cpuInfo) xop() bool { - return c.features&xop != 0 -} - -// F16C indicates support of F16C instructions -func (c cpuInfo) f16c() bool { - return c.features&f16c != 0 -} - -// BMI1 indicates support of BMI1 instructions -func (c cpuInfo) bmi1() bool { - return c.features&bmi1 != 0 -} - -// BMI2 indicates support of BMI2 instructions -func (c cpuInfo) bmi2() bool { - return c.features&bmi2 != 0 -} - -// TBM indicates support of TBM instructions -// (AMD Trailing Bit Manipulation) -func (c cpuInfo) tbm() bool { - return c.features&tbm != 0 -} - -// Lzcnt indicates support of LZCNT instruction -func (c cpuInfo) lzcnt() bool { - return c.features&lzcnt != 0 -} - -// Popcnt indicates support of POPCNT instruction -func (c cpuInfo) popcnt() bool { - return c.features&popcnt != 0 -} - -// HTT indicates the processor has Hyperthreading enabled -func (c cpuInfo) htt() bool { - return c.features&htt != 0 -} - -// SSE2Slow indicates that SSE2 may be slow on this processor -func (c cpuInfo) sse2slow() bool { - return c.features&sse2slow != 0 -} - -// SSE3Slow indicates that SSE3 may be slow on this processor -func (c cpuInfo) sse3slow() bool { - return c.features&sse3slow != 0 -} - -// AesNi indicates support of AES-NI instructions -// (Advanced Encryption Standard New Instructions) -func (c cpuInfo) aesni() bool { - return c.features&aesni != 0 -} - -// Clmul indicates support of CLMUL instructions -// (Carry-less Multiplication) -func (c cpuInfo) clmul() bool { - return c.features&clmul != 0 -} - -// NX indicates support of NX (No-Execute) bit -func (c cpuInfo) nx() bool { - return c.features&nx != 0 -} - -// SSE4A indicates support of AMD Barcelona microarchitecture SSE4a instructions -func (c cpuInfo) sse4a() bool { - return c.features&sse4a != 0 -} - -// HLE indicates support of Hardware Lock Elision -func (c cpuInfo) hle() bool { - return c.features&hle != 0 -} - -// RTM indicates support of Restricted Transactional Memory -func (c cpuInfo) rtm() bool { - return c.features&rtm != 0 -} - -// Rdrand indicates support of RDRAND instruction is available -func (c cpuInfo) rdrand() bool { - return c.features&rdrand != 0 -} - -// Rdseed indicates support of RDSEED instruction is available -func (c cpuInfo) rdseed() bool { - return c.features&rdseed != 0 -} - -// ADX indicates support of Intel ADX (Multi-Precision Add-Carry Instruction Extensions) -func (c cpuInfo) adx() bool { - return c.features&adx != 0 -} - -// SHA indicates support of Intel SHA Extensions -func (c cpuInfo) sha() bool { - return c.features&sha != 0 -} - -// AVX512F indicates support of AVX-512 Foundation -func (c cpuInfo) avx512f() bool { - return c.features&avx512f != 0 -} - -// AVX512DQ indicates support of AVX-512 Doubleword and Quadword Instructions -func (c cpuInfo) avx512dq() bool { - return c.features&avx512dq != 0 -} - -// AVX512IFMA indicates support of AVX-512 Integer Fused Multiply-Add Instructions -func (c cpuInfo) avx512ifma() bool { - return c.features&avx512ifma != 0 -} - -// AVX512PF indicates support of AVX-512 Prefetch Instructions -func (c cpuInfo) avx512pf() bool { - return c.features&avx512pf != 0 -} - -// AVX512ER indicates support of AVX-512 Exponential and Reciprocal Instructions -func (c cpuInfo) avx512er() bool { - return c.features&avx512er != 0 -} - -// AVX512CD indicates support of AVX-512 Conflict Detection Instructions -func (c cpuInfo) avx512cd() bool { - return c.features&avx512cd != 0 -} - -// AVX512BW indicates support of AVX-512 Byte and Word Instructions -func (c cpuInfo) avx512bw() bool { - return c.features&avx512bw != 0 -} - -// AVX512VL indicates support of AVX-512 Vector Length Extensions -func (c cpuInfo) avx512vl() bool { - return c.features&avx512vl != 0 -} - -// AVX512VBMI indicates support of AVX-512 Vector Bit Manipulation Instructions -func (c cpuInfo) avx512vbmi() bool { - return c.features&avx512vbmi != 0 -} - -// MPX indicates support of Intel MPX (Memory Protection Extensions) -func (c cpuInfo) mpx() bool { - return c.features&mpx != 0 -} - -// ERMS indicates support of Enhanced REP MOVSB/STOSB -func (c cpuInfo) erms() bool { - return c.features&erms != 0 -} - -// RDTSCP Instruction is available. -func (c cpuInfo) rdtscp() bool { - return c.features&rdtscp != 0 -} - -// CX16 indicates if CMPXCHG16B instruction is available. -func (c cpuInfo) cx16() bool { - return c.features&cx16 != 0 -} - -// TSX is split into HLE (Hardware Lock Elision) and RTM (Restricted Transactional Memory) detection. -// So TSX simply checks that. -func (c cpuInfo) tsx() bool { - return c.features&(mpx|rtm) == mpx|rtm -} - -// Atom indicates an Atom processor -func (c cpuInfo) atom() bool { - return c.features&atom != 0 -} - -// Intel returns true if vendor is recognized as Intel -func (c cpuInfo) intel() bool { - return c.vendorid == intel -} - -// AMD returns true if vendor is recognized as AMD -func (c cpuInfo) amd() bool { - return c.vendorid == amd -} - -// Transmeta returns true if vendor is recognized as Transmeta -func (c cpuInfo) transmeta() bool { - return c.vendorid == transmeta -} - -// NSC returns true if vendor is recognized as National Semiconductor -func (c cpuInfo) nsc() bool { - return c.vendorid == nsc -} - -// VIA returns true if vendor is recognized as VIA -func (c cpuInfo) via() bool { - return c.vendorid == via -} - -// RTCounter returns the 64-bit time-stamp counter -// Uses the RDTSCP instruction. The value 0 is returned -// if the CPU does not support the instruction. -func (c cpuInfo) rtcounter() uint64 { - if !c.rdtscp() { - return 0 - } - a, _, _, d := rdtscpAsm() - return uint64(a) | (uint64(d) << 32) -} - -// Ia32TscAux returns the IA32_TSC_AUX part of the RDTSCP. -// This variable is OS dependent, but on Linux contains information -// about the current cpu/core the code is running on. -// If the RDTSCP instruction isn't supported on the CPU, the value 0 is returned. -func (c cpuInfo) ia32tscaux() uint32 { - if !c.rdtscp() { - return 0 - } - _, _, ecx, _ := rdtscpAsm() - return ecx -} - -// LogicalCPU will return the Logical CPU the code is currently executing on. -// This is likely to change when the OS re-schedules the running thread -// to another CPU. -// If the current core cannot be detected, -1 will be returned. -func (c cpuInfo) logicalcpu() int { - if c.maxFunc < 1 { - return -1 - } - _, ebx, _, _ := cpuid(1) - return int(ebx >> 24) -} - -// VM Will return true if the cpu id indicates we are in -// a virtual machine. This is only a hint, and will very likely -// have many false negatives. -func (c cpuInfo) vm() bool { - switch c.vendorid { - case msvm, kvm, vmware, xenhvm: - return true - } - return false -} - -// Flags contains detected cpu features and caracteristics -type flags uint64 - -// String returns a string representation of the detected -// CPU features. -func (f flags) String() string { - return strings.Join(f.strings(), ",") -} - -// Strings returns and array of the detected features. -func (f flags) strings() []string { - s := support() - r := make([]string, 0, 20) - for i := uint(0); i < 64; i++ { - key := flags(1 << i) - val := flagNames[key] - if s&key != 0 { - r = append(r, val) - } - } - return r -} - -func maxExtendedFunction() uint32 { - eax, _, _, _ := cpuid(0x80000000) - return eax -} - -func maxFunctionID() uint32 { - a, _, _, _ := cpuid(0) - return a -} - -func brandName() string { - if maxExtendedFunction() >= 0x80000004 { - v := make([]uint32, 0, 48) - for i := uint32(0); i < 3; i++ { - a, b, c, d := cpuid(0x80000002 + i) - v = append(v, a, b, c, d) - } - return strings.Trim(string(valAsString(v...)), " ") - } - return "unknown" -} - -func threadsPerCore() int { - mfi := maxFunctionID() - if mfi < 0x4 || vendorID() != intel { - return 1 - } - - if mfi < 0xb { - _, b, _, d := cpuid(1) - if (d & (1 << 28)) != 0 { - // v will contain logical core count - v := (b >> 16) & 255 - if v > 1 { - a4, _, _, _ := cpuid(4) - // physical cores - v2 := (a4 >> 26) + 1 - if v2 > 0 { - return int(v) / int(v2) - } - } - } - return 1 - } - _, b, _, _ := cpuidex(0xb, 0) - if b&0xffff == 0 { - return 1 - } - return int(b & 0xffff) -} - -func logicalCores() int { - mfi := maxFunctionID() - switch vendorID() { - case intel: - // Use this on old Intel processors - if mfi < 0xb { - if mfi < 1 { - return 0 - } - // CPUID.1:EBX[23:16] represents the maximum number of addressable IDs (initial APIC ID) - // that can be assigned to logical processors in a physical package. - // The value may not be the same as the number of logical processors that are present in the hardware of a physical package. - _, ebx, _, _ := cpuid(1) - logical := (ebx >> 16) & 0xff - return int(logical) - } - _, b, _, _ := cpuidex(0xb, 1) - return int(b & 0xffff) - case amd: - _, b, _, _ := cpuid(1) - return int((b >> 16) & 0xff) - default: - return 0 - } -} - -func familyModel() (int, int) { - if maxFunctionID() < 0x1 { - return 0, 0 - } - eax, _, _, _ := cpuid(1) - family := ((eax >> 8) & 0xf) + ((eax >> 20) & 0xff) - model := ((eax >> 4) & 0xf) + ((eax >> 12) & 0xf0) - return int(family), int(model) -} - -func physicalCores() int { - switch vendorID() { - case intel: - return logicalCores() / threadsPerCore() - case amd: - if maxExtendedFunction() >= 0x80000008 { - _, _, c, _ := cpuid(0x80000008) - return int(c&0xff) + 1 - } - } - return 0 -} - -// Except from http://en.wikipedia.org/wiki/CPUID#EAX.3D0:_Get_vendor_ID -var vendorMapping = map[string]vendor{ - "AMDisbetter!": amd, - "AuthenticAMD": amd, - "CentaurHauls": via, - "GenuineIntel": intel, - "TransmetaCPU": transmeta, - "GenuineTMx86": transmeta, - "Geode by NSC": nsc, - "VIA VIA VIA ": via, - "KVMKVMKVMKVM": kvm, - "Microsoft Hv": msvm, - "VMwareVMware": vmware, - "XenVMMXenVMM": xenhvm, -} - -func vendorID() vendor { - _, b, c, d := cpuid(0) - v := valAsString(b, d, c) - vend, ok := vendorMapping[string(v)] - if !ok { - return other - } - return vend -} - -func cacheLine() int { - if maxFunctionID() < 0x1 { - return 0 - } - - _, ebx, _, _ := cpuid(1) - cache := (ebx & 0xff00) >> 5 // cflush size - if cache == 0 && maxExtendedFunction() >= 0x80000006 { - _, _, ecx, _ := cpuid(0x80000006) - cache = ecx & 0xff // cacheline size - } - // TODO: Read from Cache and TLB Information - return int(cache) -} - -func (c *cpuInfo) cacheSize() { - c.cache.l1d = -1 - c.cache.l1i = -1 - c.cache.l2 = -1 - c.cache.l3 = -1 - vendor := vendorID() - switch vendor { - case intel: - if maxFunctionID() < 4 { - return - } - for i := uint32(0); ; i++ { - eax, ebx, ecx, _ := cpuidex(4, i) - cacheType := eax & 15 - if cacheType == 0 { - break - } - cacheLevel := (eax >> 5) & 7 - coherency := int(ebx&0xfff) + 1 - partitions := int((ebx>>12)&0x3ff) + 1 - associativity := int((ebx>>22)&0x3ff) + 1 - sets := int(ecx) + 1 - size := associativity * partitions * coherency * sets - switch cacheLevel { - case 1: - if cacheType == 1 { - // 1 = Data Cache - c.cache.l1d = size - } else if cacheType == 2 { - // 2 = Instruction Cache - c.cache.l1i = size - } else { - if c.cache.l1d < 0 { - c.cache.l1i = size - } - if c.cache.l1i < 0 { - c.cache.l1i = size - } - } - case 2: - c.cache.l2 = size - case 3: - c.cache.l3 = size - } - } - case amd: - // Untested. - if maxExtendedFunction() < 0x80000005 { - return - } - _, _, ecx, edx := cpuid(0x80000005) - c.cache.l1d = int(((ecx >> 24) & 0xFF) * 1024) - c.cache.l1i = int(((edx >> 24) & 0xFF) * 1024) - - if maxExtendedFunction() < 0x80000006 { - return - } - _, _, ecx, _ = cpuid(0x80000006) - c.cache.l2 = int(((ecx >> 16) & 0xFFFF) * 1024) - } - - return -} - -type sgxsupport struct { - available bool - sgx1supported bool - sgx2supported bool - maxenclavesizenot64 int64 - maxenclavesize64 int64 -} - -func hasSGX(available bool) (rval sgxsupport) { - rval.available = available - - if !available { - return - } - - a, _, _, d := cpuidex(0x12, 0) - rval.sgx1supported = a&0x01 != 0 - rval.sgx2supported = a&0x02 != 0 - rval.maxenclavesizenot64 = 1 << (d & 0xFF) // pow 2 - rval.maxenclavesize64 = 1 << ((d >> 8) & 0xFF) // pow 2 - - return -} - -func support() flags { - mfi := maxFunctionID() - vend := vendorID() - if mfi < 0x1 { - return 0 - } - rval := uint64(0) - _, _, c, d := cpuid(1) - if (d & (1 << 15)) != 0 { - rval |= cmov - } - if (d & (1 << 23)) != 0 { - rval |= mmx - } - if (d & (1 << 25)) != 0 { - rval |= mmxext - } - if (d & (1 << 25)) != 0 { - rval |= sse - } - if (d & (1 << 26)) != 0 { - rval |= sse2 - } - if (c & 1) != 0 { - rval |= sse3 - } - if (c & 0x00000200) != 0 { - rval |= ssse3 - } - if (c & 0x00080000) != 0 { - rval |= sse4 - } - if (c & 0x00100000) != 0 { - rval |= sse42 - } - if (c & (1 << 25)) != 0 { - rval |= aesni - } - if (c & (1 << 1)) != 0 { - rval |= clmul - } - if c&(1<<23) != 0 { - rval |= popcnt - } - if c&(1<<30) != 0 { - rval |= rdrand - } - if c&(1<<29) != 0 { - rval |= f16c - } - if c&(1<<13) != 0 { - rval |= cx16 - } - if vend == intel && (d&(1<<28)) != 0 && mfi >= 4 { - if threadsPerCore() > 1 { - rval |= htt - } - } - - // Check XGETBV, OXSAVE and AVX bits - if c&(1<<26) != 0 && c&(1<<27) != 0 && c&(1<<28) != 0 { - // Check for OS support - eax, _ := xgetbv(0) - if (eax & 0x6) == 0x6 { - rval |= avx - if (c & 0x00001000) != 0 { - rval |= fma3 - } - } - } - - // Check AVX2, AVX2 requires OS support, but BMI1/2 don't. - if mfi >= 7 { - _, ebx, ecx, _ := cpuidex(7, 0) - if (rval&avx) != 0 && (ebx&0x00000020) != 0 { - rval |= avx2 - } - if (ebx & 0x00000008) != 0 { - rval |= bmi1 - if (ebx & 0x00000100) != 0 { - rval |= bmi2 - } - } - if ebx&(1<<2) != 0 { - rval |= sgx - } - if ebx&(1<<4) != 0 { - rval |= hle - } - if ebx&(1<<9) != 0 { - rval |= erms - } - if ebx&(1<<11) != 0 { - rval |= rtm - } - if ebx&(1<<14) != 0 { - rval |= mpx - } - if ebx&(1<<18) != 0 { - rval |= rdseed - } - if ebx&(1<<19) != 0 { - rval |= adx - } - if ebx&(1<<29) != 0 { - rval |= sha - } - - // Only detect AVX-512 features if XGETBV is supported - if c&((1<<26)|(1<<27)) == (1<<26)|(1<<27) { - // Check for OS support - eax, _ := xgetbv(0) - - // Verify that XCR0[7:5] = ‘111b’ (OPMASK state, upper 256-bit of ZMM0-ZMM15 and - // ZMM16-ZMM31 state are enabled by OS) - /// and that XCR0[2:1] = ‘11b’ (XMM state and YMM state are enabled by OS). - if (eax>>5)&7 == 7 && (eax>>1)&3 == 3 { - if ebx&(1<<16) != 0 { - rval |= avx512f - } - if ebx&(1<<17) != 0 { - rval |= avx512dq - } - if ebx&(1<<21) != 0 { - rval |= avx512ifma - } - if ebx&(1<<26) != 0 { - rval |= avx512pf - } - if ebx&(1<<27) != 0 { - rval |= avx512er - } - if ebx&(1<<28) != 0 { - rval |= avx512cd - } - if ebx&(1<<30) != 0 { - rval |= avx512bw - } - if ebx&(1<<31) != 0 { - rval |= avx512vl - } - // ecx - if ecx&(1<<1) != 0 { - rval |= avx512vbmi - } - } - } - } - - if maxExtendedFunction() >= 0x80000001 { - _, _, c, d := cpuid(0x80000001) - if (c & (1 << 5)) != 0 { - rval |= lzcnt - rval |= popcnt - } - if (d & (1 << 31)) != 0 { - rval |= amd3dnow - } - if (d & (1 << 30)) != 0 { - rval |= amd3dnowext - } - if (d & (1 << 23)) != 0 { - rval |= mmx - } - if (d & (1 << 22)) != 0 { - rval |= mmxext - } - if (c & (1 << 6)) != 0 { - rval |= sse4a - } - if d&(1<<20) != 0 { - rval |= nx - } - if d&(1<<27) != 0 { - rval |= rdtscp - } - - /* Allow for selectively disabling SSE2 functions on AMD processors - with SSE2 support but not SSE4a. This includes Athlon64, some - Opteron, and some Sempron processors. MMX, SSE, or 3DNow! are faster - than SSE2 often enough to utilize this special-case flag. - AV_CPU_FLAG_SSE2 and AV_CPU_FLAG_SSE2SLOW are both set in this case - so that SSE2 is used unless explicitly disabled by checking - AV_CPU_FLAG_SSE2SLOW. */ - if vendorID() != intel && - rval&sse2 != 0 && (c&0x00000040) == 0 { - rval |= sse2slow - } - - /* XOP and FMA4 use the AVX instruction coding scheme, so they can't be - * used unless the OS has AVX support. */ - if (rval & avx) != 0 { - if (c & 0x00000800) != 0 { - rval |= xop - } - if (c & 0x00010000) != 0 { - rval |= fma4 - } - } - - if vendorID() == intel { - family, model := familyModel() - if family == 6 && (model == 9 || model == 13 || model == 14) { - /* 6/9 (pentium-m "banias"), 6/13 (pentium-m "dothan"), and - * 6/14 (core1 "yonah") theoretically support sse2, but it's - * usually slower than mmx. */ - if (rval & sse2) != 0 { - rval |= sse2slow - } - if (rval & sse3) != 0 { - rval |= sse3slow - } - } - /* The Atom processor has SSSE3 support, which is useful in many cases, - * but sometimes the SSSE3 version is slower than the SSE2 equivalent - * on the Atom, but is generally faster on other processors supporting - * SSSE3. This flag allows for selectively disabling certain SSSE3 - * functions on the Atom. */ - if family == 6 && model == 28 { - rval |= atom - } - } - } - return flags(rval) -} - -func valAsString(values ...uint32) []byte { - r := make([]byte, 4*len(values)) - for i, v := range values { - dst := r[i*4:] - dst[0] = byte(v & 0xff) - dst[1] = byte((v >> 8) & 0xff) - dst[2] = byte((v >> 16) & 0xff) - dst[3] = byte((v >> 24) & 0xff) - switch { - case dst[0] == 0: - return r[:i*4] - case dst[1] == 0: - return r[:i*4+1] - case dst[2] == 0: - return r[:i*4+2] - case dst[3] == 0: - return r[:i*4+3] - } - } - return r -} diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_386.s b/vendor/github.com/klauspost/cpuid/private/cpuid_386.s deleted file mode 100644 index 4d731711e..000000000 --- a/vendor/github.com/klauspost/cpuid/private/cpuid_386.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// +build 386,!gccgo - -// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuid(SB), 7, $0 - XORL CX, CX - MOVL op+0(FP), AX - CPUID - MOVL AX, eax+4(FP) - MOVL BX, ebx+8(FP) - MOVL CX, ecx+12(FP) - MOVL DX, edx+16(FP) - RET - -// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuidex(SB), 7, $0 - MOVL op+0(FP), AX - MOVL op2+4(FP), CX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func xgetbv(index uint32) (eax, edx uint32) -TEXT ·asmXgetbv(SB), 7, $0 - MOVL index+0(FP), CX - BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV - MOVL AX, eax+4(FP) - MOVL DX, edx+8(FP) - RET - -// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) -TEXT ·asmRdtscpAsm(SB), 7, $0 - BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP - MOVL AX, eax+0(FP) - MOVL BX, ebx+4(FP) - MOVL CX, ecx+8(FP) - MOVL DX, edx+12(FP) - RET diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s b/vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s deleted file mode 100644 index 3c1d60e42..000000000 --- a/vendor/github.com/klauspost/cpuid/private/cpuid_amd64.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -//+build amd64,!gccgo - -// func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuid(SB), 7, $0 - XORQ CX, CX - MOVL op+0(FP), AX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -TEXT ·asmCpuidex(SB), 7, $0 - MOVL op+0(FP), AX - MOVL op2+4(FP), CX - CPUID - MOVL AX, eax+8(FP) - MOVL BX, ebx+12(FP) - MOVL CX, ecx+16(FP) - MOVL DX, edx+20(FP) - RET - -// func asmXgetbv(index uint32) (eax, edx uint32) -TEXT ·asmXgetbv(SB), 7, $0 - MOVL index+0(FP), CX - BYTE $0x0f; BYTE $0x01; BYTE $0xd0 // XGETBV - MOVL AX, eax+8(FP) - MOVL DX, edx+12(FP) - RET - -// func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) -TEXT ·asmRdtscpAsm(SB), 7, $0 - BYTE $0x0F; BYTE $0x01; BYTE $0xF9 // RDTSCP - MOVL AX, eax+0(FP) - MOVL BX, ebx+4(FP) - MOVL CX, ecx+8(FP) - MOVL DX, edx+12(FP) - RET diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go b/vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go deleted file mode 100644 index a5f04dd6d..000000000 --- a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_intel.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// +build 386,!gccgo amd64,!gccgo - -package cpuid - -func asmCpuid(op uint32) (eax, ebx, ecx, edx uint32) -func asmCpuidex(op, op2 uint32) (eax, ebx, ecx, edx uint32) -func asmXgetbv(index uint32) (eax, edx uint32) -func asmRdtscpAsm() (eax, ebx, ecx, edx uint32) - -func initCPU() { - cpuid = asmCpuid - cpuidex = asmCpuidex - xgetbv = asmXgetbv - rdtscpAsm = asmRdtscpAsm -} diff --git a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go b/vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go deleted file mode 100644 index 909c5d9a7..000000000 --- a/vendor/github.com/klauspost/cpuid/private/cpuid_detect_ref.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015 Klaus Post, released under MIT License. See LICENSE file. - -// +build !amd64,!386 gccgo - -package cpuid - -func initCPU() { - cpuid = func(op uint32) (eax, ebx, ecx, edx uint32) { - return 0, 0, 0, 0 - } - - cpuidex = func(op, op2 uint32) (eax, ebx, ecx, edx uint32) { - return 0, 0, 0, 0 - } - - xgetbv = func(index uint32) (eax, edx uint32) { - return 0, 0 - } - - rdtscpAsm = func() (eax, ebx, ecx, edx uint32) { - return 0, 0, 0, 0 - } -} diff --git a/vendor/github.com/lib/pq/.gitignore b/vendor/github.com/lib/pq/.gitignore new file mode 100644 index 000000000..0f1d00e11 --- /dev/null +++ b/vendor/github.com/lib/pq/.gitignore @@ -0,0 +1,4 @@ +.db +*.test +*~ +*.swp diff --git a/vendor/github.com/lib/pq/.travis.sh b/vendor/github.com/lib/pq/.travis.sh new file mode 100644 index 000000000..a297dc452 --- /dev/null +++ b/vendor/github.com/lib/pq/.travis.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +set -eu + +client_configure() { + sudo chmod 600 $PQSSLCERTTEST_PATH/postgresql.key +} + +pgdg_repository() { + local sourcelist='sources.list.d/postgresql.list' + + curl -sS 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' | sudo apt-key add - + echo deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main $PGVERSION | sudo tee "/etc/apt/$sourcelist" + sudo apt-get -o Dir::Etc::sourcelist="$sourcelist" -o Dir::Etc::sourceparts='-' -o APT::Get::List-Cleanup='0' update +} + +postgresql_configure() { + sudo tee /etc/postgresql/$PGVERSION/main/pg_hba.conf > /dev/null <<-config + local all all trust + hostnossl all pqgossltest 127.0.0.1/32 reject + hostnossl all pqgosslcert 127.0.0.1/32 reject + hostssl all pqgossltest 127.0.0.1/32 trust + hostssl all pqgosslcert 127.0.0.1/32 cert + host all all 127.0.0.1/32 trust + hostnossl all pqgossltest ::1/128 reject + hostnossl all pqgosslcert ::1/128 reject + hostssl all pqgossltest ::1/128 trust + hostssl all pqgosslcert ::1/128 cert + host all all ::1/128 trust + config + + xargs sudo install -o postgres -g postgres -m 600 -t /var/lib/postgresql/$PGVERSION/main/ <<-certificates + certs/root.crt + certs/server.crt + certs/server.key + certificates + + sort -VCu <<-versions || + $PGVERSION + 9.2 + versions + sudo tee -a /etc/postgresql/$PGVERSION/main/postgresql.conf > /dev/null <<-config + ssl_ca_file = 'root.crt' + ssl_cert_file = 'server.crt' + ssl_key_file = 'server.key' + config + + echo 127.0.0.1 postgres | sudo tee -a /etc/hosts > /dev/null + + sudo service postgresql restart +} + +postgresql_install() { + xargs sudo apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confnew' install <<-packages + postgresql-$PGVERSION + postgresql-server-dev-$PGVERSION + postgresql-contrib-$PGVERSION + packages +} + +postgresql_uninstall() { + sudo service postgresql stop + xargs sudo apt-get -y --purge remove <<-packages + libpq-dev + libpq5 + postgresql + postgresql-client-common + postgresql-common + packages + sudo rm -rf /var/lib/postgresql +} + +megacheck_install() { + # Lock megacheck version at $MEGACHECK_VERSION to prevent spontaneous + # new error messages in old code. + go get -d honnef.co/go/tools/... + git -C $GOPATH/src/honnef.co/go/tools/ checkout $MEGACHECK_VERSION + go install honnef.co/go/tools/cmd/megacheck + megacheck --version +} + +golint_install() { + go get github.com/golang/lint/golint +} + +$1 diff --git a/vendor/github.com/lib/pq/.travis.yml b/vendor/github.com/lib/pq/.travis.yml new file mode 100644 index 000000000..18556e089 --- /dev/null +++ b/vendor/github.com/lib/pq/.travis.yml @@ -0,0 +1,50 @@ +language: go + +go: + - 1.8.x + - 1.9.x + - 1.10.x + - master + +sudo: true + +env: + global: + - PGUSER=postgres + - PQGOSSLTESTS=1 + - PQSSLCERTTEST_PATH=$PWD/certs + - PGHOST=127.0.0.1 + - MEGACHECK_VERSION=2017.2.2 + matrix: + - PGVERSION=10 + - PGVERSION=9.6 + - PGVERSION=9.5 + - PGVERSION=9.4 + - PGVERSION=9.3 + - PGVERSION=9.2 + - PGVERSION=9.1 + - PGVERSION=9.0 + +before_install: + - ./.travis.sh postgresql_uninstall + - ./.travis.sh pgdg_repository + - ./.travis.sh postgresql_install + - ./.travis.sh postgresql_configure + - ./.travis.sh client_configure + - ./.travis.sh megacheck_install + - ./.travis.sh golint_install + - go get golang.org/x/tools/cmd/goimports + +before_script: + - createdb pqgotest + - createuser -DRS pqgossltest + - createuser -DRS pqgosslcert + +script: + - > + goimports -d -e $(find -name '*.go') | awk '{ print } END { exit NR == 0 ? 0 : 1 }' + - go vet ./... + - megacheck -go 1.8 ./... + - golint ./... + - PQTEST_BINARY_PARAMETERS=no go test -race -v ./... + - PQTEST_BINARY_PARAMETERS=yes go test -race -v ./... diff --git a/vendor/github.com/lib/pq/CONTRIBUTING.md b/vendor/github.com/lib/pq/CONTRIBUTING.md new file mode 100644 index 000000000..84c937f15 --- /dev/null +++ b/vendor/github.com/lib/pq/CONTRIBUTING.md @@ -0,0 +1,29 @@ +## Contributing to pq + +`pq` has a backlog of pull requests, but contributions are still very +much welcome. You can help with patch review, submitting bug reports, +or adding new functionality. There is no formal style guide, but +please conform to the style of existing code and general Go formatting +conventions when submitting patches. + +### Patch review + +Help review existing open pull requests by commenting on the code or +proposed functionality. + +### Bug reports + +We appreciate any bug reports, but especially ones with self-contained +(doesn't depend on code outside of pq), minimal (can't be simplified +further) test cases. It's especially helpful if you can submit a pull +request with just the failing test case (you'll probably want to +pattern it after the tests in +[conn_test.go](https://github.com/lib/pq/blob/master/conn_test.go). + +### New functionality + +There are a number of pending patches for new functionality, so +additional feature patches will take a while to merge. Still, patches +are generally reviewed based on usefulness and complexity in addition +to time-in-queue, so if you have a knockout idea, take a shot. Feel +free to open an issue discussion your proposed patch beforehand. diff --git a/vendor/github.com/lib/pq/README.md b/vendor/github.com/lib/pq/README.md new file mode 100644 index 000000000..d71f3c2c3 --- /dev/null +++ b/vendor/github.com/lib/pq/README.md @@ -0,0 +1,95 @@ +# pq - A pure Go postgres driver for Go's database/sql package + +[![GoDoc](https://godoc.org/github.com/lib/pq?status.svg)](https://godoc.org/github.com/lib/pq) +[![Build Status](https://travis-ci.org/lib/pq.svg?branch=master)](https://travis-ci.org/lib/pq) + +## Install + + go get github.com/lib/pq + +## Docs + +For detailed documentation and basic usage examples, please see the package +documentation at . + +## Tests + +`go test` is used for testing. See [TESTS.md](TESTS.md) for more details. + +## Features + +* SSL +* Handles bad connections for `database/sql` +* Scan `time.Time` correctly (i.e. `timestamp[tz]`, `time[tz]`, `date`) +* Scan binary blobs correctly (i.e. `bytea`) +* Package for `hstore` support +* COPY FROM support +* pq.ParseURL for converting urls to connection strings for sql.Open. +* Many libpq compatible environment variables +* Unix socket support +* Notifications: `LISTEN`/`NOTIFY` +* pgpass support + +## Future / Things you can help with + +* Better COPY FROM / COPY TO (see discussion in #181) + +## Thank you (alphabetical) + +Some of these contributors are from the original library `bmizerany/pq.go` whose +code still exists in here. + +* Andy Balholm (andybalholm) +* Ben Berkert (benburkert) +* Benjamin Heatwole (bheatwole) +* Bill Mill (llimllib) +* Bjørn Madsen (aeons) +* Blake Gentry (bgentry) +* Brad Fitzpatrick (bradfitz) +* Charlie Melbye (cmelbye) +* Chris Bandy (cbandy) +* Chris Gilling (cgilling) +* Chris Walsh (cwds) +* Dan Sosedoff (sosedoff) +* Daniel Farina (fdr) +* Eric Chlebek (echlebek) +* Eric Garrido (minusnine) +* Eric Urban (hydrogen18) +* Everyone at The Go Team +* Evan Shaw (edsrzf) +* Ewan Chou (coocood) +* Fazal Majid (fazalmajid) +* Federico Romero (federomero) +* Fumin (fumin) +* Gary Burd (garyburd) +* Heroku (heroku) +* James Pozdena (jpoz) +* Jason McVetta (jmcvetta) +* Jeremy Jay (pbnjay) +* Joakim Sernbrant (serbaut) +* John Gallagher (jgallagher) +* Jonathan Rudenberg (titanous) +* Joël Stemmer (jstemmer) +* Kamil Kisiel (kisielk) +* Kelly Dunn (kellydunn) +* Keith Rarick (kr) +* Kir Shatrov (kirs) +* Lann Martin (lann) +* Maciek Sakrejda (uhoh-itsmaciek) +* Marc Brinkmann (mbr) +* Marko Tiikkaja (johto) +* Matt Newberry (MattNewberry) +* Matt Robenolt (mattrobenolt) +* Martin Olsen (martinolsen) +* Mike Lewis (mikelikespie) +* Nicolas Patry (Narsil) +* Oliver Tonnhofer (olt) +* Patrick Hayes (phayes) +* Paul Hammond (paulhammond) +* Ryan Smith (ryandotsmith) +* Samuel Stauffer (samuel) +* Timothée Peignier (cyberdelia) +* Travis Cline (tmc) +* TruongSinh Tran-Nguyen (truongsinh) +* Yaismel Miranda (ympons) +* notedit (notedit) diff --git a/vendor/github.com/lib/pq/TESTS.md b/vendor/github.com/lib/pq/TESTS.md new file mode 100644 index 000000000..f05021115 --- /dev/null +++ b/vendor/github.com/lib/pq/TESTS.md @@ -0,0 +1,33 @@ +# Tests + +## Running Tests + +`go test` is used for testing. A running PostgreSQL +server is required, with the ability to log in. The +database to connect to test with is "pqgotest," on +"localhost" but these can be overridden using [environment +variables](https://www.postgresql.org/docs/9.3/static/libpq-envars.html). + +Example: + + PGHOST=/run/postgresql go test + +## Benchmarks + +A benchmark suite can be run as part of the tests: + + go test -bench . + +## Example setup (Docker) + +Run a postgres container: + +``` +docker run --expose 5432:5432 postgres +``` + +Run tests: + +``` +PGHOST=localhost PGPORT=5432 PGUSER=postgres PGSSLMODE=disable PGDATABASE=postgres go test +``` diff --git a/vendor/github.com/lib/pq/example/listen/doc.go b/vendor/github.com/lib/pq/example/listen/doc.go deleted file mode 100644 index 91e2ddbad..000000000 --- a/vendor/github.com/lib/pq/example/listen/doc.go +++ /dev/null @@ -1,98 +0,0 @@ -/* - -Package listen is a self-contained Go program which uses the LISTEN / NOTIFY -mechanism to avoid polling the database while waiting for more work to arrive. - - // - // You can see the program in action by defining a function similar to - // the following: - // - // CREATE OR REPLACE FUNCTION public.get_work() - // RETURNS bigint - // LANGUAGE sql - // AS $$ - // SELECT CASE WHEN random() >= 0.2 THEN int8 '1' END - // $$ - // ; - - package main - - import ( - "database/sql" - "fmt" - "time" - - "github.com/lib/pq" - ) - - func doWork(db *sql.DB, work int64) { - // work here - } - - func getWork(db *sql.DB) { - for { - // get work from the database here - var work sql.NullInt64 - err := db.QueryRow("SELECT get_work()").Scan(&work) - if err != nil { - fmt.Println("call to get_work() failed: ", err) - time.Sleep(10 * time.Second) - continue - } - if !work.Valid { - // no more work to do - fmt.Println("ran out of work") - return - } - - fmt.Println("starting work on ", work.Int64) - go doWork(db, work.Int64) - } - } - - func waitForNotification(l *pq.Listener) { - select { - case <-l.Notify: - fmt.Println("received notification, new work available") - case <-time.After(90 * time.Second): - go l.Ping() - // Check if there's more work available, just in case it takes - // a while for the Listener to notice connection loss and - // reconnect. - fmt.Println("received no work for 90 seconds, checking for new work") - } - } - - func main() { - var conninfo string = "" - - db, err := sql.Open("postgres", conninfo) - if err != nil { - panic(err) - } - - reportProblem := func(ev pq.ListenerEventType, err error) { - if err != nil { - fmt.Println(err.Error()) - } - } - - minReconn := 10 * time.Second - maxReconn := time.Minute - listener := pq.NewListener(conninfo, minReconn, maxReconn, reportProblem) - err = listener.Listen("getwork") - if err != nil { - panic(err) - } - - fmt.Println("entering main loop") - for { - // process all available work before waiting for notifications - getWork(db) - waitForNotification(listener) - } - } - - -*/ -package listen diff --git a/vendor/github.com/lib/pq/go.mod b/vendor/github.com/lib/pq/go.mod new file mode 100644 index 000000000..edf0b343f --- /dev/null +++ b/vendor/github.com/lib/pq/go.mod @@ -0,0 +1 @@ +module github.com/lib/pq diff --git a/vendor/github.com/lib/pq/hstore/hstore.go b/vendor/github.com/lib/pq/hstore/hstore.go deleted file mode 100644 index f1470db14..000000000 --- a/vendor/github.com/lib/pq/hstore/hstore.go +++ /dev/null @@ -1,118 +0,0 @@ -package hstore - -import ( - "database/sql" - "database/sql/driver" - "strings" -) - -// Hstore is a wrapper for transferring Hstore values back and forth easily. -type Hstore struct { - Map map[string]sql.NullString -} - -// escapes and quotes hstore keys/values -// s should be a sql.NullString or string -func hQuote(s interface{}) string { - var str string - switch v := s.(type) { - case sql.NullString: - if !v.Valid { - return "NULL" - } - str = v.String - case string: - str = v - default: - panic("not a string or sql.NullString") - } - - str = strings.Replace(str, "\\", "\\\\", -1) - return `"` + strings.Replace(str, "\"", "\\\"", -1) + `"` -} - -// Scan implements the Scanner interface. -// -// Note h.Map is reallocated before the scan to clear existing values. If the -// hstore column's database value is NULL, then h.Map is set to nil instead. -func (h *Hstore) Scan(value interface{}) error { - if value == nil { - h.Map = nil - return nil - } - h.Map = make(map[string]sql.NullString) - var b byte - pair := [][]byte{{}, {}} - pi := 0 - inQuote := false - didQuote := false - sawSlash := false - bindex := 0 - for bindex, b = range value.([]byte) { - if sawSlash { - pair[pi] = append(pair[pi], b) - sawSlash = false - continue - } - - switch b { - case '\\': - sawSlash = true - continue - case '"': - inQuote = !inQuote - if !didQuote { - didQuote = true - } - continue - default: - if !inQuote { - switch b { - case ' ', '\t', '\n', '\r': - continue - case '=': - continue - case '>': - pi = 1 - didQuote = false - continue - case ',': - s := string(pair[1]) - if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" { - h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false} - } else { - h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true} - } - pair[0] = []byte{} - pair[1] = []byte{} - pi = 0 - continue - } - } - } - pair[pi] = append(pair[pi], b) - } - if bindex > 0 { - s := string(pair[1]) - if !didQuote && len(s) == 4 && strings.ToLower(s) == "null" { - h.Map[string(pair[0])] = sql.NullString{String: "", Valid: false} - } else { - h.Map[string(pair[0])] = sql.NullString{String: string(pair[1]), Valid: true} - } - } - return nil -} - -// Value implements the driver Valuer interface. Note if h.Map is nil, the -// database column value will be set to NULL. -func (h Hstore) Value() (driver.Value, error) { - if h.Map == nil { - return nil, nil - } - parts := []string{} - for key, val := range h.Map { - thispart := hQuote(key) + "=>" + hQuote(val) - parts = append(parts, thispart) - } - return []byte(strings.Join(parts, ",")), nil -} diff --git a/vendor/github.com/magefile/mage/mg/deps.go b/vendor/github.com/magefile/mage/mg/deps.go deleted file mode 100644 index 30d6edc41..000000000 --- a/vendor/github.com/magefile/mage/mg/deps.go +++ /dev/null @@ -1,166 +0,0 @@ -package mg - -import ( - "context" - "fmt" - "reflect" - "runtime" - "strings" - "sync" - - "github.com/magefile/mage/types" -) - -type onceMap struct { - mu *sync.Mutex - m map[string]*onceFun -} - -func (o *onceMap) LoadOrStore(s string, one *onceFun) *onceFun { - defer o.mu.Unlock() - o.mu.Lock() - - existing, ok := o.m[s] - if ok { - return existing - } - o.m[s] = one - return one -} - -var onces = &onceMap{ - mu: &sync.Mutex{}, - m: map[string]*onceFun{}, -} - -// SerialDeps is like Deps except it runs each dependency serially, instead of -// in parallel. This can be useful for resource intensive dependencies that -// shouldn't be run at the same time. -func SerialDeps(fns ...interface{}) { - checkFns(fns) - ctx := context.Background() - for _, f := range fns { - runDeps(ctx, f) - } -} - -// SerialCtxDeps is like CtxDeps except it runs each dependency serially, -// instead of in parallel. This can be useful for resource intensive -// dependencies that shouldn't be run at the same time. -func SerialCtxDeps(ctx context.Context, fns ...interface{}) { - checkFns(fns) - for _, f := range fns { - runDeps(ctx, f) - } -} - -// CtxDeps runs the given functions as dependencies of the calling function. -// Dependencies must only be of type: github.com/magefile/mage/types.FuncType. -// The function calling Deps is guaranteed that all dependent functions will be -// run exactly once when Deps returns. Dependent functions may in turn declare -// their own dependencies using Deps. Each dependency is run in their own -// goroutines. Each function is given the context provided if the function -// prototype allows for it. -func CtxDeps(ctx context.Context, fns ...interface{}) { - checkFns(fns) - runDeps(ctx, fns...) -} - -// runDeps assumes you've already called checkFns. -func runDeps(ctx context.Context, fns ...interface{}) { - mu := &sync.Mutex{} - var errs []string - var exit int - wg := &sync.WaitGroup{} - for _, f := range fns { - fn := addDep(ctx, f) - wg.Add(1) - go func() { - defer func() { - if v := recover(); v != nil { - mu.Lock() - if err, ok := v.(error); ok { - exit = changeExit(exit, ExitStatus(err)) - } else { - exit = changeExit(exit, 1) - } - errs = append(errs, fmt.Sprint(v)) - mu.Unlock() - } - wg.Done() - }() - if err := fn.run(); err != nil { - mu.Lock() - errs = append(errs, fmt.Sprint(err)) - exit = changeExit(exit, ExitStatus(err)) - mu.Unlock() - } - }() - } - - wg.Wait() - if len(errs) > 0 { - panic(Fatal(exit, strings.Join(errs, "\n"))) - } -} - -func checkFns(fns []interface{}) { - for _, f := range fns { - if err := types.FuncCheck(f); err != nil { - panic(err) - } - } -} - -// Deps runs the given functions with the default runtime context -func Deps(fns ...interface{}) { - CtxDeps(context.Background(), fns...) -} - -func changeExit(old, new int) int { - if new == 0 { - return old - } - if old == 0 { - return new - } - if old == new { - return old - } - // both different and both non-zero, just set - // exit to 1. Nothing more we can do. - return 1 -} - -func addDep(ctx context.Context, f interface{}) *onceFun { - var fn func(context.Context) error - if fn = types.FuncTypeWrap(f); fn == nil { - // should be impossible, since we already checked this - panic("attempted to add a dep that did not match required type") - } - - n := name(f) - of := onces.LoadOrStore(n, &onceFun{ - fn: fn, - ctx: ctx, - }) - return of -} - -func name(i interface{}) string { - return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name() -} - -type onceFun struct { - once sync.Once - fn func(context.Context) error - ctx context.Context -} - -func (o *onceFun) run() error { - var err error - o.once.Do(func() { - err = o.fn(o.ctx) - }) - return err -} diff --git a/vendor/github.com/magefile/mage/mg/errors.go b/vendor/github.com/magefile/mage/mg/errors.go deleted file mode 100644 index 06a869086..000000000 --- a/vendor/github.com/magefile/mage/mg/errors.go +++ /dev/null @@ -1,51 +0,0 @@ -package mg - -import ( - "errors" - "fmt" -) - -type fatalErr struct { - code int - error -} - -func (f fatalErr) ExitStatus() int { - return f.code -} - -type exitStatus interface { - ExitStatus() int -} - -// Fatal returns an error that will cause mage to print out the -// given args and exit with the given exit code. -func Fatal(code int, args ...interface{}) error { - return fatalErr{ - code: code, - error: errors.New(fmt.Sprint(args...)), - } -} - -// Fatalf returns an error that will cause mage to print out the -// given message and exit with an exit code of 1. -func Fatalf(code int, format string, args ...interface{}) error { - return fatalErr{ - code: code, - error: fmt.Errorf(format, args...), - } -} - -// ExitStatus queries the error for an exit status. If the error is nil, it -// returns 0. If the error does not implement ExitStatus() int, it returns 1. -// Otherwise it retiurns the value from ExitStatus(). -func ExitStatus(err error) int { - if err == nil { - return 0 - } - exit, ok := err.(exitStatus) - if !ok { - return 1 - } - return exit.ExitStatus() -} diff --git a/vendor/github.com/magefile/mage/mg/runtime.go b/vendor/github.com/magefile/mage/mg/runtime.go deleted file mode 100644 index 8b99613d6..000000000 --- a/vendor/github.com/magefile/mage/mg/runtime.go +++ /dev/null @@ -1,36 +0,0 @@ -package mg - -import ( - "os" - "path/filepath" - "runtime" -) - -// CacheEnv is the environment variable that users may set to change the -// location where mage stores its compiled binaries. -const CacheEnv = "MAGEFILE_CACHE" - -// verboseEnv is the environment variable that indicates the user requested -// verbose mode when running a magefile. -const verboseEnv = "MAGEFILE_VERBOSE" - -// Verbose reports whether a magefile was run with the verbose flag. -func Verbose() bool { - return os.Getenv(verboseEnv) != "" -} - -// CacheDir returns the directory where mage caches compiled binaries. It -// defaults to $HOME/.magefile, but may be overridden by the MAGEFILE_CACHE -// environment variable. -func CacheDir() string { - d := os.Getenv(CacheEnv) - if d != "" { - return d - } - switch runtime.GOOS { - case "windows": - return filepath.Join(os.Getenv("HOMEDRIVE"), os.Getenv("HOMEPATH"), "magefile") - default: - return filepath.Join(os.Getenv("HOME"), ".magefile") - } -} diff --git a/vendor/github.com/magefile/mage/sh/LICENSE b/vendor/github.com/magefile/mage/sh/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/magefile/mage/sh/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. diff --git a/vendor/github.com/magefile/mage/sh/cmd.go b/vendor/github.com/magefile/mage/sh/cmd.go deleted file mode 100644 index 23fc37228..000000000 --- a/vendor/github.com/magefile/mage/sh/cmd.go +++ /dev/null @@ -1,165 +0,0 @@ -package sh - -import ( - "bytes" - "fmt" - "io" - "log" - "os" - "os/exec" - "strings" - - "github.com/magefile/mage/mg" -) - -// RunCmd returns a function that will call Run with the given command. This is -// useful for creating command aliases to make your scripts easier to read, like -// this: -// -// // in a helper file somewhere -// var g0 = sh.RunCmd("go") // go is a keyword :( -// -// // somewhere in your main code -// if err := g0("install", "github.com/gohugo/hugo"); err != nil { -// return err -// } -// -// Args passed to command get baked in as args to the command when you run it. -// Any args passed in when you run the returned function will be appended to the -// original args. For example, this is equivalent to the above: -// -// var goInstall = sh.RunCmd("go", "install") goInstall("github.com/gohugo/hugo") -// -// RunCmd uses Exec underneath, so see those docs for more details. -func RunCmd(cmd string, args ...string) func(args ...string) error { - return func(args2 ...string) error { - return Run(cmd, append(args, args2...)...) - } -} - -// OutCmd is like RunCmd except the command returns the output of the -// command. -func OutCmd(cmd string, args ...string) func(args ...string) (string, error) { - return func(args2 ...string) (string, error) { - return Output(cmd, append(args, args2...)...) - } -} - -// Run is like RunWith, but doesn't specify any environment variables. -func Run(cmd string, args ...string) error { - return RunWith(nil, cmd, args...) -} - -// RunV is like Run, but always sends the command's stdout to os.Stdout. -func RunV(cmd string, args ...string) error { - _, err := Exec(nil, os.Stdout, os.Stderr, cmd, args...) - return err -} - -// RunWith runs the given command, directing stderr to this program's stderr and -// printing stdout to stdout if mage was run with -v. It adds adds env to the -// environment variables for the command being run. Environment variables should -// be in the format name=value. -func RunWith(env map[string]string, cmd string, args ...string) error { - var output io.Writer - if mg.Verbose() { - output = os.Stdout - } - _, err := Exec(env, output, os.Stderr, cmd, args...) - return err -} - -// Output runs the command and returns the text from stdout. -func Output(cmd string, args ...string) (string, error) { - buf := &bytes.Buffer{} - _, err := Exec(nil, buf, os.Stderr, cmd, args...) - return strings.TrimSuffix(buf.String(), "\n"), err -} - -// OutputWith is like RunWith, ubt returns what is written to stdout. -func OutputWith(env map[string]string, cmd string, args ...string) (string, error) { - buf := &bytes.Buffer{} - _, err := Exec(env, buf, os.Stderr, cmd, args...) - return strings.TrimSuffix(buf.String(), "\n"), err -} - -// Exec executes the command, piping its stderr to mage's stderr and -// piping its stdout to the given writer. If the command fails, it will return -// an error that, if returned from a target or mg.Deps call, will cause mage to -// exit with the same code as the command failed with. Env is a list of -// environment variables to set when running the command, these override the -// current environment variables set (which are also passed to the command). cmd -// and args may include references to environment variables in $FOO format, in -// which case these will be expanded before the command is run. -// -// Ran reports if the command ran (rather than was not found or not executable). -// Code reports the exit code the command returned if it ran. If err == nil, ran -// is always true and code is always 0. -func Exec(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, err error) { - expand := func(s string) string { - s2, ok := env[s] - if ok { - return s2 - } - return os.Getenv(s) - } - cmd = os.Expand(cmd, expand) - for i := range args { - args[i] = os.Expand(args[i], expand) - } - ran, code, err := run(env, stdout, stderr, cmd, args...) - if err == nil { - return true, nil - } - if ran { - return ran, mg.Fatalf(code, `running "%s %s" failed with exit code %d`, cmd, strings.Join(args, " "), code) - } - return ran, fmt.Errorf(`failed to run "%s %s: %v"`, cmd, strings.Join(args, " "), err) -} - -func run(env map[string]string, stdout, stderr io.Writer, cmd string, args ...string) (ran bool, code int, err error) { - c := exec.Command(cmd, args...) - c.Env = os.Environ() - for k, v := range env { - c.Env = append(c.Env, k+"="+v) - } - c.Stderr = stderr - c.Stdout = stdout - c.Stdin = os.Stdin - log.Println("exec:", cmd, strings.Join(args, " ")) - err = c.Run() - return cmdRan(err), ExitStatus(err), err -} - -func cmdRan(err error) bool { - if err == nil { - return true - } - ee, ok := err.(*exec.ExitError) - if ok { - return ee.Exited() - } - return false -} - -type exitStatus interface { - ExitStatus() int -} - -// ExitStatus returns the exit status of the error if it is an exec.ExitError -// or if it implements ExitStatus() int. -// 0 if it is nil or 1 if it is a different error. -func ExitStatus(err error) int { - if err == nil { - return 0 - } - if e, ok := err.(exitStatus); ok { - return e.ExitStatus() - } - if e, ok := err.(*exec.ExitError); ok { - if ex, ok := e.Sys().(exitStatus); ok { - return ex.ExitStatus() - } - } - return 1 -} diff --git a/vendor/github.com/magefile/mage/sh/helpers.go b/vendor/github.com/magefile/mage/sh/helpers.go deleted file mode 100644 index 86b075ef2..000000000 --- a/vendor/github.com/magefile/mage/sh/helpers.go +++ /dev/null @@ -1,16 +0,0 @@ -package sh - -import ( - "fmt" - "os" -) - -// Rm removes the given file or directory even if non-empty. It will not return -// an error if the target doesn't exist, only if the target cannot be removed. -func Rm(path string) error { - err := os.RemoveAll(path) - if err == nil || os.IsNotExist(err) { - return nil - } - return fmt.Errorf(`failed to remove %s: %v`, path, err) -} diff --git a/vendor/github.com/magefile/mage/types/LICENSE b/vendor/github.com/magefile/mage/types/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/magefile/mage/types/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. diff --git a/vendor/github.com/magefile/mage/types/funcs.go b/vendor/github.com/magefile/mage/types/funcs.go deleted file mode 100644 index 9e2e1331b..000000000 --- a/vendor/github.com/magefile/mage/types/funcs.go +++ /dev/null @@ -1,58 +0,0 @@ -package types - -import ( - "context" - "fmt" -) - -// FuncType indicates a prototype of build job function -type FuncType int - -// FuncTypes -const ( - InvalidType FuncType = iota - VoidType - ErrorType - ContextVoidType - ContextErrorType -) - -// FuncCheck tests if a function is one of FuncType -func FuncCheck(fn interface{}) error { - switch fn.(type) { - case func(): - return nil - case func() error: - return nil - case func(context.Context): - return nil - case func(context.Context) error: - return nil - } - return fmt.Errorf("Invalid type for dependent function: %T. Dependencies must be func(), func() error, func(context.Context) or func(context.Context) error", fn) -} - -// FuncTypeWrap wraps a valid FuncType to FuncContextError -func FuncTypeWrap(fn interface{}) func(context.Context) error { - if FuncCheck(fn) == nil { - switch f := fn.(type) { - case func(): - return func(context.Context) error { - f() - return nil - } - case func() error: - return func(context.Context) error { - return f() - } - case func(context.Context): - return func(ctx context.Context) error { - f(ctx) - return nil - } - case func(context.Context) error: - return f - } - } - return nil -} diff --git a/vendor/github.com/mattn/go-runewidth/LICENSE b/vendor/github.com/mattn/go-runewidth/LICENSE deleted file mode 100644 index 91b5cef30..000000000 --- a/vendor/github.com/mattn/go-runewidth/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Yasuhiro Matsumoto - -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/mattn/go-runewidth/runewidth.go b/vendor/github.com/mattn/go-runewidth/runewidth.go deleted file mode 100644 index a16f1af0e..000000000 --- a/vendor/github.com/mattn/go-runewidth/runewidth.go +++ /dev/null @@ -1,1224 +0,0 @@ -package runewidth - -var ( - // EastAsianWidth will be set true if the current locale is CJK - EastAsianWidth = IsEastAsian() - - // DefaultCondition is a condition in current locale - DefaultCondition = &Condition{EastAsianWidth} -) - -type interval struct { - first rune - last rune -} - -type table []interval - -func inTables(r rune, ts ...table) bool { - for _, t := range ts { - if inTable(r, t) { - return true - } - } - return false -} - -func inTable(r rune, t table) bool { - // func (t table) IncludesRune(r rune) bool { - if r < t[0].first { - return false - } - - bot := 0 - top := len(t) - 1 - for top >= bot { - mid := (bot + top) / 2 - - switch { - case t[mid].last < r: - bot = mid + 1 - case t[mid].first > r: - top = mid - 1 - default: - return true - } - } - - return false -} - -var private = table{ - {0x00E000, 0x00F8FF}, {0x0F0000, 0x0FFFFD}, {0x100000, 0x10FFFD}, -} - -var nonprint = table{ - {0x0000, 0x001F}, {0x007F, 0x009F}, {0x00AD, 0x00AD}, - {0x070F, 0x070F}, {0x180B, 0x180E}, {0x200B, 0x200F}, - {0x2028, 0x2029}, - {0x202A, 0x202E}, {0x206A, 0x206F}, {0xD800, 0xDFFF}, - {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFE, 0xFFFF}, -} - -var combining = table{ - {0x0300, 0x036F}, {0x0483, 0x0489}, {0x0591, 0x05BD}, - {0x05BF, 0x05BF}, {0x05C1, 0x05C2}, {0x05C4, 0x05C5}, - {0x05C7, 0x05C7}, {0x0610, 0x061A}, {0x064B, 0x065F}, - {0x0670, 0x0670}, {0x06D6, 0x06DC}, {0x06DF, 0x06E4}, - {0x06E7, 0x06E8}, {0x06EA, 0x06ED}, {0x0711, 0x0711}, - {0x0730, 0x074A}, {0x07A6, 0x07B0}, {0x07EB, 0x07F3}, - {0x0816, 0x0819}, {0x081B, 0x0823}, {0x0825, 0x0827}, - {0x0829, 0x082D}, {0x0859, 0x085B}, {0x08D4, 0x08E1}, - {0x08E3, 0x0903}, {0x093A, 0x093C}, {0x093E, 0x094F}, - {0x0951, 0x0957}, {0x0962, 0x0963}, {0x0981, 0x0983}, - {0x09BC, 0x09BC}, {0x09BE, 0x09C4}, {0x09C7, 0x09C8}, - {0x09CB, 0x09CD}, {0x09D7, 0x09D7}, {0x09E2, 0x09E3}, - {0x0A01, 0x0A03}, {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A42}, - {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51}, - {0x0A70, 0x0A71}, {0x0A75, 0x0A75}, {0x0A81, 0x0A83}, - {0x0ABC, 0x0ABC}, {0x0ABE, 0x0AC5}, {0x0AC7, 0x0AC9}, - {0x0ACB, 0x0ACD}, {0x0AE2, 0x0AE3}, {0x0B01, 0x0B03}, - {0x0B3C, 0x0B3C}, {0x0B3E, 0x0B44}, {0x0B47, 0x0B48}, - {0x0B4B, 0x0B4D}, {0x0B56, 0x0B57}, {0x0B62, 0x0B63}, - {0x0B82, 0x0B82}, {0x0BBE, 0x0BC2}, {0x0BC6, 0x0BC8}, - {0x0BCA, 0x0BCD}, {0x0BD7, 0x0BD7}, {0x0C00, 0x0C03}, - {0x0C3E, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D}, - {0x0C55, 0x0C56}, {0x0C62, 0x0C63}, {0x0C81, 0x0C83}, - {0x0CBC, 0x0CBC}, {0x0CBE, 0x0CC4}, {0x0CC6, 0x0CC8}, - {0x0CCA, 0x0CCD}, {0x0CD5, 0x0CD6}, {0x0CE2, 0x0CE3}, - {0x0D01, 0x0D03}, {0x0D3E, 0x0D44}, {0x0D46, 0x0D48}, - {0x0D4A, 0x0D4D}, {0x0D57, 0x0D57}, {0x0D62, 0x0D63}, - {0x0D82, 0x0D83}, {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD4}, - {0x0DD6, 0x0DD6}, {0x0DD8, 0x0DDF}, {0x0DF2, 0x0DF3}, - {0x0E31, 0x0E31}, {0x0E34, 0x0E3A}, {0x0E47, 0x0E4E}, - {0x0EB1, 0x0EB1}, {0x0EB4, 0x0EB9}, {0x0EBB, 0x0EBC}, - {0x0EC8, 0x0ECD}, {0x0F18, 0x0F19}, {0x0F35, 0x0F35}, - {0x0F37, 0x0F37}, {0x0F39, 0x0F39}, {0x0F3E, 0x0F3F}, - {0x0F71, 0x0F84}, {0x0F86, 0x0F87}, {0x0F8D, 0x0F97}, - {0x0F99, 0x0FBC}, {0x0FC6, 0x0FC6}, {0x102B, 0x103E}, - {0x1056, 0x1059}, {0x105E, 0x1060}, {0x1062, 0x1064}, - {0x1067, 0x106D}, {0x1071, 0x1074}, {0x1082, 0x108D}, - {0x108F, 0x108F}, {0x109A, 0x109D}, {0x135D, 0x135F}, - {0x1712, 0x1714}, {0x1732, 0x1734}, {0x1752, 0x1753}, - {0x1772, 0x1773}, {0x17B4, 0x17D3}, {0x17DD, 0x17DD}, - {0x180B, 0x180D}, {0x1885, 0x1886}, {0x18A9, 0x18A9}, - {0x1920, 0x192B}, {0x1930, 0x193B}, {0x1A17, 0x1A1B}, - {0x1A55, 0x1A5E}, {0x1A60, 0x1A7C}, {0x1A7F, 0x1A7F}, - {0x1AB0, 0x1ABE}, {0x1B00, 0x1B04}, {0x1B34, 0x1B44}, - {0x1B6B, 0x1B73}, {0x1B80, 0x1B82}, {0x1BA1, 0x1BAD}, - {0x1BE6, 0x1BF3}, {0x1C24, 0x1C37}, {0x1CD0, 0x1CD2}, - {0x1CD4, 0x1CE8}, {0x1CED, 0x1CED}, {0x1CF2, 0x1CF4}, - {0x1CF8, 0x1CF9}, {0x1DC0, 0x1DF5}, {0x1DFB, 0x1DFF}, - {0x20D0, 0x20F0}, {0x2CEF, 0x2CF1}, {0x2D7F, 0x2D7F}, - {0x2DE0, 0x2DFF}, {0x302A, 0x302F}, {0x3099, 0x309A}, - {0xA66F, 0xA672}, {0xA674, 0xA67D}, {0xA69E, 0xA69F}, - {0xA6F0, 0xA6F1}, {0xA802, 0xA802}, {0xA806, 0xA806}, - {0xA80B, 0xA80B}, {0xA823, 0xA827}, {0xA880, 0xA881}, - {0xA8B4, 0xA8C5}, {0xA8E0, 0xA8F1}, {0xA926, 0xA92D}, - {0xA947, 0xA953}, {0xA980, 0xA983}, {0xA9B3, 0xA9C0}, - {0xA9E5, 0xA9E5}, {0xAA29, 0xAA36}, {0xAA43, 0xAA43}, - {0xAA4C, 0xAA4D}, {0xAA7B, 0xAA7D}, {0xAAB0, 0xAAB0}, - {0xAAB2, 0xAAB4}, {0xAAB7, 0xAAB8}, {0xAABE, 0xAABF}, - {0xAAC1, 0xAAC1}, {0xAAEB, 0xAAEF}, {0xAAF5, 0xAAF6}, - {0xABE3, 0xABEA}, {0xABEC, 0xABED}, {0xFB1E, 0xFB1E}, - {0xFE00, 0xFE0F}, {0xFE20, 0xFE2F}, {0x101FD, 0x101FD}, - {0x102E0, 0x102E0}, {0x10376, 0x1037A}, {0x10A01, 0x10A03}, - {0x10A05, 0x10A06}, {0x10A0C, 0x10A0F}, {0x10A38, 0x10A3A}, - {0x10A3F, 0x10A3F}, {0x10AE5, 0x10AE6}, {0x11000, 0x11002}, - {0x11038, 0x11046}, {0x1107F, 0x11082}, {0x110B0, 0x110BA}, - {0x11100, 0x11102}, {0x11127, 0x11134}, {0x11173, 0x11173}, - {0x11180, 0x11182}, {0x111B3, 0x111C0}, {0x111CA, 0x111CC}, - {0x1122C, 0x11237}, {0x1123E, 0x1123E}, {0x112DF, 0x112EA}, - {0x11300, 0x11303}, {0x1133C, 0x1133C}, {0x1133E, 0x11344}, - {0x11347, 0x11348}, {0x1134B, 0x1134D}, {0x11357, 0x11357}, - {0x11362, 0x11363}, {0x11366, 0x1136C}, {0x11370, 0x11374}, - {0x11435, 0x11446}, {0x114B0, 0x114C3}, {0x115AF, 0x115B5}, - {0x115B8, 0x115C0}, {0x115DC, 0x115DD}, {0x11630, 0x11640}, - {0x116AB, 0x116B7}, {0x1171D, 0x1172B}, {0x11C2F, 0x11C36}, - {0x11C38, 0x11C3F}, {0x11C92, 0x11CA7}, {0x11CA9, 0x11CB6}, - {0x16AF0, 0x16AF4}, {0x16B30, 0x16B36}, {0x16F51, 0x16F7E}, - {0x16F8F, 0x16F92}, {0x1BC9D, 0x1BC9E}, {0x1D165, 0x1D169}, - {0x1D16D, 0x1D172}, {0x1D17B, 0x1D182}, {0x1D185, 0x1D18B}, - {0x1D1AA, 0x1D1AD}, {0x1D242, 0x1D244}, {0x1DA00, 0x1DA36}, - {0x1DA3B, 0x1DA6C}, {0x1DA75, 0x1DA75}, {0x1DA84, 0x1DA84}, - {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF}, {0x1E000, 0x1E006}, - {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, {0x1E023, 0x1E024}, - {0x1E026, 0x1E02A}, {0x1E8D0, 0x1E8D6}, {0x1E944, 0x1E94A}, - {0xE0100, 0xE01EF}, -} - -var doublewidth = table{ - {0x1100, 0x115F}, {0x231A, 0x231B}, {0x2329, 0x232A}, - {0x23E9, 0x23EC}, {0x23F0, 0x23F0}, {0x23F3, 0x23F3}, - {0x25FD, 0x25FE}, {0x2614, 0x2615}, {0x2648, 0x2653}, - {0x267F, 0x267F}, {0x2693, 0x2693}, {0x26A1, 0x26A1}, - {0x26AA, 0x26AB}, {0x26BD, 0x26BE}, {0x26C4, 0x26C5}, - {0x26CE, 0x26CE}, {0x26D4, 0x26D4}, {0x26EA, 0x26EA}, - {0x26F2, 0x26F3}, {0x26F5, 0x26F5}, {0x26FA, 0x26FA}, - {0x26FD, 0x26FD}, {0x2705, 0x2705}, {0x270A, 0x270B}, - {0x2728, 0x2728}, {0x274C, 0x274C}, {0x274E, 0x274E}, - {0x2753, 0x2755}, {0x2757, 0x2757}, {0x2795, 0x2797}, - {0x27B0, 0x27B0}, {0x27BF, 0x27BF}, {0x2B1B, 0x2B1C}, - {0x2B50, 0x2B50}, {0x2B55, 0x2B55}, {0x2E80, 0x2E99}, - {0x2E9B, 0x2EF3}, {0x2F00, 0x2FD5}, {0x2FF0, 0x2FFB}, - {0x3000, 0x303E}, {0x3041, 0x3096}, {0x3099, 0x30FF}, - {0x3105, 0x312D}, {0x3131, 0x318E}, {0x3190, 0x31BA}, - {0x31C0, 0x31E3}, {0x31F0, 0x321E}, {0x3220, 0x3247}, - {0x3250, 0x32FE}, {0x3300, 0x4DBF}, {0x4E00, 0xA48C}, - {0xA490, 0xA4C6}, {0xA960, 0xA97C}, {0xAC00, 0xD7A3}, - {0xF900, 0xFAFF}, {0xFE10, 0xFE19}, {0xFE30, 0xFE52}, - {0xFE54, 0xFE66}, {0xFE68, 0xFE6B}, {0xFF01, 0xFF60}, - {0xFFE0, 0xFFE6}, {0x16FE0, 0x16FE0}, {0x17000, 0x187EC}, - {0x18800, 0x18AF2}, {0x1B000, 0x1B001}, {0x1F004, 0x1F004}, - {0x1F0CF, 0x1F0CF}, {0x1F18E, 0x1F18E}, {0x1F191, 0x1F19A}, - {0x1F200, 0x1F202}, {0x1F210, 0x1F23B}, {0x1F240, 0x1F248}, - {0x1F250, 0x1F251}, {0x1F300, 0x1F320}, {0x1F32D, 0x1F335}, - {0x1F337, 0x1F37C}, {0x1F37E, 0x1F393}, {0x1F3A0, 0x1F3CA}, - {0x1F3CF, 0x1F3D3}, {0x1F3E0, 0x1F3F0}, {0x1F3F4, 0x1F3F4}, - {0x1F3F8, 0x1F43E}, {0x1F440, 0x1F440}, {0x1F442, 0x1F4FC}, - {0x1F4FF, 0x1F53D}, {0x1F54B, 0x1F54E}, {0x1F550, 0x1F567}, - {0x1F57A, 0x1F57A}, {0x1F595, 0x1F596}, {0x1F5A4, 0x1F5A4}, - {0x1F5FB, 0x1F64F}, {0x1F680, 0x1F6C5}, {0x1F6CC, 0x1F6CC}, - {0x1F6D0, 0x1F6D2}, {0x1F6EB, 0x1F6EC}, {0x1F6F4, 0x1F6F6}, - {0x1F910, 0x1F91E}, {0x1F920, 0x1F927}, {0x1F930, 0x1F930}, - {0x1F933, 0x1F93E}, {0x1F940, 0x1F94B}, {0x1F950, 0x1F95E}, - {0x1F980, 0x1F991}, {0x1F9C0, 0x1F9C0}, {0x20000, 0x2FFFD}, - {0x30000, 0x3FFFD}, -} - -var ambiguous = table{ - {0x00A1, 0x00A1}, {0x00A4, 0x00A4}, {0x00A7, 0x00A8}, - {0x00AA, 0x00AA}, {0x00AD, 0x00AE}, {0x00B0, 0x00B4}, - {0x00B6, 0x00BA}, {0x00BC, 0x00BF}, {0x00C6, 0x00C6}, - {0x00D0, 0x00D0}, {0x00D7, 0x00D8}, {0x00DE, 0x00E1}, - {0x00E6, 0x00E6}, {0x00E8, 0x00EA}, {0x00EC, 0x00ED}, - {0x00F0, 0x00F0}, {0x00F2, 0x00F3}, {0x00F7, 0x00FA}, - {0x00FC, 0x00FC}, {0x00FE, 0x00FE}, {0x0101, 0x0101}, - {0x0111, 0x0111}, {0x0113, 0x0113}, {0x011B, 0x011B}, - {0x0126, 0x0127}, {0x012B, 0x012B}, {0x0131, 0x0133}, - {0x0138, 0x0138}, {0x013F, 0x0142}, {0x0144, 0x0144}, - {0x0148, 0x014B}, {0x014D, 0x014D}, {0x0152, 0x0153}, - {0x0166, 0x0167}, {0x016B, 0x016B}, {0x01CE, 0x01CE}, - {0x01D0, 0x01D0}, {0x01D2, 0x01D2}, {0x01D4, 0x01D4}, - {0x01D6, 0x01D6}, {0x01D8, 0x01D8}, {0x01DA, 0x01DA}, - {0x01DC, 0x01DC}, {0x0251, 0x0251}, {0x0261, 0x0261}, - {0x02C4, 0x02C4}, {0x02C7, 0x02C7}, {0x02C9, 0x02CB}, - {0x02CD, 0x02CD}, {0x02D0, 0x02D0}, {0x02D8, 0x02DB}, - {0x02DD, 0x02DD}, {0x02DF, 0x02DF}, {0x0300, 0x036F}, - {0x0391, 0x03A1}, {0x03A3, 0x03A9}, {0x03B1, 0x03C1}, - {0x03C3, 0x03C9}, {0x0401, 0x0401}, {0x0410, 0x044F}, - {0x0451, 0x0451}, {0x2010, 0x2010}, {0x2013, 0x2016}, - {0x2018, 0x2019}, {0x201C, 0x201D}, {0x2020, 0x2022}, - {0x2024, 0x2027}, {0x2030, 0x2030}, {0x2032, 0x2033}, - {0x2035, 0x2035}, {0x203B, 0x203B}, {0x203E, 0x203E}, - {0x2074, 0x2074}, {0x207F, 0x207F}, {0x2081, 0x2084}, - {0x20AC, 0x20AC}, {0x2103, 0x2103}, {0x2105, 0x2105}, - {0x2109, 0x2109}, {0x2113, 0x2113}, {0x2116, 0x2116}, - {0x2121, 0x2122}, {0x2126, 0x2126}, {0x212B, 0x212B}, - {0x2153, 0x2154}, {0x215B, 0x215E}, {0x2160, 0x216B}, - {0x2170, 0x2179}, {0x2189, 0x2189}, {0x2190, 0x2199}, - {0x21B8, 0x21B9}, {0x21D2, 0x21D2}, {0x21D4, 0x21D4}, - {0x21E7, 0x21E7}, {0x2200, 0x2200}, {0x2202, 0x2203}, - {0x2207, 0x2208}, {0x220B, 0x220B}, {0x220F, 0x220F}, - {0x2211, 0x2211}, {0x2215, 0x2215}, {0x221A, 0x221A}, - {0x221D, 0x2220}, {0x2223, 0x2223}, {0x2225, 0x2225}, - {0x2227, 0x222C}, {0x222E, 0x222E}, {0x2234, 0x2237}, - {0x223C, 0x223D}, {0x2248, 0x2248}, {0x224C, 0x224C}, - {0x2252, 0x2252}, {0x2260, 0x2261}, {0x2264, 0x2267}, - {0x226A, 0x226B}, {0x226E, 0x226F}, {0x2282, 0x2283}, - {0x2286, 0x2287}, {0x2295, 0x2295}, {0x2299, 0x2299}, - {0x22A5, 0x22A5}, {0x22BF, 0x22BF}, {0x2312, 0x2312}, - {0x2460, 0x24E9}, {0x24EB, 0x254B}, {0x2550, 0x2573}, - {0x2580, 0x258F}, {0x2592, 0x2595}, {0x25A0, 0x25A1}, - {0x25A3, 0x25A9}, {0x25B2, 0x25B3}, {0x25B6, 0x25B7}, - {0x25BC, 0x25BD}, {0x25C0, 0x25C1}, {0x25C6, 0x25C8}, - {0x25CB, 0x25CB}, {0x25CE, 0x25D1}, {0x25E2, 0x25E5}, - {0x25EF, 0x25EF}, {0x2605, 0x2606}, {0x2609, 0x2609}, - {0x260E, 0x260F}, {0x261C, 0x261C}, {0x261E, 0x261E}, - {0x2640, 0x2640}, {0x2642, 0x2642}, {0x2660, 0x2661}, - {0x2663, 0x2665}, {0x2667, 0x266A}, {0x266C, 0x266D}, - {0x266F, 0x266F}, {0x269E, 0x269F}, {0x26BF, 0x26BF}, - {0x26C6, 0x26CD}, {0x26CF, 0x26D3}, {0x26D5, 0x26E1}, - {0x26E3, 0x26E3}, {0x26E8, 0x26E9}, {0x26EB, 0x26F1}, - {0x26F4, 0x26F4}, {0x26F6, 0x26F9}, {0x26FB, 0x26FC}, - {0x26FE, 0x26FF}, {0x273D, 0x273D}, {0x2776, 0x277F}, - {0x2B56, 0x2B59}, {0x3248, 0x324F}, {0xE000, 0xF8FF}, - {0xFE00, 0xFE0F}, {0xFFFD, 0xFFFD}, {0x1F100, 0x1F10A}, - {0x1F110, 0x1F12D}, {0x1F130, 0x1F169}, {0x1F170, 0x1F18D}, - {0x1F18F, 0x1F190}, {0x1F19B, 0x1F1AC}, {0xE0100, 0xE01EF}, - {0xF0000, 0xFFFFD}, {0x100000, 0x10FFFD}, -} - -var emoji = table{ - {0x1F1E6, 0x1F1FF}, {0x1F321, 0x1F321}, {0x1F324, 0x1F32C}, - {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, {0x1F396, 0x1F397}, - {0x1F399, 0x1F39B}, {0x1F39E, 0x1F39F}, {0x1F3CB, 0x1F3CE}, - {0x1F3D4, 0x1F3DF}, {0x1F3F3, 0x1F3F5}, {0x1F3F7, 0x1F3F7}, - {0x1F43F, 0x1F43F}, {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FD}, - {0x1F549, 0x1F54A}, {0x1F56F, 0x1F570}, {0x1F573, 0x1F579}, - {0x1F587, 0x1F587}, {0x1F58A, 0x1F58D}, {0x1F590, 0x1F590}, - {0x1F5A5, 0x1F5A5}, {0x1F5A8, 0x1F5A8}, {0x1F5B1, 0x1F5B2}, - {0x1F5BC, 0x1F5BC}, {0x1F5C2, 0x1F5C4}, {0x1F5D1, 0x1F5D3}, - {0x1F5DC, 0x1F5DE}, {0x1F5E1, 0x1F5E1}, {0x1F5E3, 0x1F5E3}, - {0x1F5E8, 0x1F5E8}, {0x1F5EF, 0x1F5EF}, {0x1F5F3, 0x1F5F3}, - {0x1F5FA, 0x1F5FA}, {0x1F6CB, 0x1F6CF}, {0x1F6E0, 0x1F6E5}, - {0x1F6E9, 0x1F6E9}, {0x1F6F0, 0x1F6F0}, {0x1F6F3, 0x1F6F3}, -} - -var notassigned = table{ - {0x0378, 0x0379}, {0x0380, 0x0383}, {0x038B, 0x038B}, - {0x038D, 0x038D}, {0x03A2, 0x03A2}, {0x0530, 0x0530}, - {0x0557, 0x0558}, {0x0560, 0x0560}, {0x0588, 0x0588}, - {0x058B, 0x058C}, {0x0590, 0x0590}, {0x05C8, 0x05CF}, - {0x05EB, 0x05EF}, {0x05F5, 0x05FF}, {0x061D, 0x061D}, - {0x070E, 0x070E}, {0x074B, 0x074C}, {0x07B2, 0x07BF}, - {0x07FB, 0x07FF}, {0x082E, 0x082F}, {0x083F, 0x083F}, - {0x085C, 0x085D}, {0x085F, 0x089F}, {0x08B5, 0x08B5}, - {0x08BE, 0x08D3}, {0x0984, 0x0984}, {0x098D, 0x098E}, - {0x0991, 0x0992}, {0x09A9, 0x09A9}, {0x09B1, 0x09B1}, - {0x09B3, 0x09B5}, {0x09BA, 0x09BB}, {0x09C5, 0x09C6}, - {0x09C9, 0x09CA}, {0x09CF, 0x09D6}, {0x09D8, 0x09DB}, - {0x09DE, 0x09DE}, {0x09E4, 0x09E5}, {0x09FC, 0x0A00}, - {0x0A04, 0x0A04}, {0x0A0B, 0x0A0E}, {0x0A11, 0x0A12}, - {0x0A29, 0x0A29}, {0x0A31, 0x0A31}, {0x0A34, 0x0A34}, - {0x0A37, 0x0A37}, {0x0A3A, 0x0A3B}, {0x0A3D, 0x0A3D}, - {0x0A43, 0x0A46}, {0x0A49, 0x0A4A}, {0x0A4E, 0x0A50}, - {0x0A52, 0x0A58}, {0x0A5D, 0x0A5D}, {0x0A5F, 0x0A65}, - {0x0A76, 0x0A80}, {0x0A84, 0x0A84}, {0x0A8E, 0x0A8E}, - {0x0A92, 0x0A92}, {0x0AA9, 0x0AA9}, {0x0AB1, 0x0AB1}, - {0x0AB4, 0x0AB4}, {0x0ABA, 0x0ABB}, {0x0AC6, 0x0AC6}, - {0x0ACA, 0x0ACA}, {0x0ACE, 0x0ACF}, {0x0AD1, 0x0ADF}, - {0x0AE4, 0x0AE5}, {0x0AF2, 0x0AF8}, {0x0AFA, 0x0B00}, - {0x0B04, 0x0B04}, {0x0B0D, 0x0B0E}, {0x0B11, 0x0B12}, - {0x0B29, 0x0B29}, {0x0B31, 0x0B31}, {0x0B34, 0x0B34}, - {0x0B3A, 0x0B3B}, {0x0B45, 0x0B46}, {0x0B49, 0x0B4A}, - {0x0B4E, 0x0B55}, {0x0B58, 0x0B5B}, {0x0B5E, 0x0B5E}, - {0x0B64, 0x0B65}, {0x0B78, 0x0B81}, {0x0B84, 0x0B84}, - {0x0B8B, 0x0B8D}, {0x0B91, 0x0B91}, {0x0B96, 0x0B98}, - {0x0B9B, 0x0B9B}, {0x0B9D, 0x0B9D}, {0x0BA0, 0x0BA2}, - {0x0BA5, 0x0BA7}, {0x0BAB, 0x0BAD}, {0x0BBA, 0x0BBD}, - {0x0BC3, 0x0BC5}, {0x0BC9, 0x0BC9}, {0x0BCE, 0x0BCF}, - {0x0BD1, 0x0BD6}, {0x0BD8, 0x0BE5}, {0x0BFB, 0x0BFF}, - {0x0C04, 0x0C04}, {0x0C0D, 0x0C0D}, {0x0C11, 0x0C11}, - {0x0C29, 0x0C29}, {0x0C3A, 0x0C3C}, {0x0C45, 0x0C45}, - {0x0C49, 0x0C49}, {0x0C4E, 0x0C54}, {0x0C57, 0x0C57}, - {0x0C5B, 0x0C5F}, {0x0C64, 0x0C65}, {0x0C70, 0x0C77}, - {0x0C84, 0x0C84}, {0x0C8D, 0x0C8D}, {0x0C91, 0x0C91}, - {0x0CA9, 0x0CA9}, {0x0CB4, 0x0CB4}, {0x0CBA, 0x0CBB}, - {0x0CC5, 0x0CC5}, {0x0CC9, 0x0CC9}, {0x0CCE, 0x0CD4}, - {0x0CD7, 0x0CDD}, {0x0CDF, 0x0CDF}, {0x0CE4, 0x0CE5}, - {0x0CF0, 0x0CF0}, {0x0CF3, 0x0D00}, {0x0D04, 0x0D04}, - {0x0D0D, 0x0D0D}, {0x0D11, 0x0D11}, {0x0D3B, 0x0D3C}, - {0x0D45, 0x0D45}, {0x0D49, 0x0D49}, {0x0D50, 0x0D53}, - {0x0D64, 0x0D65}, {0x0D80, 0x0D81}, {0x0D84, 0x0D84}, - {0x0D97, 0x0D99}, {0x0DB2, 0x0DB2}, {0x0DBC, 0x0DBC}, - {0x0DBE, 0x0DBF}, {0x0DC7, 0x0DC9}, {0x0DCB, 0x0DCE}, - {0x0DD5, 0x0DD5}, {0x0DD7, 0x0DD7}, {0x0DE0, 0x0DE5}, - {0x0DF0, 0x0DF1}, {0x0DF5, 0x0E00}, {0x0E3B, 0x0E3E}, - {0x0E5C, 0x0E80}, {0x0E83, 0x0E83}, {0x0E85, 0x0E86}, - {0x0E89, 0x0E89}, {0x0E8B, 0x0E8C}, {0x0E8E, 0x0E93}, - {0x0E98, 0x0E98}, {0x0EA0, 0x0EA0}, {0x0EA4, 0x0EA4}, - {0x0EA6, 0x0EA6}, {0x0EA8, 0x0EA9}, {0x0EAC, 0x0EAC}, - {0x0EBA, 0x0EBA}, {0x0EBE, 0x0EBF}, {0x0EC5, 0x0EC5}, - {0x0EC7, 0x0EC7}, {0x0ECE, 0x0ECF}, {0x0EDA, 0x0EDB}, - {0x0EE0, 0x0EFF}, {0x0F48, 0x0F48}, {0x0F6D, 0x0F70}, - {0x0F98, 0x0F98}, {0x0FBD, 0x0FBD}, {0x0FCD, 0x0FCD}, - {0x0FDB, 0x0FFF}, {0x10C6, 0x10C6}, {0x10C8, 0x10CC}, - {0x10CE, 0x10CF}, {0x1249, 0x1249}, {0x124E, 0x124F}, - {0x1257, 0x1257}, {0x1259, 0x1259}, {0x125E, 0x125F}, - {0x1289, 0x1289}, {0x128E, 0x128F}, {0x12B1, 0x12B1}, - {0x12B6, 0x12B7}, {0x12BF, 0x12BF}, {0x12C1, 0x12C1}, - {0x12C6, 0x12C7}, {0x12D7, 0x12D7}, {0x1311, 0x1311}, - {0x1316, 0x1317}, {0x135B, 0x135C}, {0x137D, 0x137F}, - {0x139A, 0x139F}, {0x13F6, 0x13F7}, {0x13FE, 0x13FF}, - {0x169D, 0x169F}, {0x16F9, 0x16FF}, {0x170D, 0x170D}, - {0x1715, 0x171F}, {0x1737, 0x173F}, {0x1754, 0x175F}, - {0x176D, 0x176D}, {0x1771, 0x1771}, {0x1774, 0x177F}, - {0x17DE, 0x17DF}, {0x17EA, 0x17EF}, {0x17FA, 0x17FF}, - {0x180F, 0x180F}, {0x181A, 0x181F}, {0x1878, 0x187F}, - {0x18AB, 0x18AF}, {0x18F6, 0x18FF}, {0x191F, 0x191F}, - {0x192C, 0x192F}, {0x193C, 0x193F}, {0x1941, 0x1943}, - {0x196E, 0x196F}, {0x1975, 0x197F}, {0x19AC, 0x19AF}, - {0x19CA, 0x19CF}, {0x19DB, 0x19DD}, {0x1A1C, 0x1A1D}, - {0x1A5F, 0x1A5F}, {0x1A7D, 0x1A7E}, {0x1A8A, 0x1A8F}, - {0x1A9A, 0x1A9F}, {0x1AAE, 0x1AAF}, {0x1ABF, 0x1AFF}, - {0x1B4C, 0x1B4F}, {0x1B7D, 0x1B7F}, {0x1BF4, 0x1BFB}, - {0x1C38, 0x1C3A}, {0x1C4A, 0x1C4C}, {0x1C89, 0x1CBF}, - {0x1CC8, 0x1CCF}, {0x1CF7, 0x1CF7}, {0x1CFA, 0x1CFF}, - {0x1DF6, 0x1DFA}, {0x1F16, 0x1F17}, {0x1F1E, 0x1F1F}, - {0x1F46, 0x1F47}, {0x1F4E, 0x1F4F}, {0x1F58, 0x1F58}, - {0x1F5A, 0x1F5A}, {0x1F5C, 0x1F5C}, {0x1F5E, 0x1F5E}, - {0x1F7E, 0x1F7F}, {0x1FB5, 0x1FB5}, {0x1FC5, 0x1FC5}, - {0x1FD4, 0x1FD5}, {0x1FDC, 0x1FDC}, {0x1FF0, 0x1FF1}, - {0x1FF5, 0x1FF5}, {0x1FFF, 0x1FFF}, {0x2065, 0x2065}, - {0x2072, 0x2073}, {0x208F, 0x208F}, {0x209D, 0x209F}, - {0x20BF, 0x20CF}, {0x20F1, 0x20FF}, {0x218C, 0x218F}, - {0x23FF, 0x23FF}, {0x2427, 0x243F}, {0x244B, 0x245F}, - {0x2B74, 0x2B75}, {0x2B96, 0x2B97}, {0x2BBA, 0x2BBC}, - {0x2BC9, 0x2BC9}, {0x2BD2, 0x2BEB}, {0x2BF0, 0x2BFF}, - {0x2C2F, 0x2C2F}, {0x2C5F, 0x2C5F}, {0x2CF4, 0x2CF8}, - {0x2D26, 0x2D26}, {0x2D28, 0x2D2C}, {0x2D2E, 0x2D2F}, - {0x2D68, 0x2D6E}, {0x2D71, 0x2D7E}, {0x2D97, 0x2D9F}, - {0x2DA7, 0x2DA7}, {0x2DAF, 0x2DAF}, {0x2DB7, 0x2DB7}, - {0x2DBF, 0x2DBF}, {0x2DC7, 0x2DC7}, {0x2DCF, 0x2DCF}, - {0x2DD7, 0x2DD7}, {0x2DDF, 0x2DDF}, {0x2E45, 0x2E7F}, - {0x2E9A, 0x2E9A}, {0x2EF4, 0x2EFF}, {0x2FD6, 0x2FEF}, - {0x2FFC, 0x2FFF}, {0x3040, 0x3040}, {0x3097, 0x3098}, - {0x3100, 0x3104}, {0x312E, 0x3130}, {0x318F, 0x318F}, - {0x31BB, 0x31BF}, {0x31E4, 0x31EF}, {0x321F, 0x321F}, - {0x32FF, 0x32FF}, {0x4DB6, 0x4DBF}, {0x9FD6, 0x9FFF}, - {0xA48D, 0xA48F}, {0xA4C7, 0xA4CF}, {0xA62C, 0xA63F}, - {0xA6F8, 0xA6FF}, {0xA7AF, 0xA7AF}, {0xA7B8, 0xA7F6}, - {0xA82C, 0xA82F}, {0xA83A, 0xA83F}, {0xA878, 0xA87F}, - {0xA8C6, 0xA8CD}, {0xA8DA, 0xA8DF}, {0xA8FE, 0xA8FF}, - {0xA954, 0xA95E}, {0xA97D, 0xA97F}, {0xA9CE, 0xA9CE}, - {0xA9DA, 0xA9DD}, {0xA9FF, 0xA9FF}, {0xAA37, 0xAA3F}, - {0xAA4E, 0xAA4F}, {0xAA5A, 0xAA5B}, {0xAAC3, 0xAADA}, - {0xAAF7, 0xAB00}, {0xAB07, 0xAB08}, {0xAB0F, 0xAB10}, - {0xAB17, 0xAB1F}, {0xAB27, 0xAB27}, {0xAB2F, 0xAB2F}, - {0xAB66, 0xAB6F}, {0xABEE, 0xABEF}, {0xABFA, 0xABFF}, - {0xD7A4, 0xD7AF}, {0xD7C7, 0xD7CA}, {0xD7FC, 0xD7FF}, - {0xFA6E, 0xFA6F}, {0xFADA, 0xFAFF}, {0xFB07, 0xFB12}, - {0xFB18, 0xFB1C}, {0xFB37, 0xFB37}, {0xFB3D, 0xFB3D}, - {0xFB3F, 0xFB3F}, {0xFB42, 0xFB42}, {0xFB45, 0xFB45}, - {0xFBC2, 0xFBD2}, {0xFD40, 0xFD4F}, {0xFD90, 0xFD91}, - {0xFDC8, 0xFDEF}, {0xFDFE, 0xFDFF}, {0xFE1A, 0xFE1F}, - {0xFE53, 0xFE53}, {0xFE67, 0xFE67}, {0xFE6C, 0xFE6F}, - {0xFE75, 0xFE75}, {0xFEFD, 0xFEFE}, {0xFF00, 0xFF00}, - {0xFFBF, 0xFFC1}, {0xFFC8, 0xFFC9}, {0xFFD0, 0xFFD1}, - {0xFFD8, 0xFFD9}, {0xFFDD, 0xFFDF}, {0xFFE7, 0xFFE7}, - {0xFFEF, 0xFFF8}, {0xFFFE, 0xFFFF}, {0x1000C, 0x1000C}, - {0x10027, 0x10027}, {0x1003B, 0x1003B}, {0x1003E, 0x1003E}, - {0x1004E, 0x1004F}, {0x1005E, 0x1007F}, {0x100FB, 0x100FF}, - {0x10103, 0x10106}, {0x10134, 0x10136}, {0x1018F, 0x1018F}, - {0x1019C, 0x1019F}, {0x101A1, 0x101CF}, {0x101FE, 0x1027F}, - {0x1029D, 0x1029F}, {0x102D1, 0x102DF}, {0x102FC, 0x102FF}, - {0x10324, 0x1032F}, {0x1034B, 0x1034F}, {0x1037B, 0x1037F}, - {0x1039E, 0x1039E}, {0x103C4, 0x103C7}, {0x103D6, 0x103FF}, - {0x1049E, 0x1049F}, {0x104AA, 0x104AF}, {0x104D4, 0x104D7}, - {0x104FC, 0x104FF}, {0x10528, 0x1052F}, {0x10564, 0x1056E}, - {0x10570, 0x105FF}, {0x10737, 0x1073F}, {0x10756, 0x1075F}, - {0x10768, 0x107FF}, {0x10806, 0x10807}, {0x10809, 0x10809}, - {0x10836, 0x10836}, {0x10839, 0x1083B}, {0x1083D, 0x1083E}, - {0x10856, 0x10856}, {0x1089F, 0x108A6}, {0x108B0, 0x108DF}, - {0x108F3, 0x108F3}, {0x108F6, 0x108FA}, {0x1091C, 0x1091E}, - {0x1093A, 0x1093E}, {0x10940, 0x1097F}, {0x109B8, 0x109BB}, - {0x109D0, 0x109D1}, {0x10A04, 0x10A04}, {0x10A07, 0x10A0B}, - {0x10A14, 0x10A14}, {0x10A18, 0x10A18}, {0x10A34, 0x10A37}, - {0x10A3B, 0x10A3E}, {0x10A48, 0x10A4F}, {0x10A59, 0x10A5F}, - {0x10AA0, 0x10ABF}, {0x10AE7, 0x10AEA}, {0x10AF7, 0x10AFF}, - {0x10B36, 0x10B38}, {0x10B56, 0x10B57}, {0x10B73, 0x10B77}, - {0x10B92, 0x10B98}, {0x10B9D, 0x10BA8}, {0x10BB0, 0x10BFF}, - {0x10C49, 0x10C7F}, {0x10CB3, 0x10CBF}, {0x10CF3, 0x10CF9}, - {0x10D00, 0x10E5F}, {0x10E7F, 0x10FFF}, {0x1104E, 0x11051}, - {0x11070, 0x1107E}, {0x110C2, 0x110CF}, {0x110E9, 0x110EF}, - {0x110FA, 0x110FF}, {0x11135, 0x11135}, {0x11144, 0x1114F}, - {0x11177, 0x1117F}, {0x111CE, 0x111CF}, {0x111E0, 0x111E0}, - {0x111F5, 0x111FF}, {0x11212, 0x11212}, {0x1123F, 0x1127F}, - {0x11287, 0x11287}, {0x11289, 0x11289}, {0x1128E, 0x1128E}, - {0x1129E, 0x1129E}, {0x112AA, 0x112AF}, {0x112EB, 0x112EF}, - {0x112FA, 0x112FF}, {0x11304, 0x11304}, {0x1130D, 0x1130E}, - {0x11311, 0x11312}, {0x11329, 0x11329}, {0x11331, 0x11331}, - {0x11334, 0x11334}, {0x1133A, 0x1133B}, {0x11345, 0x11346}, - {0x11349, 0x1134A}, {0x1134E, 0x1134F}, {0x11351, 0x11356}, - {0x11358, 0x1135C}, {0x11364, 0x11365}, {0x1136D, 0x1136F}, - {0x11375, 0x113FF}, {0x1145A, 0x1145A}, {0x1145C, 0x1145C}, - {0x1145E, 0x1147F}, {0x114C8, 0x114CF}, {0x114DA, 0x1157F}, - {0x115B6, 0x115B7}, {0x115DE, 0x115FF}, {0x11645, 0x1164F}, - {0x1165A, 0x1165F}, {0x1166D, 0x1167F}, {0x116B8, 0x116BF}, - {0x116CA, 0x116FF}, {0x1171A, 0x1171C}, {0x1172C, 0x1172F}, - {0x11740, 0x1189F}, {0x118F3, 0x118FE}, {0x11900, 0x11ABF}, - {0x11AF9, 0x11BFF}, {0x11C09, 0x11C09}, {0x11C37, 0x11C37}, - {0x11C46, 0x11C4F}, {0x11C6D, 0x11C6F}, {0x11C90, 0x11C91}, - {0x11CA8, 0x11CA8}, {0x11CB7, 0x11FFF}, {0x1239A, 0x123FF}, - {0x1246F, 0x1246F}, {0x12475, 0x1247F}, {0x12544, 0x12FFF}, - {0x1342F, 0x143FF}, {0x14647, 0x167FF}, {0x16A39, 0x16A3F}, - {0x16A5F, 0x16A5F}, {0x16A6A, 0x16A6D}, {0x16A70, 0x16ACF}, - {0x16AEE, 0x16AEF}, {0x16AF6, 0x16AFF}, {0x16B46, 0x16B4F}, - {0x16B5A, 0x16B5A}, {0x16B62, 0x16B62}, {0x16B78, 0x16B7C}, - {0x16B90, 0x16EFF}, {0x16F45, 0x16F4F}, {0x16F7F, 0x16F8E}, - {0x16FA0, 0x16FDF}, {0x16FE1, 0x16FFF}, {0x187ED, 0x187FF}, - {0x18AF3, 0x1AFFF}, {0x1B002, 0x1BBFF}, {0x1BC6B, 0x1BC6F}, - {0x1BC7D, 0x1BC7F}, {0x1BC89, 0x1BC8F}, {0x1BC9A, 0x1BC9B}, - {0x1BCA4, 0x1CFFF}, {0x1D0F6, 0x1D0FF}, {0x1D127, 0x1D128}, - {0x1D1E9, 0x1D1FF}, {0x1D246, 0x1D2FF}, {0x1D357, 0x1D35F}, - {0x1D372, 0x1D3FF}, {0x1D455, 0x1D455}, {0x1D49D, 0x1D49D}, - {0x1D4A0, 0x1D4A1}, {0x1D4A3, 0x1D4A4}, {0x1D4A7, 0x1D4A8}, - {0x1D4AD, 0x1D4AD}, {0x1D4BA, 0x1D4BA}, {0x1D4BC, 0x1D4BC}, - {0x1D4C4, 0x1D4C4}, {0x1D506, 0x1D506}, {0x1D50B, 0x1D50C}, - {0x1D515, 0x1D515}, {0x1D51D, 0x1D51D}, {0x1D53A, 0x1D53A}, - {0x1D53F, 0x1D53F}, {0x1D545, 0x1D545}, {0x1D547, 0x1D549}, - {0x1D551, 0x1D551}, {0x1D6A6, 0x1D6A7}, {0x1D7CC, 0x1D7CD}, - {0x1DA8C, 0x1DA9A}, {0x1DAA0, 0x1DAA0}, {0x1DAB0, 0x1DFFF}, - {0x1E007, 0x1E007}, {0x1E019, 0x1E01A}, {0x1E022, 0x1E022}, - {0x1E025, 0x1E025}, {0x1E02B, 0x1E7FF}, {0x1E8C5, 0x1E8C6}, - {0x1E8D7, 0x1E8FF}, {0x1E94B, 0x1E94F}, {0x1E95A, 0x1E95D}, - {0x1E960, 0x1EDFF}, {0x1EE04, 0x1EE04}, {0x1EE20, 0x1EE20}, - {0x1EE23, 0x1EE23}, {0x1EE25, 0x1EE26}, {0x1EE28, 0x1EE28}, - {0x1EE33, 0x1EE33}, {0x1EE38, 0x1EE38}, {0x1EE3A, 0x1EE3A}, - {0x1EE3C, 0x1EE41}, {0x1EE43, 0x1EE46}, {0x1EE48, 0x1EE48}, - {0x1EE4A, 0x1EE4A}, {0x1EE4C, 0x1EE4C}, {0x1EE50, 0x1EE50}, - {0x1EE53, 0x1EE53}, {0x1EE55, 0x1EE56}, {0x1EE58, 0x1EE58}, - {0x1EE5A, 0x1EE5A}, {0x1EE5C, 0x1EE5C}, {0x1EE5E, 0x1EE5E}, - {0x1EE60, 0x1EE60}, {0x1EE63, 0x1EE63}, {0x1EE65, 0x1EE66}, - {0x1EE6B, 0x1EE6B}, {0x1EE73, 0x1EE73}, {0x1EE78, 0x1EE78}, - {0x1EE7D, 0x1EE7D}, {0x1EE7F, 0x1EE7F}, {0x1EE8A, 0x1EE8A}, - {0x1EE9C, 0x1EEA0}, {0x1EEA4, 0x1EEA4}, {0x1EEAA, 0x1EEAA}, - {0x1EEBC, 0x1EEEF}, {0x1EEF2, 0x1EFFF}, {0x1F02C, 0x1F02F}, - {0x1F094, 0x1F09F}, {0x1F0AF, 0x1F0B0}, {0x1F0C0, 0x1F0C0}, - {0x1F0D0, 0x1F0D0}, {0x1F0F6, 0x1F0FF}, {0x1F10D, 0x1F10F}, - {0x1F12F, 0x1F12F}, {0x1F16C, 0x1F16F}, {0x1F1AD, 0x1F1E5}, - {0x1F203, 0x1F20F}, {0x1F23C, 0x1F23F}, {0x1F249, 0x1F24F}, - {0x1F252, 0x1F2FF}, {0x1F6D3, 0x1F6DF}, {0x1F6ED, 0x1F6EF}, - {0x1F6F7, 0x1F6FF}, {0x1F774, 0x1F77F}, {0x1F7D5, 0x1F7FF}, - {0x1F80C, 0x1F80F}, {0x1F848, 0x1F84F}, {0x1F85A, 0x1F85F}, - {0x1F888, 0x1F88F}, {0x1F8AE, 0x1F90F}, {0x1F91F, 0x1F91F}, - {0x1F928, 0x1F92F}, {0x1F931, 0x1F932}, {0x1F93F, 0x1F93F}, - {0x1F94C, 0x1F94F}, {0x1F95F, 0x1F97F}, {0x1F992, 0x1F9BF}, - {0x1F9C1, 0x1FFFF}, {0x2A6D7, 0x2A6FF}, {0x2B735, 0x2B73F}, - {0x2B81E, 0x2B81F}, {0x2CEA2, 0x2F7FF}, {0x2FA1E, 0xE0000}, - {0xE0002, 0xE001F}, {0xE0080, 0xE00FF}, {0xE01F0, 0xEFFFF}, - {0xFFFFE, 0xFFFFF}, -} - -var neutral = table{ - {0x0000, 0x001F}, {0x007F, 0x007F}, {0x0080, 0x009F}, - {0x00A0, 0x00A0}, {0x00A9, 0x00A9}, {0x00AB, 0x00AB}, - {0x00B5, 0x00B5}, {0x00BB, 0x00BB}, {0x00C0, 0x00C5}, - {0x00C7, 0x00CF}, {0x00D1, 0x00D6}, {0x00D9, 0x00DD}, - {0x00E2, 0x00E5}, {0x00E7, 0x00E7}, {0x00EB, 0x00EB}, - {0x00EE, 0x00EF}, {0x00F1, 0x00F1}, {0x00F4, 0x00F6}, - {0x00FB, 0x00FB}, {0x00FD, 0x00FD}, {0x00FF, 0x00FF}, - {0x0100, 0x0100}, {0x0102, 0x0110}, {0x0112, 0x0112}, - {0x0114, 0x011A}, {0x011C, 0x0125}, {0x0128, 0x012A}, - {0x012C, 0x0130}, {0x0134, 0x0137}, {0x0139, 0x013E}, - {0x0143, 0x0143}, {0x0145, 0x0147}, {0x014C, 0x014C}, - {0x014E, 0x0151}, {0x0154, 0x0165}, {0x0168, 0x016A}, - {0x016C, 0x017F}, {0x0180, 0x01BA}, {0x01BB, 0x01BB}, - {0x01BC, 0x01BF}, {0x01C0, 0x01C3}, {0x01C4, 0x01CD}, - {0x01CF, 0x01CF}, {0x01D1, 0x01D1}, {0x01D3, 0x01D3}, - {0x01D5, 0x01D5}, {0x01D7, 0x01D7}, {0x01D9, 0x01D9}, - {0x01DB, 0x01DB}, {0x01DD, 0x024F}, {0x0250, 0x0250}, - {0x0252, 0x0260}, {0x0262, 0x0293}, {0x0294, 0x0294}, - {0x0295, 0x02AF}, {0x02B0, 0x02C1}, {0x02C2, 0x02C3}, - {0x02C5, 0x02C5}, {0x02C6, 0x02C6}, {0x02C8, 0x02C8}, - {0x02CC, 0x02CC}, {0x02CE, 0x02CF}, {0x02D1, 0x02D1}, - {0x02D2, 0x02D7}, {0x02DC, 0x02DC}, {0x02DE, 0x02DE}, - {0x02E0, 0x02E4}, {0x02E5, 0x02EB}, {0x02EC, 0x02EC}, - {0x02ED, 0x02ED}, {0x02EE, 0x02EE}, {0x02EF, 0x02FF}, - {0x0370, 0x0373}, {0x0374, 0x0374}, {0x0375, 0x0375}, - {0x0376, 0x0377}, {0x037A, 0x037A}, {0x037B, 0x037D}, - {0x037E, 0x037E}, {0x037F, 0x037F}, {0x0384, 0x0385}, - {0x0386, 0x0386}, {0x0387, 0x0387}, {0x0388, 0x038A}, - {0x038C, 0x038C}, {0x038E, 0x0390}, {0x03AA, 0x03B0}, - {0x03C2, 0x03C2}, {0x03CA, 0x03F5}, {0x03F6, 0x03F6}, - {0x03F7, 0x03FF}, {0x0400, 0x0400}, {0x0402, 0x040F}, - {0x0450, 0x0450}, {0x0452, 0x0481}, {0x0482, 0x0482}, - {0x0483, 0x0487}, {0x0488, 0x0489}, {0x048A, 0x04FF}, - {0x0500, 0x052F}, {0x0531, 0x0556}, {0x0559, 0x0559}, - {0x055A, 0x055F}, {0x0561, 0x0587}, {0x0589, 0x0589}, - {0x058A, 0x058A}, {0x058D, 0x058E}, {0x058F, 0x058F}, - {0x0591, 0x05BD}, {0x05BE, 0x05BE}, {0x05BF, 0x05BF}, - {0x05C0, 0x05C0}, {0x05C1, 0x05C2}, {0x05C3, 0x05C3}, - {0x05C4, 0x05C5}, {0x05C6, 0x05C6}, {0x05C7, 0x05C7}, - {0x05D0, 0x05EA}, {0x05F0, 0x05F2}, {0x05F3, 0x05F4}, - {0x0600, 0x0605}, {0x0606, 0x0608}, {0x0609, 0x060A}, - {0x060B, 0x060B}, {0x060C, 0x060D}, {0x060E, 0x060F}, - {0x0610, 0x061A}, {0x061B, 0x061B}, {0x061C, 0x061C}, - {0x061E, 0x061F}, {0x0620, 0x063F}, {0x0640, 0x0640}, - {0x0641, 0x064A}, {0x064B, 0x065F}, {0x0660, 0x0669}, - {0x066A, 0x066D}, {0x066E, 0x066F}, {0x0670, 0x0670}, - {0x0671, 0x06D3}, {0x06D4, 0x06D4}, {0x06D5, 0x06D5}, - {0x06D6, 0x06DC}, {0x06DD, 0x06DD}, {0x06DE, 0x06DE}, - {0x06DF, 0x06E4}, {0x06E5, 0x06E6}, {0x06E7, 0x06E8}, - {0x06E9, 0x06E9}, {0x06EA, 0x06ED}, {0x06EE, 0x06EF}, - {0x06F0, 0x06F9}, {0x06FA, 0x06FC}, {0x06FD, 0x06FE}, - {0x06FF, 0x06FF}, {0x0700, 0x070D}, {0x070F, 0x070F}, - {0x0710, 0x0710}, {0x0711, 0x0711}, {0x0712, 0x072F}, - {0x0730, 0x074A}, {0x074D, 0x074F}, {0x0750, 0x077F}, - {0x0780, 0x07A5}, {0x07A6, 0x07B0}, {0x07B1, 0x07B1}, - {0x07C0, 0x07C9}, {0x07CA, 0x07EA}, {0x07EB, 0x07F3}, - {0x07F4, 0x07F5}, {0x07F6, 0x07F6}, {0x07F7, 0x07F9}, - {0x07FA, 0x07FA}, {0x0800, 0x0815}, {0x0816, 0x0819}, - {0x081A, 0x081A}, {0x081B, 0x0823}, {0x0824, 0x0824}, - {0x0825, 0x0827}, {0x0828, 0x0828}, {0x0829, 0x082D}, - {0x0830, 0x083E}, {0x0840, 0x0858}, {0x0859, 0x085B}, - {0x085E, 0x085E}, {0x08A0, 0x08B4}, {0x08B6, 0x08BD}, - {0x08D4, 0x08E1}, {0x08E2, 0x08E2}, {0x08E3, 0x08FF}, - {0x0900, 0x0902}, {0x0903, 0x0903}, {0x0904, 0x0939}, - {0x093A, 0x093A}, {0x093B, 0x093B}, {0x093C, 0x093C}, - {0x093D, 0x093D}, {0x093E, 0x0940}, {0x0941, 0x0948}, - {0x0949, 0x094C}, {0x094D, 0x094D}, {0x094E, 0x094F}, - {0x0950, 0x0950}, {0x0951, 0x0957}, {0x0958, 0x0961}, - {0x0962, 0x0963}, {0x0964, 0x0965}, {0x0966, 0x096F}, - {0x0970, 0x0970}, {0x0971, 0x0971}, {0x0972, 0x097F}, - {0x0980, 0x0980}, {0x0981, 0x0981}, {0x0982, 0x0983}, - {0x0985, 0x098C}, {0x098F, 0x0990}, {0x0993, 0x09A8}, - {0x09AA, 0x09B0}, {0x09B2, 0x09B2}, {0x09B6, 0x09B9}, - {0x09BC, 0x09BC}, {0x09BD, 0x09BD}, {0x09BE, 0x09C0}, - {0x09C1, 0x09C4}, {0x09C7, 0x09C8}, {0x09CB, 0x09CC}, - {0x09CD, 0x09CD}, {0x09CE, 0x09CE}, {0x09D7, 0x09D7}, - {0x09DC, 0x09DD}, {0x09DF, 0x09E1}, {0x09E2, 0x09E3}, - {0x09E6, 0x09EF}, {0x09F0, 0x09F1}, {0x09F2, 0x09F3}, - {0x09F4, 0x09F9}, {0x09FA, 0x09FA}, {0x09FB, 0x09FB}, - {0x0A01, 0x0A02}, {0x0A03, 0x0A03}, {0x0A05, 0x0A0A}, - {0x0A0F, 0x0A10}, {0x0A13, 0x0A28}, {0x0A2A, 0x0A30}, - {0x0A32, 0x0A33}, {0x0A35, 0x0A36}, {0x0A38, 0x0A39}, - {0x0A3C, 0x0A3C}, {0x0A3E, 0x0A40}, {0x0A41, 0x0A42}, - {0x0A47, 0x0A48}, {0x0A4B, 0x0A4D}, {0x0A51, 0x0A51}, - {0x0A59, 0x0A5C}, {0x0A5E, 0x0A5E}, {0x0A66, 0x0A6F}, - {0x0A70, 0x0A71}, {0x0A72, 0x0A74}, {0x0A75, 0x0A75}, - {0x0A81, 0x0A82}, {0x0A83, 0x0A83}, {0x0A85, 0x0A8D}, - {0x0A8F, 0x0A91}, {0x0A93, 0x0AA8}, {0x0AAA, 0x0AB0}, - {0x0AB2, 0x0AB3}, {0x0AB5, 0x0AB9}, {0x0ABC, 0x0ABC}, - {0x0ABD, 0x0ABD}, {0x0ABE, 0x0AC0}, {0x0AC1, 0x0AC5}, - {0x0AC7, 0x0AC8}, {0x0AC9, 0x0AC9}, {0x0ACB, 0x0ACC}, - {0x0ACD, 0x0ACD}, {0x0AD0, 0x0AD0}, {0x0AE0, 0x0AE1}, - {0x0AE2, 0x0AE3}, {0x0AE6, 0x0AEF}, {0x0AF0, 0x0AF0}, - {0x0AF1, 0x0AF1}, {0x0AF9, 0x0AF9}, {0x0B01, 0x0B01}, - {0x0B02, 0x0B03}, {0x0B05, 0x0B0C}, {0x0B0F, 0x0B10}, - {0x0B13, 0x0B28}, {0x0B2A, 0x0B30}, {0x0B32, 0x0B33}, - {0x0B35, 0x0B39}, {0x0B3C, 0x0B3C}, {0x0B3D, 0x0B3D}, - {0x0B3E, 0x0B3E}, {0x0B3F, 0x0B3F}, {0x0B40, 0x0B40}, - {0x0B41, 0x0B44}, {0x0B47, 0x0B48}, {0x0B4B, 0x0B4C}, - {0x0B4D, 0x0B4D}, {0x0B56, 0x0B56}, {0x0B57, 0x0B57}, - {0x0B5C, 0x0B5D}, {0x0B5F, 0x0B61}, {0x0B62, 0x0B63}, - {0x0B66, 0x0B6F}, {0x0B70, 0x0B70}, {0x0B71, 0x0B71}, - {0x0B72, 0x0B77}, {0x0B82, 0x0B82}, {0x0B83, 0x0B83}, - {0x0B85, 0x0B8A}, {0x0B8E, 0x0B90}, {0x0B92, 0x0B95}, - {0x0B99, 0x0B9A}, {0x0B9C, 0x0B9C}, {0x0B9E, 0x0B9F}, - {0x0BA3, 0x0BA4}, {0x0BA8, 0x0BAA}, {0x0BAE, 0x0BB9}, - {0x0BBE, 0x0BBF}, {0x0BC0, 0x0BC0}, {0x0BC1, 0x0BC2}, - {0x0BC6, 0x0BC8}, {0x0BCA, 0x0BCC}, {0x0BCD, 0x0BCD}, - {0x0BD0, 0x0BD0}, {0x0BD7, 0x0BD7}, {0x0BE6, 0x0BEF}, - {0x0BF0, 0x0BF2}, {0x0BF3, 0x0BF8}, {0x0BF9, 0x0BF9}, - {0x0BFA, 0x0BFA}, {0x0C00, 0x0C00}, {0x0C01, 0x0C03}, - {0x0C05, 0x0C0C}, {0x0C0E, 0x0C10}, {0x0C12, 0x0C28}, - {0x0C2A, 0x0C39}, {0x0C3D, 0x0C3D}, {0x0C3E, 0x0C40}, - {0x0C41, 0x0C44}, {0x0C46, 0x0C48}, {0x0C4A, 0x0C4D}, - {0x0C55, 0x0C56}, {0x0C58, 0x0C5A}, {0x0C60, 0x0C61}, - {0x0C62, 0x0C63}, {0x0C66, 0x0C6F}, {0x0C78, 0x0C7E}, - {0x0C7F, 0x0C7F}, {0x0C80, 0x0C80}, {0x0C81, 0x0C81}, - {0x0C82, 0x0C83}, {0x0C85, 0x0C8C}, {0x0C8E, 0x0C90}, - {0x0C92, 0x0CA8}, {0x0CAA, 0x0CB3}, {0x0CB5, 0x0CB9}, - {0x0CBC, 0x0CBC}, {0x0CBD, 0x0CBD}, {0x0CBE, 0x0CBE}, - {0x0CBF, 0x0CBF}, {0x0CC0, 0x0CC4}, {0x0CC6, 0x0CC6}, - {0x0CC7, 0x0CC8}, {0x0CCA, 0x0CCB}, {0x0CCC, 0x0CCD}, - {0x0CD5, 0x0CD6}, {0x0CDE, 0x0CDE}, {0x0CE0, 0x0CE1}, - {0x0CE2, 0x0CE3}, {0x0CE6, 0x0CEF}, {0x0CF1, 0x0CF2}, - {0x0D01, 0x0D01}, {0x0D02, 0x0D03}, {0x0D05, 0x0D0C}, - {0x0D0E, 0x0D10}, {0x0D12, 0x0D3A}, {0x0D3D, 0x0D3D}, - {0x0D3E, 0x0D40}, {0x0D41, 0x0D44}, {0x0D46, 0x0D48}, - {0x0D4A, 0x0D4C}, {0x0D4D, 0x0D4D}, {0x0D4E, 0x0D4E}, - {0x0D4F, 0x0D4F}, {0x0D54, 0x0D56}, {0x0D57, 0x0D57}, - {0x0D58, 0x0D5E}, {0x0D5F, 0x0D61}, {0x0D62, 0x0D63}, - {0x0D66, 0x0D6F}, {0x0D70, 0x0D78}, {0x0D79, 0x0D79}, - {0x0D7A, 0x0D7F}, {0x0D82, 0x0D83}, {0x0D85, 0x0D96}, - {0x0D9A, 0x0DB1}, {0x0DB3, 0x0DBB}, {0x0DBD, 0x0DBD}, - {0x0DC0, 0x0DC6}, {0x0DCA, 0x0DCA}, {0x0DCF, 0x0DD1}, - {0x0DD2, 0x0DD4}, {0x0DD6, 0x0DD6}, {0x0DD8, 0x0DDF}, - {0x0DE6, 0x0DEF}, {0x0DF2, 0x0DF3}, {0x0DF4, 0x0DF4}, - {0x0E01, 0x0E30}, {0x0E31, 0x0E31}, {0x0E32, 0x0E33}, - {0x0E34, 0x0E3A}, {0x0E3F, 0x0E3F}, {0x0E40, 0x0E45}, - {0x0E46, 0x0E46}, {0x0E47, 0x0E4E}, {0x0E4F, 0x0E4F}, - {0x0E50, 0x0E59}, {0x0E5A, 0x0E5B}, {0x0E81, 0x0E82}, - {0x0E84, 0x0E84}, {0x0E87, 0x0E88}, {0x0E8A, 0x0E8A}, - {0x0E8D, 0x0E8D}, {0x0E94, 0x0E97}, {0x0E99, 0x0E9F}, - {0x0EA1, 0x0EA3}, {0x0EA5, 0x0EA5}, {0x0EA7, 0x0EA7}, - {0x0EAA, 0x0EAB}, {0x0EAD, 0x0EB0}, {0x0EB1, 0x0EB1}, - {0x0EB2, 0x0EB3}, {0x0EB4, 0x0EB9}, {0x0EBB, 0x0EBC}, - {0x0EBD, 0x0EBD}, {0x0EC0, 0x0EC4}, {0x0EC6, 0x0EC6}, - {0x0EC8, 0x0ECD}, {0x0ED0, 0x0ED9}, {0x0EDC, 0x0EDF}, - {0x0F00, 0x0F00}, {0x0F01, 0x0F03}, {0x0F04, 0x0F12}, - {0x0F13, 0x0F13}, {0x0F14, 0x0F14}, {0x0F15, 0x0F17}, - {0x0F18, 0x0F19}, {0x0F1A, 0x0F1F}, {0x0F20, 0x0F29}, - {0x0F2A, 0x0F33}, {0x0F34, 0x0F34}, {0x0F35, 0x0F35}, - {0x0F36, 0x0F36}, {0x0F37, 0x0F37}, {0x0F38, 0x0F38}, - {0x0F39, 0x0F39}, {0x0F3A, 0x0F3A}, {0x0F3B, 0x0F3B}, - {0x0F3C, 0x0F3C}, {0x0F3D, 0x0F3D}, {0x0F3E, 0x0F3F}, - {0x0F40, 0x0F47}, {0x0F49, 0x0F6C}, {0x0F71, 0x0F7E}, - {0x0F7F, 0x0F7F}, {0x0F80, 0x0F84}, {0x0F85, 0x0F85}, - {0x0F86, 0x0F87}, {0x0F88, 0x0F8C}, {0x0F8D, 0x0F97}, - {0x0F99, 0x0FBC}, {0x0FBE, 0x0FC5}, {0x0FC6, 0x0FC6}, - {0x0FC7, 0x0FCC}, {0x0FCE, 0x0FCF}, {0x0FD0, 0x0FD4}, - {0x0FD5, 0x0FD8}, {0x0FD9, 0x0FDA}, {0x1000, 0x102A}, - {0x102B, 0x102C}, {0x102D, 0x1030}, {0x1031, 0x1031}, - {0x1032, 0x1037}, {0x1038, 0x1038}, {0x1039, 0x103A}, - {0x103B, 0x103C}, {0x103D, 0x103E}, {0x103F, 0x103F}, - {0x1040, 0x1049}, {0x104A, 0x104F}, {0x1050, 0x1055}, - {0x1056, 0x1057}, {0x1058, 0x1059}, {0x105A, 0x105D}, - {0x105E, 0x1060}, {0x1061, 0x1061}, {0x1062, 0x1064}, - {0x1065, 0x1066}, {0x1067, 0x106D}, {0x106E, 0x1070}, - {0x1071, 0x1074}, {0x1075, 0x1081}, {0x1082, 0x1082}, - {0x1083, 0x1084}, {0x1085, 0x1086}, {0x1087, 0x108C}, - {0x108D, 0x108D}, {0x108E, 0x108E}, {0x108F, 0x108F}, - {0x1090, 0x1099}, {0x109A, 0x109C}, {0x109D, 0x109D}, - {0x109E, 0x109F}, {0x10A0, 0x10C5}, {0x10C7, 0x10C7}, - {0x10CD, 0x10CD}, {0x10D0, 0x10FA}, {0x10FB, 0x10FB}, - {0x10FC, 0x10FC}, {0x10FD, 0x10FF}, {0x1160, 0x11FF}, - {0x1200, 0x1248}, {0x124A, 0x124D}, {0x1250, 0x1256}, - {0x1258, 0x1258}, {0x125A, 0x125D}, {0x1260, 0x1288}, - {0x128A, 0x128D}, {0x1290, 0x12B0}, {0x12B2, 0x12B5}, - {0x12B8, 0x12BE}, {0x12C0, 0x12C0}, {0x12C2, 0x12C5}, - {0x12C8, 0x12D6}, {0x12D8, 0x1310}, {0x1312, 0x1315}, - {0x1318, 0x135A}, {0x135D, 0x135F}, {0x1360, 0x1368}, - {0x1369, 0x137C}, {0x1380, 0x138F}, {0x1390, 0x1399}, - {0x13A0, 0x13F5}, {0x13F8, 0x13FD}, {0x1400, 0x1400}, - {0x1401, 0x166C}, {0x166D, 0x166E}, {0x166F, 0x167F}, - {0x1680, 0x1680}, {0x1681, 0x169A}, {0x169B, 0x169B}, - {0x169C, 0x169C}, {0x16A0, 0x16EA}, {0x16EB, 0x16ED}, - {0x16EE, 0x16F0}, {0x16F1, 0x16F8}, {0x1700, 0x170C}, - {0x170E, 0x1711}, {0x1712, 0x1714}, {0x1720, 0x1731}, - {0x1732, 0x1734}, {0x1735, 0x1736}, {0x1740, 0x1751}, - {0x1752, 0x1753}, {0x1760, 0x176C}, {0x176E, 0x1770}, - {0x1772, 0x1773}, {0x1780, 0x17B3}, {0x17B4, 0x17B5}, - {0x17B6, 0x17B6}, {0x17B7, 0x17BD}, {0x17BE, 0x17C5}, - {0x17C6, 0x17C6}, {0x17C7, 0x17C8}, {0x17C9, 0x17D3}, - {0x17D4, 0x17D6}, {0x17D7, 0x17D7}, {0x17D8, 0x17DA}, - {0x17DB, 0x17DB}, {0x17DC, 0x17DC}, {0x17DD, 0x17DD}, - {0x17E0, 0x17E9}, {0x17F0, 0x17F9}, {0x1800, 0x1805}, - {0x1806, 0x1806}, {0x1807, 0x180A}, {0x180B, 0x180D}, - {0x180E, 0x180E}, {0x1810, 0x1819}, {0x1820, 0x1842}, - {0x1843, 0x1843}, {0x1844, 0x1877}, {0x1880, 0x1884}, - {0x1885, 0x1886}, {0x1887, 0x18A8}, {0x18A9, 0x18A9}, - {0x18AA, 0x18AA}, {0x18B0, 0x18F5}, {0x1900, 0x191E}, - {0x1920, 0x1922}, {0x1923, 0x1926}, {0x1927, 0x1928}, - {0x1929, 0x192B}, {0x1930, 0x1931}, {0x1932, 0x1932}, - {0x1933, 0x1938}, {0x1939, 0x193B}, {0x1940, 0x1940}, - {0x1944, 0x1945}, {0x1946, 0x194F}, {0x1950, 0x196D}, - {0x1970, 0x1974}, {0x1980, 0x19AB}, {0x19B0, 0x19C9}, - {0x19D0, 0x19D9}, {0x19DA, 0x19DA}, {0x19DE, 0x19DF}, - {0x19E0, 0x19FF}, {0x1A00, 0x1A16}, {0x1A17, 0x1A18}, - {0x1A19, 0x1A1A}, {0x1A1B, 0x1A1B}, {0x1A1E, 0x1A1F}, - {0x1A20, 0x1A54}, {0x1A55, 0x1A55}, {0x1A56, 0x1A56}, - {0x1A57, 0x1A57}, {0x1A58, 0x1A5E}, {0x1A60, 0x1A60}, - {0x1A61, 0x1A61}, {0x1A62, 0x1A62}, {0x1A63, 0x1A64}, - {0x1A65, 0x1A6C}, {0x1A6D, 0x1A72}, {0x1A73, 0x1A7C}, - {0x1A7F, 0x1A7F}, {0x1A80, 0x1A89}, {0x1A90, 0x1A99}, - {0x1AA0, 0x1AA6}, {0x1AA7, 0x1AA7}, {0x1AA8, 0x1AAD}, - {0x1AB0, 0x1ABD}, {0x1ABE, 0x1ABE}, {0x1B00, 0x1B03}, - {0x1B04, 0x1B04}, {0x1B05, 0x1B33}, {0x1B34, 0x1B34}, - {0x1B35, 0x1B35}, {0x1B36, 0x1B3A}, {0x1B3B, 0x1B3B}, - {0x1B3C, 0x1B3C}, {0x1B3D, 0x1B41}, {0x1B42, 0x1B42}, - {0x1B43, 0x1B44}, {0x1B45, 0x1B4B}, {0x1B50, 0x1B59}, - {0x1B5A, 0x1B60}, {0x1B61, 0x1B6A}, {0x1B6B, 0x1B73}, - {0x1B74, 0x1B7C}, {0x1B80, 0x1B81}, {0x1B82, 0x1B82}, - {0x1B83, 0x1BA0}, {0x1BA1, 0x1BA1}, {0x1BA2, 0x1BA5}, - {0x1BA6, 0x1BA7}, {0x1BA8, 0x1BA9}, {0x1BAA, 0x1BAA}, - {0x1BAB, 0x1BAD}, {0x1BAE, 0x1BAF}, {0x1BB0, 0x1BB9}, - {0x1BBA, 0x1BBF}, {0x1BC0, 0x1BE5}, {0x1BE6, 0x1BE6}, - {0x1BE7, 0x1BE7}, {0x1BE8, 0x1BE9}, {0x1BEA, 0x1BEC}, - {0x1BED, 0x1BED}, {0x1BEE, 0x1BEE}, {0x1BEF, 0x1BF1}, - {0x1BF2, 0x1BF3}, {0x1BFC, 0x1BFF}, {0x1C00, 0x1C23}, - {0x1C24, 0x1C2B}, {0x1C2C, 0x1C33}, {0x1C34, 0x1C35}, - {0x1C36, 0x1C37}, {0x1C3B, 0x1C3F}, {0x1C40, 0x1C49}, - {0x1C4D, 0x1C4F}, {0x1C50, 0x1C59}, {0x1C5A, 0x1C77}, - {0x1C78, 0x1C7D}, {0x1C7E, 0x1C7F}, {0x1C80, 0x1C88}, - {0x1CC0, 0x1CC7}, {0x1CD0, 0x1CD2}, {0x1CD3, 0x1CD3}, - {0x1CD4, 0x1CE0}, {0x1CE1, 0x1CE1}, {0x1CE2, 0x1CE8}, - {0x1CE9, 0x1CEC}, {0x1CED, 0x1CED}, {0x1CEE, 0x1CF1}, - {0x1CF2, 0x1CF3}, {0x1CF4, 0x1CF4}, {0x1CF5, 0x1CF6}, - {0x1CF8, 0x1CF9}, {0x1D00, 0x1D2B}, {0x1D2C, 0x1D6A}, - {0x1D6B, 0x1D77}, {0x1D78, 0x1D78}, {0x1D79, 0x1D7F}, - {0x1D80, 0x1D9A}, {0x1D9B, 0x1DBF}, {0x1DC0, 0x1DF5}, - {0x1DFB, 0x1DFF}, {0x1E00, 0x1EFF}, {0x1F00, 0x1F15}, - {0x1F18, 0x1F1D}, {0x1F20, 0x1F45}, {0x1F48, 0x1F4D}, - {0x1F50, 0x1F57}, {0x1F59, 0x1F59}, {0x1F5B, 0x1F5B}, - {0x1F5D, 0x1F5D}, {0x1F5F, 0x1F7D}, {0x1F80, 0x1FB4}, - {0x1FB6, 0x1FBC}, {0x1FBD, 0x1FBD}, {0x1FBE, 0x1FBE}, - {0x1FBF, 0x1FC1}, {0x1FC2, 0x1FC4}, {0x1FC6, 0x1FCC}, - {0x1FCD, 0x1FCF}, {0x1FD0, 0x1FD3}, {0x1FD6, 0x1FDB}, - {0x1FDD, 0x1FDF}, {0x1FE0, 0x1FEC}, {0x1FED, 0x1FEF}, - {0x1FF2, 0x1FF4}, {0x1FF6, 0x1FFC}, {0x1FFD, 0x1FFE}, - {0x2000, 0x200A}, {0x200B, 0x200F}, {0x2011, 0x2012}, - {0x2017, 0x2017}, {0x201A, 0x201A}, {0x201B, 0x201B}, - {0x201E, 0x201E}, {0x201F, 0x201F}, {0x2023, 0x2023}, - {0x2028, 0x2028}, {0x2029, 0x2029}, {0x202A, 0x202E}, - {0x202F, 0x202F}, {0x2031, 0x2031}, {0x2034, 0x2034}, - {0x2036, 0x2038}, {0x2039, 0x2039}, {0x203A, 0x203A}, - {0x203C, 0x203D}, {0x203F, 0x2040}, {0x2041, 0x2043}, - {0x2044, 0x2044}, {0x2045, 0x2045}, {0x2046, 0x2046}, - {0x2047, 0x2051}, {0x2052, 0x2052}, {0x2053, 0x2053}, - {0x2054, 0x2054}, {0x2055, 0x205E}, {0x205F, 0x205F}, - {0x2060, 0x2064}, {0x2066, 0x206F}, {0x2070, 0x2070}, - {0x2071, 0x2071}, {0x2075, 0x2079}, {0x207A, 0x207C}, - {0x207D, 0x207D}, {0x207E, 0x207E}, {0x2080, 0x2080}, - {0x2085, 0x2089}, {0x208A, 0x208C}, {0x208D, 0x208D}, - {0x208E, 0x208E}, {0x2090, 0x209C}, {0x20A0, 0x20A8}, - {0x20AA, 0x20AB}, {0x20AD, 0x20BE}, {0x20D0, 0x20DC}, - {0x20DD, 0x20E0}, {0x20E1, 0x20E1}, {0x20E2, 0x20E4}, - {0x20E5, 0x20F0}, {0x2100, 0x2101}, {0x2102, 0x2102}, - {0x2104, 0x2104}, {0x2106, 0x2106}, {0x2107, 0x2107}, - {0x2108, 0x2108}, {0x210A, 0x2112}, {0x2114, 0x2114}, - {0x2115, 0x2115}, {0x2117, 0x2117}, {0x2118, 0x2118}, - {0x2119, 0x211D}, {0x211E, 0x2120}, {0x2123, 0x2123}, - {0x2124, 0x2124}, {0x2125, 0x2125}, {0x2127, 0x2127}, - {0x2128, 0x2128}, {0x2129, 0x2129}, {0x212A, 0x212A}, - {0x212C, 0x212D}, {0x212E, 0x212E}, {0x212F, 0x2134}, - {0x2135, 0x2138}, {0x2139, 0x2139}, {0x213A, 0x213B}, - {0x213C, 0x213F}, {0x2140, 0x2144}, {0x2145, 0x2149}, - {0x214A, 0x214A}, {0x214B, 0x214B}, {0x214C, 0x214D}, - {0x214E, 0x214E}, {0x214F, 0x214F}, {0x2150, 0x2152}, - {0x2155, 0x215A}, {0x215F, 0x215F}, {0x216C, 0x216F}, - {0x217A, 0x2182}, {0x2183, 0x2184}, {0x2185, 0x2188}, - {0x218A, 0x218B}, {0x219A, 0x219B}, {0x219C, 0x219F}, - {0x21A0, 0x21A0}, {0x21A1, 0x21A2}, {0x21A3, 0x21A3}, - {0x21A4, 0x21A5}, {0x21A6, 0x21A6}, {0x21A7, 0x21AD}, - {0x21AE, 0x21AE}, {0x21AF, 0x21B7}, {0x21BA, 0x21CD}, - {0x21CE, 0x21CF}, {0x21D0, 0x21D1}, {0x21D3, 0x21D3}, - {0x21D5, 0x21E6}, {0x21E8, 0x21F3}, {0x21F4, 0x21FF}, - {0x2201, 0x2201}, {0x2204, 0x2206}, {0x2209, 0x220A}, - {0x220C, 0x220E}, {0x2210, 0x2210}, {0x2212, 0x2214}, - {0x2216, 0x2219}, {0x221B, 0x221C}, {0x2221, 0x2222}, - {0x2224, 0x2224}, {0x2226, 0x2226}, {0x222D, 0x222D}, - {0x222F, 0x2233}, {0x2238, 0x223B}, {0x223E, 0x2247}, - {0x2249, 0x224B}, {0x224D, 0x2251}, {0x2253, 0x225F}, - {0x2262, 0x2263}, {0x2268, 0x2269}, {0x226C, 0x226D}, - {0x2270, 0x2281}, {0x2284, 0x2285}, {0x2288, 0x2294}, - {0x2296, 0x2298}, {0x229A, 0x22A4}, {0x22A6, 0x22BE}, - {0x22C0, 0x22FF}, {0x2300, 0x2307}, {0x2308, 0x2308}, - {0x2309, 0x2309}, {0x230A, 0x230A}, {0x230B, 0x230B}, - {0x230C, 0x2311}, {0x2313, 0x2319}, {0x231C, 0x231F}, - {0x2320, 0x2321}, {0x2322, 0x2328}, {0x232B, 0x237B}, - {0x237C, 0x237C}, {0x237D, 0x239A}, {0x239B, 0x23B3}, - {0x23B4, 0x23DB}, {0x23DC, 0x23E1}, {0x23E2, 0x23E8}, - {0x23ED, 0x23EF}, {0x23F1, 0x23F2}, {0x23F4, 0x23FE}, - {0x2400, 0x2426}, {0x2440, 0x244A}, {0x24EA, 0x24EA}, - {0x254C, 0x254F}, {0x2574, 0x257F}, {0x2590, 0x2591}, - {0x2596, 0x259F}, {0x25A2, 0x25A2}, {0x25AA, 0x25B1}, - {0x25B4, 0x25B5}, {0x25B8, 0x25BB}, {0x25BE, 0x25BF}, - {0x25C2, 0x25C5}, {0x25C9, 0x25CA}, {0x25CC, 0x25CD}, - {0x25D2, 0x25E1}, {0x25E6, 0x25EE}, {0x25F0, 0x25F7}, - {0x25F8, 0x25FC}, {0x25FF, 0x25FF}, {0x2600, 0x2604}, - {0x2607, 0x2608}, {0x260A, 0x260D}, {0x2610, 0x2613}, - {0x2616, 0x261B}, {0x261D, 0x261D}, {0x261F, 0x263F}, - {0x2641, 0x2641}, {0x2643, 0x2647}, {0x2654, 0x265F}, - {0x2662, 0x2662}, {0x2666, 0x2666}, {0x266B, 0x266B}, - {0x266E, 0x266E}, {0x2670, 0x267E}, {0x2680, 0x2692}, - {0x2694, 0x269D}, {0x26A0, 0x26A0}, {0x26A2, 0x26A9}, - {0x26AC, 0x26BC}, {0x26C0, 0x26C3}, {0x26E2, 0x26E2}, - {0x26E4, 0x26E7}, {0x2700, 0x2704}, {0x2706, 0x2709}, - {0x270C, 0x2727}, {0x2729, 0x273C}, {0x273E, 0x274B}, - {0x274D, 0x274D}, {0x274F, 0x2752}, {0x2756, 0x2756}, - {0x2758, 0x2767}, {0x2768, 0x2768}, {0x2769, 0x2769}, - {0x276A, 0x276A}, {0x276B, 0x276B}, {0x276C, 0x276C}, - {0x276D, 0x276D}, {0x276E, 0x276E}, {0x276F, 0x276F}, - {0x2770, 0x2770}, {0x2771, 0x2771}, {0x2772, 0x2772}, - {0x2773, 0x2773}, {0x2774, 0x2774}, {0x2775, 0x2775}, - {0x2780, 0x2793}, {0x2794, 0x2794}, {0x2798, 0x27AF}, - {0x27B1, 0x27BE}, {0x27C0, 0x27C4}, {0x27C5, 0x27C5}, - {0x27C6, 0x27C6}, {0x27C7, 0x27E5}, {0x27EE, 0x27EE}, - {0x27EF, 0x27EF}, {0x27F0, 0x27FF}, {0x2800, 0x28FF}, - {0x2900, 0x297F}, {0x2980, 0x2982}, {0x2983, 0x2983}, - {0x2984, 0x2984}, {0x2987, 0x2987}, {0x2988, 0x2988}, - {0x2989, 0x2989}, {0x298A, 0x298A}, {0x298B, 0x298B}, - {0x298C, 0x298C}, {0x298D, 0x298D}, {0x298E, 0x298E}, - {0x298F, 0x298F}, {0x2990, 0x2990}, {0x2991, 0x2991}, - {0x2992, 0x2992}, {0x2993, 0x2993}, {0x2994, 0x2994}, - {0x2995, 0x2995}, {0x2996, 0x2996}, {0x2997, 0x2997}, - {0x2998, 0x2998}, {0x2999, 0x29D7}, {0x29D8, 0x29D8}, - {0x29D9, 0x29D9}, {0x29DA, 0x29DA}, {0x29DB, 0x29DB}, - {0x29DC, 0x29FB}, {0x29FC, 0x29FC}, {0x29FD, 0x29FD}, - {0x29FE, 0x29FF}, {0x2A00, 0x2AFF}, {0x2B00, 0x2B1A}, - {0x2B1D, 0x2B2F}, {0x2B30, 0x2B44}, {0x2B45, 0x2B46}, - {0x2B47, 0x2B4C}, {0x2B4D, 0x2B4F}, {0x2B51, 0x2B54}, - {0x2B5A, 0x2B73}, {0x2B76, 0x2B95}, {0x2B98, 0x2BB9}, - {0x2BBD, 0x2BC8}, {0x2BCA, 0x2BD1}, {0x2BEC, 0x2BEF}, - {0x2C00, 0x2C2E}, {0x2C30, 0x2C5E}, {0x2C60, 0x2C7B}, - {0x2C7C, 0x2C7D}, {0x2C7E, 0x2C7F}, {0x2C80, 0x2CE4}, - {0x2CE5, 0x2CEA}, {0x2CEB, 0x2CEE}, {0x2CEF, 0x2CF1}, - {0x2CF2, 0x2CF3}, {0x2CF9, 0x2CFC}, {0x2CFD, 0x2CFD}, - {0x2CFE, 0x2CFF}, {0x2D00, 0x2D25}, {0x2D27, 0x2D27}, - {0x2D2D, 0x2D2D}, {0x2D30, 0x2D67}, {0x2D6F, 0x2D6F}, - {0x2D70, 0x2D70}, {0x2D7F, 0x2D7F}, {0x2D80, 0x2D96}, - {0x2DA0, 0x2DA6}, {0x2DA8, 0x2DAE}, {0x2DB0, 0x2DB6}, - {0x2DB8, 0x2DBE}, {0x2DC0, 0x2DC6}, {0x2DC8, 0x2DCE}, - {0x2DD0, 0x2DD6}, {0x2DD8, 0x2DDE}, {0x2DE0, 0x2DFF}, - {0x2E00, 0x2E01}, {0x2E02, 0x2E02}, {0x2E03, 0x2E03}, - {0x2E04, 0x2E04}, {0x2E05, 0x2E05}, {0x2E06, 0x2E08}, - {0x2E09, 0x2E09}, {0x2E0A, 0x2E0A}, {0x2E0B, 0x2E0B}, - {0x2E0C, 0x2E0C}, {0x2E0D, 0x2E0D}, {0x2E0E, 0x2E16}, - {0x2E17, 0x2E17}, {0x2E18, 0x2E19}, {0x2E1A, 0x2E1A}, - {0x2E1B, 0x2E1B}, {0x2E1C, 0x2E1C}, {0x2E1D, 0x2E1D}, - {0x2E1E, 0x2E1F}, {0x2E20, 0x2E20}, {0x2E21, 0x2E21}, - {0x2E22, 0x2E22}, {0x2E23, 0x2E23}, {0x2E24, 0x2E24}, - {0x2E25, 0x2E25}, {0x2E26, 0x2E26}, {0x2E27, 0x2E27}, - {0x2E28, 0x2E28}, {0x2E29, 0x2E29}, {0x2E2A, 0x2E2E}, - {0x2E2F, 0x2E2F}, {0x2E30, 0x2E39}, {0x2E3A, 0x2E3B}, - {0x2E3C, 0x2E3F}, {0x2E40, 0x2E40}, {0x2E41, 0x2E41}, - {0x2E42, 0x2E42}, {0x2E43, 0x2E44}, {0x303F, 0x303F}, - {0x4DC0, 0x4DFF}, {0xA4D0, 0xA4F7}, {0xA4F8, 0xA4FD}, - {0xA4FE, 0xA4FF}, {0xA500, 0xA60B}, {0xA60C, 0xA60C}, - {0xA60D, 0xA60F}, {0xA610, 0xA61F}, {0xA620, 0xA629}, - {0xA62A, 0xA62B}, {0xA640, 0xA66D}, {0xA66E, 0xA66E}, - {0xA66F, 0xA66F}, {0xA670, 0xA672}, {0xA673, 0xA673}, - {0xA674, 0xA67D}, {0xA67E, 0xA67E}, {0xA67F, 0xA67F}, - {0xA680, 0xA69B}, {0xA69C, 0xA69D}, {0xA69E, 0xA69F}, - {0xA6A0, 0xA6E5}, {0xA6E6, 0xA6EF}, {0xA6F0, 0xA6F1}, - {0xA6F2, 0xA6F7}, {0xA700, 0xA716}, {0xA717, 0xA71F}, - {0xA720, 0xA721}, {0xA722, 0xA76F}, {0xA770, 0xA770}, - {0xA771, 0xA787}, {0xA788, 0xA788}, {0xA789, 0xA78A}, - {0xA78B, 0xA78E}, {0xA78F, 0xA78F}, {0xA790, 0xA7AE}, - {0xA7B0, 0xA7B7}, {0xA7F7, 0xA7F7}, {0xA7F8, 0xA7F9}, - {0xA7FA, 0xA7FA}, {0xA7FB, 0xA7FF}, {0xA800, 0xA801}, - {0xA802, 0xA802}, {0xA803, 0xA805}, {0xA806, 0xA806}, - {0xA807, 0xA80A}, {0xA80B, 0xA80B}, {0xA80C, 0xA822}, - {0xA823, 0xA824}, {0xA825, 0xA826}, {0xA827, 0xA827}, - {0xA828, 0xA82B}, {0xA830, 0xA835}, {0xA836, 0xA837}, - {0xA838, 0xA838}, {0xA839, 0xA839}, {0xA840, 0xA873}, - {0xA874, 0xA877}, {0xA880, 0xA881}, {0xA882, 0xA8B3}, - {0xA8B4, 0xA8C3}, {0xA8C4, 0xA8C5}, {0xA8CE, 0xA8CF}, - {0xA8D0, 0xA8D9}, {0xA8E0, 0xA8F1}, {0xA8F2, 0xA8F7}, - {0xA8F8, 0xA8FA}, {0xA8FB, 0xA8FB}, {0xA8FC, 0xA8FC}, - {0xA8FD, 0xA8FD}, {0xA900, 0xA909}, {0xA90A, 0xA925}, - {0xA926, 0xA92D}, {0xA92E, 0xA92F}, {0xA930, 0xA946}, - {0xA947, 0xA951}, {0xA952, 0xA953}, {0xA95F, 0xA95F}, - {0xA980, 0xA982}, {0xA983, 0xA983}, {0xA984, 0xA9B2}, - {0xA9B3, 0xA9B3}, {0xA9B4, 0xA9B5}, {0xA9B6, 0xA9B9}, - {0xA9BA, 0xA9BB}, {0xA9BC, 0xA9BC}, {0xA9BD, 0xA9C0}, - {0xA9C1, 0xA9CD}, {0xA9CF, 0xA9CF}, {0xA9D0, 0xA9D9}, - {0xA9DE, 0xA9DF}, {0xA9E0, 0xA9E4}, {0xA9E5, 0xA9E5}, - {0xA9E6, 0xA9E6}, {0xA9E7, 0xA9EF}, {0xA9F0, 0xA9F9}, - {0xA9FA, 0xA9FE}, {0xAA00, 0xAA28}, {0xAA29, 0xAA2E}, - {0xAA2F, 0xAA30}, {0xAA31, 0xAA32}, {0xAA33, 0xAA34}, - {0xAA35, 0xAA36}, {0xAA40, 0xAA42}, {0xAA43, 0xAA43}, - {0xAA44, 0xAA4B}, {0xAA4C, 0xAA4C}, {0xAA4D, 0xAA4D}, - {0xAA50, 0xAA59}, {0xAA5C, 0xAA5F}, {0xAA60, 0xAA6F}, - {0xAA70, 0xAA70}, {0xAA71, 0xAA76}, {0xAA77, 0xAA79}, - {0xAA7A, 0xAA7A}, {0xAA7B, 0xAA7B}, {0xAA7C, 0xAA7C}, - {0xAA7D, 0xAA7D}, {0xAA7E, 0xAA7F}, {0xAA80, 0xAAAF}, - {0xAAB0, 0xAAB0}, {0xAAB1, 0xAAB1}, {0xAAB2, 0xAAB4}, - {0xAAB5, 0xAAB6}, {0xAAB7, 0xAAB8}, {0xAAB9, 0xAABD}, - {0xAABE, 0xAABF}, {0xAAC0, 0xAAC0}, {0xAAC1, 0xAAC1}, - {0xAAC2, 0xAAC2}, {0xAADB, 0xAADC}, {0xAADD, 0xAADD}, - {0xAADE, 0xAADF}, {0xAAE0, 0xAAEA}, {0xAAEB, 0xAAEB}, - {0xAAEC, 0xAAED}, {0xAAEE, 0xAAEF}, {0xAAF0, 0xAAF1}, - {0xAAF2, 0xAAF2}, {0xAAF3, 0xAAF4}, {0xAAF5, 0xAAF5}, - {0xAAF6, 0xAAF6}, {0xAB01, 0xAB06}, {0xAB09, 0xAB0E}, - {0xAB11, 0xAB16}, {0xAB20, 0xAB26}, {0xAB28, 0xAB2E}, - {0xAB30, 0xAB5A}, {0xAB5B, 0xAB5B}, {0xAB5C, 0xAB5F}, - {0xAB60, 0xAB65}, {0xAB70, 0xABBF}, {0xABC0, 0xABE2}, - {0xABE3, 0xABE4}, {0xABE5, 0xABE5}, {0xABE6, 0xABE7}, - {0xABE8, 0xABE8}, {0xABE9, 0xABEA}, {0xABEB, 0xABEB}, - {0xABEC, 0xABEC}, {0xABED, 0xABED}, {0xABF0, 0xABF9}, - {0xD7B0, 0xD7C6}, {0xD7CB, 0xD7FB}, {0xD800, 0xDB7F}, - {0xDB80, 0xDBFF}, {0xDC00, 0xDFFF}, {0xFB00, 0xFB06}, - {0xFB13, 0xFB17}, {0xFB1D, 0xFB1D}, {0xFB1E, 0xFB1E}, - {0xFB1F, 0xFB28}, {0xFB29, 0xFB29}, {0xFB2A, 0xFB36}, - {0xFB38, 0xFB3C}, {0xFB3E, 0xFB3E}, {0xFB40, 0xFB41}, - {0xFB43, 0xFB44}, {0xFB46, 0xFB4F}, {0xFB50, 0xFBB1}, - {0xFBB2, 0xFBC1}, {0xFBD3, 0xFD3D}, {0xFD3E, 0xFD3E}, - {0xFD3F, 0xFD3F}, {0xFD50, 0xFD8F}, {0xFD92, 0xFDC7}, - {0xFDF0, 0xFDFB}, {0xFDFC, 0xFDFC}, {0xFDFD, 0xFDFD}, - {0xFE20, 0xFE2F}, {0xFE70, 0xFE74}, {0xFE76, 0xFEFC}, - {0xFEFF, 0xFEFF}, {0xFFF9, 0xFFFB}, {0xFFFC, 0xFFFC}, - {0x10000, 0x1000B}, {0x1000D, 0x10026}, {0x10028, 0x1003A}, - {0x1003C, 0x1003D}, {0x1003F, 0x1004D}, {0x10050, 0x1005D}, - {0x10080, 0x100FA}, {0x10100, 0x10102}, {0x10107, 0x10133}, - {0x10137, 0x1013F}, {0x10140, 0x10174}, {0x10175, 0x10178}, - {0x10179, 0x10189}, {0x1018A, 0x1018B}, {0x1018C, 0x1018E}, - {0x10190, 0x1019B}, {0x101A0, 0x101A0}, {0x101D0, 0x101FC}, - {0x101FD, 0x101FD}, {0x10280, 0x1029C}, {0x102A0, 0x102D0}, - {0x102E0, 0x102E0}, {0x102E1, 0x102FB}, {0x10300, 0x1031F}, - {0x10320, 0x10323}, {0x10330, 0x10340}, {0x10341, 0x10341}, - {0x10342, 0x10349}, {0x1034A, 0x1034A}, {0x10350, 0x10375}, - {0x10376, 0x1037A}, {0x10380, 0x1039D}, {0x1039F, 0x1039F}, - {0x103A0, 0x103C3}, {0x103C8, 0x103CF}, {0x103D0, 0x103D0}, - {0x103D1, 0x103D5}, {0x10400, 0x1044F}, {0x10450, 0x1047F}, - {0x10480, 0x1049D}, {0x104A0, 0x104A9}, {0x104B0, 0x104D3}, - {0x104D8, 0x104FB}, {0x10500, 0x10527}, {0x10530, 0x10563}, - {0x1056F, 0x1056F}, {0x10600, 0x10736}, {0x10740, 0x10755}, - {0x10760, 0x10767}, {0x10800, 0x10805}, {0x10808, 0x10808}, - {0x1080A, 0x10835}, {0x10837, 0x10838}, {0x1083C, 0x1083C}, - {0x1083F, 0x1083F}, {0x10840, 0x10855}, {0x10857, 0x10857}, - {0x10858, 0x1085F}, {0x10860, 0x10876}, {0x10877, 0x10878}, - {0x10879, 0x1087F}, {0x10880, 0x1089E}, {0x108A7, 0x108AF}, - {0x108E0, 0x108F2}, {0x108F4, 0x108F5}, {0x108FB, 0x108FF}, - {0x10900, 0x10915}, {0x10916, 0x1091B}, {0x1091F, 0x1091F}, - {0x10920, 0x10939}, {0x1093F, 0x1093F}, {0x10980, 0x1099F}, - {0x109A0, 0x109B7}, {0x109BC, 0x109BD}, {0x109BE, 0x109BF}, - {0x109C0, 0x109CF}, {0x109D2, 0x109FF}, {0x10A00, 0x10A00}, - {0x10A01, 0x10A03}, {0x10A05, 0x10A06}, {0x10A0C, 0x10A0F}, - {0x10A10, 0x10A13}, {0x10A15, 0x10A17}, {0x10A19, 0x10A33}, - {0x10A38, 0x10A3A}, {0x10A3F, 0x10A3F}, {0x10A40, 0x10A47}, - {0x10A50, 0x10A58}, {0x10A60, 0x10A7C}, {0x10A7D, 0x10A7E}, - {0x10A7F, 0x10A7F}, {0x10A80, 0x10A9C}, {0x10A9D, 0x10A9F}, - {0x10AC0, 0x10AC7}, {0x10AC8, 0x10AC8}, {0x10AC9, 0x10AE4}, - {0x10AE5, 0x10AE6}, {0x10AEB, 0x10AEF}, {0x10AF0, 0x10AF6}, - {0x10B00, 0x10B35}, {0x10B39, 0x10B3F}, {0x10B40, 0x10B55}, - {0x10B58, 0x10B5F}, {0x10B60, 0x10B72}, {0x10B78, 0x10B7F}, - {0x10B80, 0x10B91}, {0x10B99, 0x10B9C}, {0x10BA9, 0x10BAF}, - {0x10C00, 0x10C48}, {0x10C80, 0x10CB2}, {0x10CC0, 0x10CF2}, - {0x10CFA, 0x10CFF}, {0x10E60, 0x10E7E}, {0x11000, 0x11000}, - {0x11001, 0x11001}, {0x11002, 0x11002}, {0x11003, 0x11037}, - {0x11038, 0x11046}, {0x11047, 0x1104D}, {0x11052, 0x11065}, - {0x11066, 0x1106F}, {0x1107F, 0x1107F}, {0x11080, 0x11081}, - {0x11082, 0x11082}, {0x11083, 0x110AF}, {0x110B0, 0x110B2}, - {0x110B3, 0x110B6}, {0x110B7, 0x110B8}, {0x110B9, 0x110BA}, - {0x110BB, 0x110BC}, {0x110BD, 0x110BD}, {0x110BE, 0x110C1}, - {0x110D0, 0x110E8}, {0x110F0, 0x110F9}, {0x11100, 0x11102}, - {0x11103, 0x11126}, {0x11127, 0x1112B}, {0x1112C, 0x1112C}, - {0x1112D, 0x11134}, {0x11136, 0x1113F}, {0x11140, 0x11143}, - {0x11150, 0x11172}, {0x11173, 0x11173}, {0x11174, 0x11175}, - {0x11176, 0x11176}, {0x11180, 0x11181}, {0x11182, 0x11182}, - {0x11183, 0x111B2}, {0x111B3, 0x111B5}, {0x111B6, 0x111BE}, - {0x111BF, 0x111C0}, {0x111C1, 0x111C4}, {0x111C5, 0x111C9}, - {0x111CA, 0x111CC}, {0x111CD, 0x111CD}, {0x111D0, 0x111D9}, - {0x111DA, 0x111DA}, {0x111DB, 0x111DB}, {0x111DC, 0x111DC}, - {0x111DD, 0x111DF}, {0x111E1, 0x111F4}, {0x11200, 0x11211}, - {0x11213, 0x1122B}, {0x1122C, 0x1122E}, {0x1122F, 0x11231}, - {0x11232, 0x11233}, {0x11234, 0x11234}, {0x11235, 0x11235}, - {0x11236, 0x11237}, {0x11238, 0x1123D}, {0x1123E, 0x1123E}, - {0x11280, 0x11286}, {0x11288, 0x11288}, {0x1128A, 0x1128D}, - {0x1128F, 0x1129D}, {0x1129F, 0x112A8}, {0x112A9, 0x112A9}, - {0x112B0, 0x112DE}, {0x112DF, 0x112DF}, {0x112E0, 0x112E2}, - {0x112E3, 0x112EA}, {0x112F0, 0x112F9}, {0x11300, 0x11301}, - {0x11302, 0x11303}, {0x11305, 0x1130C}, {0x1130F, 0x11310}, - {0x11313, 0x11328}, {0x1132A, 0x11330}, {0x11332, 0x11333}, - {0x11335, 0x11339}, {0x1133C, 0x1133C}, {0x1133D, 0x1133D}, - {0x1133E, 0x1133F}, {0x11340, 0x11340}, {0x11341, 0x11344}, - {0x11347, 0x11348}, {0x1134B, 0x1134D}, {0x11350, 0x11350}, - {0x11357, 0x11357}, {0x1135D, 0x11361}, {0x11362, 0x11363}, - {0x11366, 0x1136C}, {0x11370, 0x11374}, {0x11400, 0x11434}, - {0x11435, 0x11437}, {0x11438, 0x1143F}, {0x11440, 0x11441}, - {0x11442, 0x11444}, {0x11445, 0x11445}, {0x11446, 0x11446}, - {0x11447, 0x1144A}, {0x1144B, 0x1144F}, {0x11450, 0x11459}, - {0x1145B, 0x1145B}, {0x1145D, 0x1145D}, {0x11480, 0x114AF}, - {0x114B0, 0x114B2}, {0x114B3, 0x114B8}, {0x114B9, 0x114B9}, - {0x114BA, 0x114BA}, {0x114BB, 0x114BE}, {0x114BF, 0x114C0}, - {0x114C1, 0x114C1}, {0x114C2, 0x114C3}, {0x114C4, 0x114C5}, - {0x114C6, 0x114C6}, {0x114C7, 0x114C7}, {0x114D0, 0x114D9}, - {0x11580, 0x115AE}, {0x115AF, 0x115B1}, {0x115B2, 0x115B5}, - {0x115B8, 0x115BB}, {0x115BC, 0x115BD}, {0x115BE, 0x115BE}, - {0x115BF, 0x115C0}, {0x115C1, 0x115D7}, {0x115D8, 0x115DB}, - {0x115DC, 0x115DD}, {0x11600, 0x1162F}, {0x11630, 0x11632}, - {0x11633, 0x1163A}, {0x1163B, 0x1163C}, {0x1163D, 0x1163D}, - {0x1163E, 0x1163E}, {0x1163F, 0x11640}, {0x11641, 0x11643}, - {0x11644, 0x11644}, {0x11650, 0x11659}, {0x11660, 0x1166C}, - {0x11680, 0x116AA}, {0x116AB, 0x116AB}, {0x116AC, 0x116AC}, - {0x116AD, 0x116AD}, {0x116AE, 0x116AF}, {0x116B0, 0x116B5}, - {0x116B6, 0x116B6}, {0x116B7, 0x116B7}, {0x116C0, 0x116C9}, - {0x11700, 0x11719}, {0x1171D, 0x1171F}, {0x11720, 0x11721}, - {0x11722, 0x11725}, {0x11726, 0x11726}, {0x11727, 0x1172B}, - {0x11730, 0x11739}, {0x1173A, 0x1173B}, {0x1173C, 0x1173E}, - {0x1173F, 0x1173F}, {0x118A0, 0x118DF}, {0x118E0, 0x118E9}, - {0x118EA, 0x118F2}, {0x118FF, 0x118FF}, {0x11AC0, 0x11AF8}, - {0x11C00, 0x11C08}, {0x11C0A, 0x11C2E}, {0x11C2F, 0x11C2F}, - {0x11C30, 0x11C36}, {0x11C38, 0x11C3D}, {0x11C3E, 0x11C3E}, - {0x11C3F, 0x11C3F}, {0x11C40, 0x11C40}, {0x11C41, 0x11C45}, - {0x11C50, 0x11C59}, {0x11C5A, 0x11C6C}, {0x11C70, 0x11C71}, - {0x11C72, 0x11C8F}, {0x11C92, 0x11CA7}, {0x11CA9, 0x11CA9}, - {0x11CAA, 0x11CB0}, {0x11CB1, 0x11CB1}, {0x11CB2, 0x11CB3}, - {0x11CB4, 0x11CB4}, {0x11CB5, 0x11CB6}, {0x12000, 0x12399}, - {0x12400, 0x1246E}, {0x12470, 0x12474}, {0x12480, 0x12543}, - {0x13000, 0x1342E}, {0x14400, 0x14646}, {0x16800, 0x16A38}, - {0x16A40, 0x16A5E}, {0x16A60, 0x16A69}, {0x16A6E, 0x16A6F}, - {0x16AD0, 0x16AED}, {0x16AF0, 0x16AF4}, {0x16AF5, 0x16AF5}, - {0x16B00, 0x16B2F}, {0x16B30, 0x16B36}, {0x16B37, 0x16B3B}, - {0x16B3C, 0x16B3F}, {0x16B40, 0x16B43}, {0x16B44, 0x16B44}, - {0x16B45, 0x16B45}, {0x16B50, 0x16B59}, {0x16B5B, 0x16B61}, - {0x16B63, 0x16B77}, {0x16B7D, 0x16B8F}, {0x16F00, 0x16F44}, - {0x16F50, 0x16F50}, {0x16F51, 0x16F7E}, {0x16F8F, 0x16F92}, - {0x16F93, 0x16F9F}, {0x1BC00, 0x1BC6A}, {0x1BC70, 0x1BC7C}, - {0x1BC80, 0x1BC88}, {0x1BC90, 0x1BC99}, {0x1BC9C, 0x1BC9C}, - {0x1BC9D, 0x1BC9E}, {0x1BC9F, 0x1BC9F}, {0x1BCA0, 0x1BCA3}, - {0x1D000, 0x1D0F5}, {0x1D100, 0x1D126}, {0x1D129, 0x1D164}, - {0x1D165, 0x1D166}, {0x1D167, 0x1D169}, {0x1D16A, 0x1D16C}, - {0x1D16D, 0x1D172}, {0x1D173, 0x1D17A}, {0x1D17B, 0x1D182}, - {0x1D183, 0x1D184}, {0x1D185, 0x1D18B}, {0x1D18C, 0x1D1A9}, - {0x1D1AA, 0x1D1AD}, {0x1D1AE, 0x1D1E8}, {0x1D200, 0x1D241}, - {0x1D242, 0x1D244}, {0x1D245, 0x1D245}, {0x1D300, 0x1D356}, - {0x1D360, 0x1D371}, {0x1D400, 0x1D454}, {0x1D456, 0x1D49C}, - {0x1D49E, 0x1D49F}, {0x1D4A2, 0x1D4A2}, {0x1D4A5, 0x1D4A6}, - {0x1D4A9, 0x1D4AC}, {0x1D4AE, 0x1D4B9}, {0x1D4BB, 0x1D4BB}, - {0x1D4BD, 0x1D4C3}, {0x1D4C5, 0x1D505}, {0x1D507, 0x1D50A}, - {0x1D50D, 0x1D514}, {0x1D516, 0x1D51C}, {0x1D51E, 0x1D539}, - {0x1D53B, 0x1D53E}, {0x1D540, 0x1D544}, {0x1D546, 0x1D546}, - {0x1D54A, 0x1D550}, {0x1D552, 0x1D6A5}, {0x1D6A8, 0x1D6C0}, - {0x1D6C1, 0x1D6C1}, {0x1D6C2, 0x1D6DA}, {0x1D6DB, 0x1D6DB}, - {0x1D6DC, 0x1D6FA}, {0x1D6FB, 0x1D6FB}, {0x1D6FC, 0x1D714}, - {0x1D715, 0x1D715}, {0x1D716, 0x1D734}, {0x1D735, 0x1D735}, - {0x1D736, 0x1D74E}, {0x1D74F, 0x1D74F}, {0x1D750, 0x1D76E}, - {0x1D76F, 0x1D76F}, {0x1D770, 0x1D788}, {0x1D789, 0x1D789}, - {0x1D78A, 0x1D7A8}, {0x1D7A9, 0x1D7A9}, {0x1D7AA, 0x1D7C2}, - {0x1D7C3, 0x1D7C3}, {0x1D7C4, 0x1D7CB}, {0x1D7CE, 0x1D7FF}, - {0x1D800, 0x1D9FF}, {0x1DA00, 0x1DA36}, {0x1DA37, 0x1DA3A}, - {0x1DA3B, 0x1DA6C}, {0x1DA6D, 0x1DA74}, {0x1DA75, 0x1DA75}, - {0x1DA76, 0x1DA83}, {0x1DA84, 0x1DA84}, {0x1DA85, 0x1DA86}, - {0x1DA87, 0x1DA8B}, {0x1DA9B, 0x1DA9F}, {0x1DAA1, 0x1DAAF}, - {0x1E000, 0x1E006}, {0x1E008, 0x1E018}, {0x1E01B, 0x1E021}, - {0x1E023, 0x1E024}, {0x1E026, 0x1E02A}, {0x1E800, 0x1E8C4}, - {0x1E8C7, 0x1E8CF}, {0x1E8D0, 0x1E8D6}, {0x1E900, 0x1E943}, - {0x1E944, 0x1E94A}, {0x1E950, 0x1E959}, {0x1E95E, 0x1E95F}, - {0x1EE00, 0x1EE03}, {0x1EE05, 0x1EE1F}, {0x1EE21, 0x1EE22}, - {0x1EE24, 0x1EE24}, {0x1EE27, 0x1EE27}, {0x1EE29, 0x1EE32}, - {0x1EE34, 0x1EE37}, {0x1EE39, 0x1EE39}, {0x1EE3B, 0x1EE3B}, - {0x1EE42, 0x1EE42}, {0x1EE47, 0x1EE47}, {0x1EE49, 0x1EE49}, - {0x1EE4B, 0x1EE4B}, {0x1EE4D, 0x1EE4F}, {0x1EE51, 0x1EE52}, - {0x1EE54, 0x1EE54}, {0x1EE57, 0x1EE57}, {0x1EE59, 0x1EE59}, - {0x1EE5B, 0x1EE5B}, {0x1EE5D, 0x1EE5D}, {0x1EE5F, 0x1EE5F}, - {0x1EE61, 0x1EE62}, {0x1EE64, 0x1EE64}, {0x1EE67, 0x1EE6A}, - {0x1EE6C, 0x1EE72}, {0x1EE74, 0x1EE77}, {0x1EE79, 0x1EE7C}, - {0x1EE7E, 0x1EE7E}, {0x1EE80, 0x1EE89}, {0x1EE8B, 0x1EE9B}, - {0x1EEA1, 0x1EEA3}, {0x1EEA5, 0x1EEA9}, {0x1EEAB, 0x1EEBB}, - {0x1EEF0, 0x1EEF1}, {0x1F000, 0x1F003}, {0x1F005, 0x1F02B}, - {0x1F030, 0x1F093}, {0x1F0A0, 0x1F0AE}, {0x1F0B1, 0x1F0BF}, - {0x1F0C1, 0x1F0CE}, {0x1F0D1, 0x1F0F5}, {0x1F10B, 0x1F10C}, - {0x1F12E, 0x1F12E}, {0x1F16A, 0x1F16B}, {0x1F1E6, 0x1F1FF}, - {0x1F321, 0x1F32C}, {0x1F336, 0x1F336}, {0x1F37D, 0x1F37D}, - {0x1F394, 0x1F39F}, {0x1F3CB, 0x1F3CE}, {0x1F3D4, 0x1F3DF}, - {0x1F3F1, 0x1F3F3}, {0x1F3F5, 0x1F3F7}, {0x1F43F, 0x1F43F}, - {0x1F441, 0x1F441}, {0x1F4FD, 0x1F4FE}, {0x1F53E, 0x1F54A}, - {0x1F54F, 0x1F54F}, {0x1F568, 0x1F579}, {0x1F57B, 0x1F594}, - {0x1F597, 0x1F5A3}, {0x1F5A5, 0x1F5FA}, {0x1F650, 0x1F67F}, - {0x1F6C6, 0x1F6CB}, {0x1F6CD, 0x1F6CF}, {0x1F6E0, 0x1F6EA}, - {0x1F6F0, 0x1F6F3}, {0x1F700, 0x1F773}, {0x1F780, 0x1F7D4}, - {0x1F800, 0x1F80B}, {0x1F810, 0x1F847}, {0x1F850, 0x1F859}, - {0x1F860, 0x1F887}, {0x1F890, 0x1F8AD}, {0xE0001, 0xE0001}, - {0xE0020, 0xE007F}, -} - -// Condition have flag EastAsianWidth whether the current locale is CJK or not. -type Condition struct { - EastAsianWidth bool -} - -// NewCondition return new instance of Condition which is current locale. -func NewCondition() *Condition { - return &Condition{EastAsianWidth} -} - -// RuneWidth returns the number of cells in r. -// See http://www.unicode.org/reports/tr11/ -func (c *Condition) RuneWidth(r rune) int { - switch { - case r < 0 || r > 0x10FFFF || - inTables(r, nonprint, combining, notassigned): - return 0 - case (c.EastAsianWidth && IsAmbiguousWidth(r)) || - inTables(r, doublewidth, emoji): - return 2 - default: - return 1 - } -} - -// StringWidth return width as you can see -func (c *Condition) StringWidth(s string) (width int) { - for _, r := range []rune(s) { - width += c.RuneWidth(r) - } - return width -} - -// Truncate return string truncated with w cells -func (c *Condition) Truncate(s string, w int, tail string) string { - if c.StringWidth(s) <= w { - return s - } - r := []rune(s) - tw := c.StringWidth(tail) - w -= tw - width := 0 - i := 0 - for ; i < len(r); i++ { - cw := c.RuneWidth(r[i]) - if width+cw > w { - break - } - width += cw - } - return string(r[0:i]) + tail -} - -// Wrap return string wrapped with w cells -func (c *Condition) Wrap(s string, w int) string { - width := 0 - out := "" - for _, r := range []rune(s) { - cw := RuneWidth(r) - if r == '\n' { - out += string(r) - width = 0 - continue - } else if width+cw > w { - out += "\n" - width = 0 - out += string(r) - width += cw - continue - } - out += string(r) - width += cw - } - return out -} - -// FillLeft return string filled in left by spaces in w cells -func (c *Condition) FillLeft(s string, w int) string { - width := c.StringWidth(s) - count := w - width - if count > 0 { - b := make([]byte, count) - for i := range b { - b[i] = ' ' - } - return string(b) + s - } - return s -} - -// FillRight return string filled in left by spaces in w cells -func (c *Condition) FillRight(s string, w int) string { - width := c.StringWidth(s) - count := w - width - if count > 0 { - b := make([]byte, count) - for i := range b { - b[i] = ' ' - } - return s + string(b) - } - return s -} - -// RuneWidth returns the number of cells in r. -// See http://www.unicode.org/reports/tr11/ -func RuneWidth(r rune) int { - return DefaultCondition.RuneWidth(r) -} - -// IsAmbiguousWidth returns whether is ambiguous width or not. -func IsAmbiguousWidth(r rune) bool { - return inTables(r, private, ambiguous) -} - -// IsNeutralWidth returns whether is neutral width or not. -func IsNeutralWidth(r rune) bool { - return inTable(r, neutral) -} - -// StringWidth return width as you can see -func StringWidth(s string) (width int) { - return DefaultCondition.StringWidth(s) -} - -// Truncate return string truncated with w cells -func Truncate(s string, w int, tail string) string { - return DefaultCondition.Truncate(s, w, tail) -} - -// Wrap return string wrapped with w cells -func Wrap(s string, w int) string { - return DefaultCondition.Wrap(s, w) -} - -// FillLeft return string filled in left by spaces in w cells -func FillLeft(s string, w int) string { - return DefaultCondition.FillLeft(s, w) -} - -// FillRight return string filled in left by spaces in w cells -func FillRight(s string, w int) string { - return DefaultCondition.FillRight(s, w) -} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_js.go b/vendor/github.com/mattn/go-runewidth/runewidth_js.go deleted file mode 100644 index 0ce32c5e7..000000000 --- a/vendor/github.com/mattn/go-runewidth/runewidth_js.go +++ /dev/null @@ -1,8 +0,0 @@ -// +build js - -package runewidth - -func IsEastAsian() bool { - // TODO: Implement this for the web. Detect east asian in a compatible way, and return true. - return false -} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_posix.go b/vendor/github.com/mattn/go-runewidth/runewidth_posix.go deleted file mode 100644 index c579e9a31..000000000 --- a/vendor/github.com/mattn/go-runewidth/runewidth_posix.go +++ /dev/null @@ -1,77 +0,0 @@ -// +build !windows,!js - -package runewidth - -import ( - "os" - "regexp" - "strings" -) - -var reLoc = regexp.MustCompile(`^[a-z][a-z][a-z]?(?:_[A-Z][A-Z])?\.(.+)`) - -var mblenTable = map[string]int{ - "utf-8": 6, - "utf8": 6, - "jis": 8, - "eucjp": 3, - "euckr": 2, - "euccn": 2, - "sjis": 2, - "cp932": 2, - "cp51932": 2, - "cp936": 2, - "cp949": 2, - "cp950": 2, - "big5": 2, - "gbk": 2, - "gb2312": 2, -} - -func isEastAsian(locale string) bool { - charset := strings.ToLower(locale) - r := reLoc.FindStringSubmatch(locale) - if len(r) == 2 { - charset = strings.ToLower(r[1]) - } - - if strings.HasSuffix(charset, "@cjk_narrow") { - return false - } - - for pos, b := range []byte(charset) { - if b == '@' { - charset = charset[:pos] - break - } - } - max := 1 - if m, ok := mblenTable[charset]; ok { - max = m - } - if max > 1 && (charset[0] != 'u' || - strings.HasPrefix(locale, "ja") || - strings.HasPrefix(locale, "ko") || - strings.HasPrefix(locale, "zh")) { - return true - } - return false -} - -// IsEastAsian return true if the current locale is CJK -func IsEastAsian() bool { - locale := os.Getenv("LC_CTYPE") - if locale == "" { - locale = os.Getenv("LANG") - } - - // ignore C locale - if locale == "POSIX" || locale == "C" { - return false - } - if len(locale) > 1 && locale[0] == 'C' && (locale[1] == '.' || locale[1] == '-') { - return false - } - - return isEastAsian(locale) -} diff --git a/vendor/github.com/mattn/go-runewidth/runewidth_windows.go b/vendor/github.com/mattn/go-runewidth/runewidth_windows.go deleted file mode 100644 index 0258876b9..000000000 --- a/vendor/github.com/mattn/go-runewidth/runewidth_windows.go +++ /dev/null @@ -1,25 +0,0 @@ -package runewidth - -import ( - "syscall" -) - -var ( - kernel32 = syscall.NewLazyDLL("kernel32") - procGetConsoleOutputCP = kernel32.NewProc("GetConsoleOutputCP") -) - -// IsEastAsian return true if the current locale is CJK -func IsEastAsian() bool { - r1, _, _ := procGetConsoleOutputCP.Call() - if r1 == 0 { - return false - } - - switch int(r1) { - case 932, 51932, 936, 949, 950: - return true - } - - return false -} diff --git a/vendor/github.com/magefile/mage/mg/LICENSE b/vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE similarity index 100% rename from vendor/github.com/magefile/mage/mg/LICENSE rename to vendor/github.com/matttproud/golang_protobuf_extensions/LICENSE diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE b/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE new file mode 100644 index 000000000..5d8cb5b72 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/NOTICE @@ -0,0 +1 @@ +Copyright 2012 Matt T. Proud (matt.proud@gmail.com) diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore new file mode 100644 index 000000000..e16fb946b --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/.gitignore @@ -0,0 +1 @@ +cover.dat diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/LICENSE b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/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. diff --git a/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile new file mode 100644 index 000000000..81be21437 --- /dev/null +++ b/vendor/github.com/matttproud/golang_protobuf_extensions/pbutil/Makefile @@ -0,0 +1,7 @@ +all: + +cover: + go test -cover -v -coverprofile=cover.dat ./... + go tool cover -func cover.dat + +.PHONY: cover diff --git a/vendor/github.com/minio/cli/LICENSE b/vendor/github.com/minio/cli/LICENSE deleted file mode 100644 index 42a597e29..000000000 --- a/vendor/github.com/minio/cli/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Jeremy Saenz & Contributors - -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/minio/cli/altsrc/altsrc.go b/vendor/github.com/minio/cli/altsrc/altsrc.go deleted file mode 100644 index ac34bf633..000000000 --- a/vendor/github.com/minio/cli/altsrc/altsrc.go +++ /dev/null @@ -1,3 +0,0 @@ -package altsrc - -//go:generate python ../generate-flag-types altsrc -i ../flag-types.json -o flag_generated.go diff --git a/vendor/github.com/minio/cli/altsrc/flag.go b/vendor/github.com/minio/cli/altsrc/flag.go deleted file mode 100644 index 84ef009a5..000000000 --- a/vendor/github.com/minio/cli/altsrc/flag.go +++ /dev/null @@ -1,261 +0,0 @@ -package altsrc - -import ( - "fmt" - "strconv" - "strings" - "syscall" - - "gopkg.in/urfave/cli.v1" -) - -// FlagInputSourceExtension is an extension interface of cli.Flag that -// allows a value to be set on the existing parsed flags. -type FlagInputSourceExtension interface { - cli.Flag - ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error -} - -// ApplyInputSourceValues iterates over all provided flags and -// executes ApplyInputSourceValue on flags implementing the -// FlagInputSourceExtension interface to initialize these flags -// to an alternate input source. -func ApplyInputSourceValues(context *cli.Context, inputSourceContext InputSourceContext, flags []cli.Flag) error { - for _, f := range flags { - inputSourceExtendedFlag, isType := f.(FlagInputSourceExtension) - if isType { - err := inputSourceExtendedFlag.ApplyInputSourceValue(context, inputSourceContext) - if err != nil { - return err - } - } - } - - return nil -} - -// InitInputSource is used to to setup an InputSourceContext on a cli.Command Before method. It will create a new -// input source based on the func provided. If there is no error it will then apply the new input source to any flags -// that are supported by the input source -func InitInputSource(flags []cli.Flag, createInputSource func() (InputSourceContext, error)) cli.BeforeFunc { - return func(context *cli.Context) error { - inputSource, err := createInputSource() - if err != nil { - return fmt.Errorf("Unable to create input source: inner error: \n'%v'", err.Error()) - } - - return ApplyInputSourceValues(context, inputSource, flags) - } -} - -// InitInputSourceWithContext is used to to setup an InputSourceContext on a cli.Command Before method. It will create a new -// input source based on the func provided with potentially using existing cli.Context values to initialize itself. If there is -// no error it will then apply the new input source to any flags that are supported by the input source -func InitInputSourceWithContext(flags []cli.Flag, createInputSource func(context *cli.Context) (InputSourceContext, error)) cli.BeforeFunc { - return func(context *cli.Context) error { - inputSource, err := createInputSource(context) - if err != nil { - return fmt.Errorf("Unable to create input source with context: inner error: \n'%v'", err.Error()) - } - - return ApplyInputSourceValues(context, inputSource, flags) - } -} - -// ApplyInputSourceValue applies a generic value to the flagSet if required -func (f *GenericFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !context.IsSet(f.Name) && !isEnvVarSet(f.EnvVar) { - value, err := isc.Generic(f.GenericFlag.Name) - if err != nil { - return err - } - if value != nil { - eachName(f.Name, func(name string) { - f.set.Set(f.Name, value.String()) - }) - } - } - } - - return nil -} - -// ApplyInputSourceValue applies a StringSlice value to the flagSet if required -func (f *StringSliceFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !context.IsSet(f.Name) && !isEnvVarSet(f.EnvVar) { - value, err := isc.StringSlice(f.StringSliceFlag.Name) - if err != nil { - return err - } - if value != nil { - var sliceValue cli.StringSlice = value - eachName(f.Name, func(name string) { - underlyingFlag := f.set.Lookup(f.Name) - if underlyingFlag != nil { - underlyingFlag.Value = &sliceValue - } - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a IntSlice value if required -func (f *IntSliceFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !context.IsSet(f.Name) && !isEnvVarSet(f.EnvVar) { - value, err := isc.IntSlice(f.IntSliceFlag.Name) - if err != nil { - return err - } - if value != nil { - var sliceValue cli.IntSlice = value - eachName(f.Name, func(name string) { - underlyingFlag := f.set.Lookup(f.Name) - if underlyingFlag != nil { - underlyingFlag.Value = &sliceValue - } - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a Bool value to the flagSet if required -func (f *BoolFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !context.IsSet(f.Name) && !isEnvVarSet(f.EnvVar) { - value, err := isc.Bool(f.BoolFlag.Name) - if err != nil { - return err - } - if value { - eachName(f.Name, func(name string) { - f.set.Set(f.Name, strconv.FormatBool(value)) - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a BoolT value to the flagSet if required -func (f *BoolTFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !context.IsSet(f.Name) && !isEnvVarSet(f.EnvVar) { - value, err := isc.BoolT(f.BoolTFlag.Name) - if err != nil { - return err - } - if !value { - eachName(f.Name, func(name string) { - f.set.Set(f.Name, strconv.FormatBool(value)) - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a String value to the flagSet if required -func (f *StringFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !(context.IsSet(f.Name) || isEnvVarSet(f.EnvVar)) { - value, err := isc.String(f.StringFlag.Name) - if err != nil { - return err - } - if value != "" { - eachName(f.Name, func(name string) { - f.set.Set(f.Name, value) - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a int value to the flagSet if required -func (f *IntFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !(context.IsSet(f.Name) || isEnvVarSet(f.EnvVar)) { - value, err := isc.Int(f.IntFlag.Name) - if err != nil { - return err - } - if value > 0 { - eachName(f.Name, func(name string) { - f.set.Set(f.Name, strconv.FormatInt(int64(value), 10)) - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a Duration value to the flagSet if required -func (f *DurationFlag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !(context.IsSet(f.Name) || isEnvVarSet(f.EnvVar)) { - value, err := isc.Duration(f.DurationFlag.Name) - if err != nil { - return err - } - if value > 0 { - eachName(f.Name, func(name string) { - f.set.Set(f.Name, value.String()) - }) - } - } - } - return nil -} - -// ApplyInputSourceValue applies a Float64 value to the flagSet if required -func (f *Float64Flag) ApplyInputSourceValue(context *cli.Context, isc InputSourceContext) error { - if f.set != nil { - if !(context.IsSet(f.Name) || isEnvVarSet(f.EnvVar)) { - value, err := isc.Float64(f.Float64Flag.Name) - if err != nil { - return err - } - if value > 0 { - floatStr := float64ToString(value) - eachName(f.Name, func(name string) { - f.set.Set(f.Name, floatStr) - }) - } - } - } - return nil -} - -func isEnvVarSet(envVars string) bool { - for _, envVar := range strings.Split(envVars, ",") { - envVar = strings.TrimSpace(envVar) - if _, ok := syscall.Getenv(envVar); ok { - // TODO: Can't use this for bools as - // set means that it was true or false based on - // Bool flag type, should work for other types - return true - } - } - - return false -} - -func float64ToString(f float64) string { - return fmt.Sprintf("%v", f) -} - -func eachName(longName string, fn func(string)) { - parts := strings.Split(longName, ",") - for _, name := range parts { - name = strings.Trim(name, " ") - fn(name) - } -} diff --git a/vendor/github.com/minio/cli/altsrc/flag_generated.go b/vendor/github.com/minio/cli/altsrc/flag_generated.go deleted file mode 100644 index 0aeb0b041..000000000 --- a/vendor/github.com/minio/cli/altsrc/flag_generated.go +++ /dev/null @@ -1,347 +0,0 @@ -package altsrc - -import ( - "flag" - - "gopkg.in/urfave/cli.v1" -) - -// WARNING: This file is generated! - -// BoolFlag is the flag type that wraps cli.BoolFlag to allow -// for other values to be specified -type BoolFlag struct { - cli.BoolFlag - set *flag.FlagSet -} - -// NewBoolFlag creates a new BoolFlag -func NewBoolFlag(fl cli.BoolFlag) *BoolFlag { - return &BoolFlag{BoolFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped BoolFlag.Apply -func (f *BoolFlag) Apply(set *flag.FlagSet) { - f.set = set - f.BoolFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped BoolFlag.ApplyWithError -func (f *BoolFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.BoolFlag.ApplyWithError(set) -} - -// BoolTFlag is the flag type that wraps cli.BoolTFlag to allow -// for other values to be specified -type BoolTFlag struct { - cli.BoolTFlag - set *flag.FlagSet -} - -// NewBoolTFlag creates a new BoolTFlag -func NewBoolTFlag(fl cli.BoolTFlag) *BoolTFlag { - return &BoolTFlag{BoolTFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped BoolTFlag.Apply -func (f *BoolTFlag) Apply(set *flag.FlagSet) { - f.set = set - f.BoolTFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped BoolTFlag.ApplyWithError -func (f *BoolTFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.BoolTFlag.ApplyWithError(set) -} - -// DurationFlag is the flag type that wraps cli.DurationFlag to allow -// for other values to be specified -type DurationFlag struct { - cli.DurationFlag - set *flag.FlagSet -} - -// NewDurationFlag creates a new DurationFlag -func NewDurationFlag(fl cli.DurationFlag) *DurationFlag { - return &DurationFlag{DurationFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped DurationFlag.Apply -func (f *DurationFlag) Apply(set *flag.FlagSet) { - f.set = set - f.DurationFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped DurationFlag.ApplyWithError -func (f *DurationFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.DurationFlag.ApplyWithError(set) -} - -// Float64Flag is the flag type that wraps cli.Float64Flag to allow -// for other values to be specified -type Float64Flag struct { - cli.Float64Flag - set *flag.FlagSet -} - -// NewFloat64Flag creates a new Float64Flag -func NewFloat64Flag(fl cli.Float64Flag) *Float64Flag { - return &Float64Flag{Float64Flag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped Float64Flag.Apply -func (f *Float64Flag) Apply(set *flag.FlagSet) { - f.set = set - f.Float64Flag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped Float64Flag.ApplyWithError -func (f *Float64Flag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.Float64Flag.ApplyWithError(set) -} - -// GenericFlag is the flag type that wraps cli.GenericFlag to allow -// for other values to be specified -type GenericFlag struct { - cli.GenericFlag - set *flag.FlagSet -} - -// NewGenericFlag creates a new GenericFlag -func NewGenericFlag(fl cli.GenericFlag) *GenericFlag { - return &GenericFlag{GenericFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped GenericFlag.Apply -func (f *GenericFlag) Apply(set *flag.FlagSet) { - f.set = set - f.GenericFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped GenericFlag.ApplyWithError -func (f *GenericFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.GenericFlag.ApplyWithError(set) -} - -// Int64Flag is the flag type that wraps cli.Int64Flag to allow -// for other values to be specified -type Int64Flag struct { - cli.Int64Flag - set *flag.FlagSet -} - -// NewInt64Flag creates a new Int64Flag -func NewInt64Flag(fl cli.Int64Flag) *Int64Flag { - return &Int64Flag{Int64Flag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped Int64Flag.Apply -func (f *Int64Flag) Apply(set *flag.FlagSet) { - f.set = set - f.Int64Flag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped Int64Flag.ApplyWithError -func (f *Int64Flag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.Int64Flag.ApplyWithError(set) -} - -// IntFlag is the flag type that wraps cli.IntFlag to allow -// for other values to be specified -type IntFlag struct { - cli.IntFlag - set *flag.FlagSet -} - -// NewIntFlag creates a new IntFlag -func NewIntFlag(fl cli.IntFlag) *IntFlag { - return &IntFlag{IntFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped IntFlag.Apply -func (f *IntFlag) Apply(set *flag.FlagSet) { - f.set = set - f.IntFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped IntFlag.ApplyWithError -func (f *IntFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.IntFlag.ApplyWithError(set) -} - -// IntSliceFlag is the flag type that wraps cli.IntSliceFlag to allow -// for other values to be specified -type IntSliceFlag struct { - cli.IntSliceFlag - set *flag.FlagSet -} - -// NewIntSliceFlag creates a new IntSliceFlag -func NewIntSliceFlag(fl cli.IntSliceFlag) *IntSliceFlag { - return &IntSliceFlag{IntSliceFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped IntSliceFlag.Apply -func (f *IntSliceFlag) Apply(set *flag.FlagSet) { - f.set = set - f.IntSliceFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped IntSliceFlag.ApplyWithError -func (f *IntSliceFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.IntSliceFlag.ApplyWithError(set) -} - -// Int64SliceFlag is the flag type that wraps cli.Int64SliceFlag to allow -// for other values to be specified -type Int64SliceFlag struct { - cli.Int64SliceFlag - set *flag.FlagSet -} - -// NewInt64SliceFlag creates a new Int64SliceFlag -func NewInt64SliceFlag(fl cli.Int64SliceFlag) *Int64SliceFlag { - return &Int64SliceFlag{Int64SliceFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped Int64SliceFlag.Apply -func (f *Int64SliceFlag) Apply(set *flag.FlagSet) { - f.set = set - f.Int64SliceFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped Int64SliceFlag.ApplyWithError -func (f *Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.Int64SliceFlag.ApplyWithError(set) -} - -// StringFlag is the flag type that wraps cli.StringFlag to allow -// for other values to be specified -type StringFlag struct { - cli.StringFlag - set *flag.FlagSet -} - -// NewStringFlag creates a new StringFlag -func NewStringFlag(fl cli.StringFlag) *StringFlag { - return &StringFlag{StringFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped StringFlag.Apply -func (f *StringFlag) Apply(set *flag.FlagSet) { - f.set = set - f.StringFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped StringFlag.ApplyWithError -func (f *StringFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.StringFlag.ApplyWithError(set) -} - -// StringSliceFlag is the flag type that wraps cli.StringSliceFlag to allow -// for other values to be specified -type StringSliceFlag struct { - cli.StringSliceFlag - set *flag.FlagSet -} - -// NewStringSliceFlag creates a new StringSliceFlag -func NewStringSliceFlag(fl cli.StringSliceFlag) *StringSliceFlag { - return &StringSliceFlag{StringSliceFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped StringSliceFlag.Apply -func (f *StringSliceFlag) Apply(set *flag.FlagSet) { - f.set = set - f.StringSliceFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped StringSliceFlag.ApplyWithError -func (f *StringSliceFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.StringSliceFlag.ApplyWithError(set) -} - -// Uint64Flag is the flag type that wraps cli.Uint64Flag to allow -// for other values to be specified -type Uint64Flag struct { - cli.Uint64Flag - set *flag.FlagSet -} - -// NewUint64Flag creates a new Uint64Flag -func NewUint64Flag(fl cli.Uint64Flag) *Uint64Flag { - return &Uint64Flag{Uint64Flag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped Uint64Flag.Apply -func (f *Uint64Flag) Apply(set *flag.FlagSet) { - f.set = set - f.Uint64Flag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped Uint64Flag.ApplyWithError -func (f *Uint64Flag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.Uint64Flag.ApplyWithError(set) -} - -// UintFlag is the flag type that wraps cli.UintFlag to allow -// for other values to be specified -type UintFlag struct { - cli.UintFlag - set *flag.FlagSet -} - -// NewUintFlag creates a new UintFlag -func NewUintFlag(fl cli.UintFlag) *UintFlag { - return &UintFlag{UintFlag: fl, set: nil} -} - -// Apply saves the flagSet for later usage calls, then calls the -// wrapped UintFlag.Apply -func (f *UintFlag) Apply(set *flag.FlagSet) { - f.set = set - f.UintFlag.Apply(set) -} - -// ApplyWithError saves the flagSet for later usage calls, then calls the -// wrapped UintFlag.ApplyWithError -func (f *UintFlag) ApplyWithError(set *flag.FlagSet) error { - f.set = set - return f.UintFlag.ApplyWithError(set) -} diff --git a/vendor/github.com/minio/cli/altsrc/input_source_context.go b/vendor/github.com/minio/cli/altsrc/input_source_context.go deleted file mode 100644 index 276dcda08..000000000 --- a/vendor/github.com/minio/cli/altsrc/input_source_context.go +++ /dev/null @@ -1,21 +0,0 @@ -package altsrc - -import ( - "time" - - "gopkg.in/urfave/cli.v1" -) - -// InputSourceContext is an interface used to allow -// other input sources to be implemented as needed. -type InputSourceContext interface { - Int(name string) (int, error) - Duration(name string) (time.Duration, error) - Float64(name string) (float64, error) - String(name string) (string, error) - StringSlice(name string) ([]string, error) - IntSlice(name string) ([]int, error) - Generic(name string) (cli.Generic, error) - Bool(name string) (bool, error) - BoolT(name string) (bool, error) -} diff --git a/vendor/github.com/minio/cli/altsrc/map_input_source.go b/vendor/github.com/minio/cli/altsrc/map_input_source.go deleted file mode 100644 index b3169e0ec..000000000 --- a/vendor/github.com/minio/cli/altsrc/map_input_source.go +++ /dev/null @@ -1,262 +0,0 @@ -package altsrc - -import ( - "fmt" - "reflect" - "strings" - "time" - - "gopkg.in/urfave/cli.v1" -) - -// MapInputSource implements InputSourceContext to return -// data from the map that is loaded. -type MapInputSource struct { - valueMap map[interface{}]interface{} -} - -// nestedVal checks if the name has '.' delimiters. -// If so, it tries to traverse the tree by the '.' delimited sections to find -// a nested value for the key. -func nestedVal(name string, tree map[interface{}]interface{}) (interface{}, bool) { - if sections := strings.Split(name, "."); len(sections) > 1 { - node := tree - for _, section := range sections[:len(sections)-1] { - if child, ok := node[section]; !ok { - return nil, false - } else { - if ctype, ok := child.(map[interface{}]interface{}); !ok { - return nil, false - } else { - node = ctype - } - } - } - if val, ok := node[sections[len(sections)-1]]; ok { - return val, true - } - } - return nil, false -} - -// Int returns an int from the map if it exists otherwise returns 0 -func (fsm *MapInputSource) Int(name string) (int, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(int) - if !isType { - return 0, incorrectTypeForFlagError(name, "int", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(int) - if !isType { - return 0, incorrectTypeForFlagError(name, "int", nestedGenericValue) - } - return otherValue, nil - } - - return 0, nil -} - -// Duration returns a duration from the map if it exists otherwise returns 0 -func (fsm *MapInputSource) Duration(name string) (time.Duration, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(time.Duration) - if !isType { - return 0, incorrectTypeForFlagError(name, "duration", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(time.Duration) - if !isType { - return 0, incorrectTypeForFlagError(name, "duration", nestedGenericValue) - } - return otherValue, nil - } - - return 0, nil -} - -// Float64 returns an float64 from the map if it exists otherwise returns 0 -func (fsm *MapInputSource) Float64(name string) (float64, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(float64) - if !isType { - return 0, incorrectTypeForFlagError(name, "float64", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(float64) - if !isType { - return 0, incorrectTypeForFlagError(name, "float64", nestedGenericValue) - } - return otherValue, nil - } - - return 0, nil -} - -// String returns a string from the map if it exists otherwise returns an empty string -func (fsm *MapInputSource) String(name string) (string, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(string) - if !isType { - return "", incorrectTypeForFlagError(name, "string", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(string) - if !isType { - return "", incorrectTypeForFlagError(name, "string", nestedGenericValue) - } - return otherValue, nil - } - - return "", nil -} - -// StringSlice returns an []string from the map if it exists otherwise returns nil -func (fsm *MapInputSource) StringSlice(name string) ([]string, error) { - otherGenericValue, exists := fsm.valueMap[name] - if !exists { - otherGenericValue, exists = nestedVal(name, fsm.valueMap) - if !exists { - return nil, nil - } - } - - otherValue, isType := otherGenericValue.([]interface{}) - if !isType { - return nil, incorrectTypeForFlagError(name, "[]interface{}", otherGenericValue) - } - - var stringSlice = make([]string, 0, len(otherValue)) - for i, v := range otherValue { - stringValue, isType := v.(string) - - if !isType { - return nil, incorrectTypeForFlagError(fmt.Sprintf("%s[%d]", name, i), "string", v) - } - - stringSlice = append(stringSlice, stringValue) - } - - return stringSlice, nil -} - -// IntSlice returns an []int from the map if it exists otherwise returns nil -func (fsm *MapInputSource) IntSlice(name string) ([]int, error) { - otherGenericValue, exists := fsm.valueMap[name] - if !exists { - otherGenericValue, exists = nestedVal(name, fsm.valueMap) - if !exists { - return nil, nil - } - } - - otherValue, isType := otherGenericValue.([]interface{}) - if !isType { - return nil, incorrectTypeForFlagError(name, "[]interface{}", otherGenericValue) - } - - var intSlice = make([]int, 0, len(otherValue)) - for i, v := range otherValue { - intValue, isType := v.(int) - - if !isType { - return nil, incorrectTypeForFlagError(fmt.Sprintf("%s[%d]", name, i), "int", v) - } - - intSlice = append(intSlice, intValue) - } - - return intSlice, nil -} - -// Generic returns an cli.Generic from the map if it exists otherwise returns nil -func (fsm *MapInputSource) Generic(name string) (cli.Generic, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(cli.Generic) - if !isType { - return nil, incorrectTypeForFlagError(name, "cli.Generic", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(cli.Generic) - if !isType { - return nil, incorrectTypeForFlagError(name, "cli.Generic", nestedGenericValue) - } - return otherValue, nil - } - - return nil, nil -} - -// Bool returns an bool from the map otherwise returns false -func (fsm *MapInputSource) Bool(name string) (bool, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(bool) - if !isType { - return false, incorrectTypeForFlagError(name, "bool", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(bool) - if !isType { - return false, incorrectTypeForFlagError(name, "bool", nestedGenericValue) - } - return otherValue, nil - } - - return false, nil -} - -// BoolT returns an bool from the map otherwise returns true -func (fsm *MapInputSource) BoolT(name string) (bool, error) { - otherGenericValue, exists := fsm.valueMap[name] - if exists { - otherValue, isType := otherGenericValue.(bool) - if !isType { - return true, incorrectTypeForFlagError(name, "bool", otherGenericValue) - } - return otherValue, nil - } - nestedGenericValue, exists := nestedVal(name, fsm.valueMap) - if exists { - otherValue, isType := nestedGenericValue.(bool) - if !isType { - return true, incorrectTypeForFlagError(name, "bool", nestedGenericValue) - } - return otherValue, nil - } - - return true, nil -} - -func incorrectTypeForFlagError(name, expectedTypeName string, value interface{}) error { - valueType := reflect.TypeOf(value) - valueTypeName := "" - if valueType != nil { - valueTypeName = valueType.Name() - } - - return fmt.Errorf("Mismatched type for flag '%s'. Expected '%s' but actual is '%s'", name, expectedTypeName, valueTypeName) -} diff --git a/vendor/github.com/minio/cli/altsrc/toml_file_loader.go b/vendor/github.com/minio/cli/altsrc/toml_file_loader.go deleted file mode 100644 index 37870fcbe..000000000 --- a/vendor/github.com/minio/cli/altsrc/toml_file_loader.go +++ /dev/null @@ -1,113 +0,0 @@ -// Disabling building of toml support in cases where golang is 1.0 or 1.1 -// as the encoding library is not implemented or supported. - -// +build go1.2 - -package altsrc - -import ( - "fmt" - "reflect" - - "github.com/BurntSushi/toml" - "gopkg.in/urfave/cli.v1" -) - -type tomlMap struct { - Map map[interface{}]interface{} -} - -func unmarshalMap(i interface{}) (ret map[interface{}]interface{}, err error) { - ret = make(map[interface{}]interface{}) - m := i.(map[string]interface{}) - for key, val := range m { - v := reflect.ValueOf(val) - switch v.Kind() { - case reflect.Bool: - ret[key] = val.(bool) - case reflect.String: - ret[key] = val.(string) - case reflect.Int: - ret[key] = int(val.(int)) - case reflect.Int8: - ret[key] = int(val.(int8)) - case reflect.Int16: - ret[key] = int(val.(int16)) - case reflect.Int32: - ret[key] = int(val.(int32)) - case reflect.Int64: - ret[key] = int(val.(int64)) - case reflect.Uint: - ret[key] = int(val.(uint)) - case reflect.Uint8: - ret[key] = int(val.(uint8)) - case reflect.Uint16: - ret[key] = int(val.(uint16)) - case reflect.Uint32: - ret[key] = int(val.(uint32)) - case reflect.Uint64: - ret[key] = int(val.(uint64)) - case reflect.Float32: - ret[key] = float64(val.(float32)) - case reflect.Float64: - ret[key] = float64(val.(float64)) - case reflect.Map: - if tmp, err := unmarshalMap(val); err == nil { - ret[key] = tmp - } else { - return nil, err - } - case reflect.Array, reflect.Slice: - ret[key] = val.([]interface{}) - default: - return nil, fmt.Errorf("Unsupported: type = %#v", v.Kind()) - } - } - return ret, nil -} - -func (self *tomlMap) UnmarshalTOML(i interface{}) error { - if tmp, err := unmarshalMap(i); err == nil { - self.Map = tmp - } else { - return err - } - return nil -} - -type tomlSourceContext struct { - FilePath string -} - -// NewTomlSourceFromFile creates a new TOML InputSourceContext from a filepath. -func NewTomlSourceFromFile(file string) (InputSourceContext, error) { - tsc := &tomlSourceContext{FilePath: file} - var results tomlMap = tomlMap{} - if err := readCommandToml(tsc.FilePath, &results); err != nil { - return nil, fmt.Errorf("Unable to load TOML file '%s': inner error: \n'%v'", tsc.FilePath, err.Error()) - } - return &MapInputSource{valueMap: results.Map}, nil -} - -// NewTomlSourceFromFlagFunc creates a new TOML InputSourceContext from a provided flag name and source context. -func NewTomlSourceFromFlagFunc(flagFileName string) func(context *cli.Context) (InputSourceContext, error) { - return func(context *cli.Context) (InputSourceContext, error) { - filePath := context.String(flagFileName) - return NewTomlSourceFromFile(filePath) - } -} - -func readCommandToml(filePath string, container interface{}) (err error) { - b, err := loadDataFrom(filePath) - if err != nil { - return err - } - - err = toml.Unmarshal(b, container) - if err != nil { - return err - } - - err = nil - return -} diff --git a/vendor/github.com/minio/cli/altsrc/yaml_file_loader.go b/vendor/github.com/minio/cli/altsrc/yaml_file_loader.go deleted file mode 100644 index dd808d523..000000000 --- a/vendor/github.com/minio/cli/altsrc/yaml_file_loader.go +++ /dev/null @@ -1,92 +0,0 @@ -// Disabling building of yaml support in cases where golang is 1.0 or 1.1 -// as the encoding library is not implemented or supported. - -// +build go1.2 - -package altsrc - -import ( - "fmt" - "io/ioutil" - "net/http" - "net/url" - "os" - "runtime" - "strings" - - "gopkg.in/urfave/cli.v1" - - "gopkg.in/yaml.v2" -) - -type yamlSourceContext struct { - FilePath string -} - -// NewYamlSourceFromFile creates a new Yaml InputSourceContext from a filepath. -func NewYamlSourceFromFile(file string) (InputSourceContext, error) { - ysc := &yamlSourceContext{FilePath: file} - var results map[interface{}]interface{} - err := readCommandYaml(ysc.FilePath, &results) - if err != nil { - return nil, fmt.Errorf("Unable to load Yaml file '%s': inner error: \n'%v'", ysc.FilePath, err.Error()) - } - - return &MapInputSource{valueMap: results}, nil -} - -// NewYamlSourceFromFlagFunc creates a new Yaml InputSourceContext from a provided flag name and source context. -func NewYamlSourceFromFlagFunc(flagFileName string) func(context *cli.Context) (InputSourceContext, error) { - return func(context *cli.Context) (InputSourceContext, error) { - filePath := context.String(flagFileName) - return NewYamlSourceFromFile(filePath) - } -} - -func readCommandYaml(filePath string, container interface{}) (err error) { - b, err := loadDataFrom(filePath) - if err != nil { - return err - } - - err = yaml.Unmarshal(b, container) - if err != nil { - return err - } - - err = nil - return -} - -func loadDataFrom(filePath string) ([]byte, error) { - u, err := url.Parse(filePath) - if err != nil { - return nil, err - } - - if u.Host != "" { // i have a host, now do i support the scheme? - switch u.Scheme { - case "http", "https": - res, err := http.Get(filePath) - if err != nil { - return nil, err - } - return ioutil.ReadAll(res.Body) - default: - return nil, fmt.Errorf("scheme of %s is unsupported", filePath) - } - } else if u.Path != "" { // i dont have a host, but I have a path. I am a local file. - if _, notFoundFileErr := os.Stat(filePath); notFoundFileErr != nil { - return nil, fmt.Errorf("Cannot read from file: '%s' because it does not exist.", filePath) - } - return ioutil.ReadFile(filePath) - } else if runtime.GOOS == "windows" && strings.Contains(u.String(), "\\") { - // on Windows systems u.Path is always empty, so we need to check the string directly. - if _, notFoundFileErr := os.Stat(filePath); notFoundFileErr != nil { - return nil, fmt.Errorf("Cannot read from file: '%s' because it does not exist.", filePath) - } - return ioutil.ReadFile(filePath) - } else { - return nil, fmt.Errorf("unable to determine how to load from path %s", filePath) - } -} diff --git a/vendor/github.com/minio/cli/app.go b/vendor/github.com/minio/cli/app.go deleted file mode 100644 index ce5f89f9a..000000000 --- a/vendor/github.com/minio/cli/app.go +++ /dev/null @@ -1,504 +0,0 @@ -package cli - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "sort" - "time" -) - -var ( - changeLogURL = "https://github.com/urfave/cli/blob/master/CHANGELOG.md" - appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL) - runAndExitOnErrorDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-runandexitonerror", changeLogURL) - - contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you." - - errInvalidActionType = NewExitError("ERROR invalid Action type. "+ - fmt.Sprintf("Must be `func(*Context`)` or `func(*Context) error). %s", contactSysadmin)+ - fmt.Sprintf("See %s", appActionDeprecationURL), 2) -) - -// App is the main structure of a cli application. It is recommended that -// an app be created with the cli.NewApp() function -type App struct { - // The name of the program. Defaults to path.Base(os.Args[0]) - Name string - // Full name of command for help, defaults to Name - HelpName string - // Description of the program. - Usage string - // Text to override the USAGE section of help - UsageText string - // Description of the program argument format. - ArgsUsage string - // Version of the program - Version string - // Description of the program - Description string - // List of commands to execute - Commands []Command - // List of flags to parse - Flags []Flag - // Boolean to enable bash completion commands - EnableBashCompletion bool - // Boolean to hide built-in help flag - HideHelp bool - // Boolean to hide built-in help command - HideHelpCommand bool - // Boolean to hide built-in version flag and the VERSION section of help - HideVersion bool - // Populate on app startup, only gettable through method Categories() - categories CommandCategories - // An action to execute when the bash-completion flag is set - BashComplete BashCompleteFunc - // An action to execute before any subcommands are run, but after the context is ready - // If a non-nil error is returned, no subcommands are run - Before BeforeFunc - // An action to execute after any subcommands are run, but after the subcommand has finished - // It is run even if Action() panics - After AfterFunc - - // The action to execute when no subcommands are specified - // Expects a `cli.ActionFunc` but will accept the *deprecated* signature of `func(*cli.Context) {}` - // *Note*: support for the deprecated `Action` signature will be removed in a future version - Action interface{} - - // Execute this function if the proper command cannot be found - CommandNotFound CommandNotFoundFunc - // Execute this function if an usage error occurs - OnUsageError OnUsageErrorFunc - // Compilation date - Compiled time.Time - // List of all authors who contributed - Authors []Author - // Copyright of the binary if any - Copyright string - // Name of Author (Note: Use App.Authors, this is deprecated) - Author string - // Email of Author (Note: Use App.Authors, this is deprecated) - Email string - // Writer writer to write output to - Writer io.Writer - // ErrWriter writes error output - ErrWriter io.Writer - // Other custom info - Metadata map[string]interface{} - // Carries a function which returns app specific info. - ExtraInfo func() map[string]string - // CustomAppHelpTemplate the text template for app help topic. - // cli.go uses text/template to render templates. You can - // render custom help text by setting this variable. - CustomAppHelpTemplate string - - didSetup bool -} - -// Tries to find out when this binary was compiled. -// Returns the current time if it fails to find it. -func compileTime() time.Time { - info, err := os.Stat(os.Args[0]) - if err != nil { - return time.Now() - } - return info.ModTime() -} - -// NewApp creates a new cli Application with some reasonable defaults for Name, -// Usage, Version and Action. -func NewApp() *App { - return &App{ - Name: filepath.Base(os.Args[0]), - HelpName: filepath.Base(os.Args[0]), - Usage: "A new cli application", - UsageText: "", - Version: "0.0.0", - BashComplete: DefaultAppComplete, - Action: helpCommand.Action, - Compiled: compileTime(), - Writer: os.Stdout, - } -} - -// Setup runs initialization code to ensure all data structures are ready for -// `Run` or inspection prior to `Run`. It is internally called by `Run`, but -// will return early if setup has already happened. -func (a *App) Setup() { - if a.didSetup { - return - } - - a.didSetup = true - - if a.Author != "" || a.Email != "" { - a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email}) - } - - newCmds := []Command{} - for _, c := range a.Commands { - if c.HelpName == "" { - c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name) - } - newCmds = append(newCmds, c) - } - a.Commands = newCmds - - if a.Command(helpCommand.Name) == nil { - if !a.HideHelpCommand { - a.Commands = append(a.Commands, helpCommand) - } - if !a.HideHelp && (HelpFlag != BoolFlag{}) { - a.appendFlag(HelpFlag) - } - } - - if !a.HideVersion { - a.appendFlag(VersionFlag) - } - - a.categories = CommandCategories{} - for _, command := range a.Commands { - a.categories = a.categories.AddCommand(command.Category, command) - } - sort.Sort(a.categories) - - if a.Metadata == nil { - a.Metadata = make(map[string]interface{}) - } - - if a.Writer == nil { - a.Writer = os.Stdout - } -} - -// Run is the entry point to the cli app. Parses the arguments slice and routes -// to the proper flag/args combination -func (a *App) Run(arguments []string) (err error) { - a.Setup() - - // handle the completion flag separately from the flagset since - // completion could be attempted after a flag, but before its value was put - // on the command line. this causes the flagset to interpret the completion - // flag name as the value of the flag before it which is undesirable - // note that we can only do this because the shell autocomplete function - // always appends the completion flag at the end of the command - shellComplete, arguments := checkShellCompleteFlag(a, arguments) - - // parse flags - set, err := flagSet(a.Name, a.Flags) - if err != nil { - return err - } - - set.SetOutput(ioutil.Discard) - err = set.Parse(arguments[1:]) - nerr := normalizeFlags(a.Flags, set) - context := NewContext(a, set, nil) - if nerr != nil { - fmt.Fprintln(a.Writer, nerr) - ShowAppHelp(context) - return nerr - } - context.shellComplete = shellComplete - - if checkCompletions(context) { - return nil - } - - if err != nil { - if a.OnUsageError != nil { - err := a.OnUsageError(context, err, false) - HandleExitCoder(err) - return err - } - fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error()) - ShowAppHelp(context) - return err - } - - if !a.HideHelp && checkHelp(context) { - ShowAppHelp(context) - return nil - } - - if !a.HideVersion && checkVersion(context) { - ShowVersion(context) - return nil - } - - if a.After != nil { - defer func() { - if afterErr := a.After(context); afterErr != nil { - if err != nil { - err = NewMultiError(err, afterErr) - } else { - err = afterErr - } - } - }() - } - - if a.Before != nil { - beforeErr := a.Before(context) - if beforeErr != nil { - fmt.Fprintf(a.Writer, "%v\n\n", beforeErr) - ShowAppHelp(context) - HandleExitCoder(beforeErr) - err = beforeErr - return err - } - } - - args := context.Args() - if args.Present() { - name := args.First() - c := a.Command(name) - if c != nil { - return c.Run(context) - } - } - - if a.Action == nil { - a.Action = helpCommand.Action - } - - // Run default Action - err = HandleAction(a.Action, context) - - HandleExitCoder(err) - return err -} - -// RunAndExitOnError calls .Run() and exits non-zero if an error was returned -// -// Deprecated: instead you should return an error that fulfills cli.ExitCoder -// to cli.App.Run. This will cause the application to exit with the given eror -// code in the cli.ExitCoder -func (a *App) RunAndExitOnError() { - if err := a.Run(os.Args); err != nil { - fmt.Fprintln(a.errWriter(), err) - OsExiter(1) - } -} - -// RunAsSubcommand invokes the subcommand given the context, parses ctx.Args() to -// generate command-specific flags -func (a *App) RunAsSubcommand(ctx *Context) (err error) { - // append help to commands - if len(a.Commands) > 0 { - if a.Command(helpCommand.Name) == nil { - if !a.HideHelpCommand { - a.Commands = append(a.Commands, helpCommand) - } - if !a.HideHelp && (HelpFlag != BoolFlag{}) { - a.appendFlag(HelpFlag) - } - } - } - - newCmds := []Command{} - for _, c := range a.Commands { - if c.HelpName == "" { - c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name) - } - newCmds = append(newCmds, c) - } - a.Commands = newCmds - - // parse flags - set, err := flagSet(a.Name, a.Flags) - if err != nil { - return err - } - - set.SetOutput(ioutil.Discard) - err = set.Parse(ctx.Args().Tail()) - nerr := normalizeFlags(a.Flags, set) - context := NewContext(a, set, ctx) - - if nerr != nil { - fmt.Fprintln(a.Writer, nerr) - fmt.Fprintln(a.Writer) - if len(a.Commands) > 0 { - ShowSubcommandHelp(context) - } else { - ShowCommandHelp(ctx, context.Args().First()) - } - return nerr - } - - if checkCompletions(context) { - return nil - } - - if err != nil { - if a.OnUsageError != nil { - err = a.OnUsageError(context, err, true) - HandleExitCoder(err) - return err - } - fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error()) - ShowSubcommandHelp(context) - return err - } - - if len(a.Commands) > 0 { - if checkSubcommandHelp(context) { - return nil - } - } else { - if checkCommandHelp(ctx, context.Args().First()) { - return nil - } - } - - if a.After != nil { - defer func() { - afterErr := a.After(context) - if afterErr != nil { - HandleExitCoder(err) - if err != nil { - err = NewMultiError(err, afterErr) - } else { - err = afterErr - } - } - }() - } - - if a.Before != nil { - beforeErr := a.Before(context) - if beforeErr != nil { - HandleExitCoder(beforeErr) - err = beforeErr - return err - } - } - - args := context.Args() - if args.Present() { - name := args.First() - c := a.Command(name) - if c != nil { - return c.Run(context) - } - } - - // Run default Action - err = HandleAction(a.Action, context) - - HandleExitCoder(err) - return err -} - -// Command returns the named command on App. Returns nil if the command does not exist -func (a *App) Command(name string) *Command { - for _, c := range a.Commands { - if c.HasName(name) { - return &c - } - } - - return nil -} - -// Categories returns a slice containing all the categories with the commands they contain -func (a *App) Categories() CommandCategories { - return a.categories -} - -// VisibleCategories returns a slice of categories and commands that are -// Hidden=false -func (a *App) VisibleCategories() []*CommandCategory { - ret := []*CommandCategory{} - for _, category := range a.categories { - if visible := func() *CommandCategory { - for _, command := range category.Commands { - if !command.Hidden { - return category - } - } - return nil - }(); visible != nil { - ret = append(ret, visible) - } - } - return ret -} - -// VisibleCommands returns a slice of the Commands with Hidden=false -func (a *App) VisibleCommands() []Command { - ret := []Command{} - for _, command := range a.Commands { - if !command.Hidden { - ret = append(ret, command) - } - } - return ret -} - -// VisibleFlags returns a slice of the Flags with Hidden=false -func (a *App) VisibleFlags() []Flag { - return visibleFlags(a.Flags) -} - -func (a *App) hasFlag(flag Flag) bool { - for _, f := range a.Flags { - if flag == f { - return true - } - } - - return false -} - -func (a *App) errWriter() io.Writer { - - // When the app ErrWriter is nil use the package level one. - if a.ErrWriter == nil { - return ErrWriter - } - - return a.ErrWriter -} - -func (a *App) appendFlag(flag Flag) { - if !a.hasFlag(flag) { - a.Flags = append(a.Flags, flag) - } -} - -// Author represents someone who has contributed to a cli project. -type Author struct { - Name string // The Authors name - Email string // The Authors email -} - -// String makes Author comply to the Stringer interface, to allow an easy print in the templating process -func (a Author) String() string { - e := "" - if a.Email != "" { - e = " <" + a.Email + ">" - } - - return fmt.Sprintf("%v%v", a.Name, e) -} - -// HandleAction attempts to figure out which Action signature was used. If -// it's an ActionFunc or a func with the legacy signature for Action, the func -// is run! -func HandleAction(action interface{}, context *Context) (err error) { - if a, ok := action.(ActionFunc); ok { - return a(context) - } else if a, ok := action.(func(*Context) error); ok { - return a(context) - } else if a, ok := action.(func(*Context)); ok { // deprecated function signature - a(context) - return nil - } else { - return errInvalidActionType - } -} diff --git a/vendor/github.com/minio/cli/category.go b/vendor/github.com/minio/cli/category.go deleted file mode 100644 index 1a6055023..000000000 --- a/vendor/github.com/minio/cli/category.go +++ /dev/null @@ -1,44 +0,0 @@ -package cli - -// CommandCategories is a slice of *CommandCategory. -type CommandCategories []*CommandCategory - -// CommandCategory is a category containing commands. -type CommandCategory struct { - Name string - Commands Commands -} - -func (c CommandCategories) Less(i, j int) bool { - return c[i].Name < c[j].Name -} - -func (c CommandCategories) Len() int { - return len(c) -} - -func (c CommandCategories) Swap(i, j int) { - c[i], c[j] = c[j], c[i] -} - -// AddCommand adds a command to a category. -func (c CommandCategories) AddCommand(category string, command Command) CommandCategories { - for _, commandCategory := range c { - if commandCategory.Name == category { - commandCategory.Commands = append(commandCategory.Commands, command) - return c - } - } - return append(c, &CommandCategory{Name: category, Commands: []Command{command}}) -} - -// VisibleCommands returns a slice of the Commands with Hidden=false -func (c *CommandCategory) VisibleCommands() []Command { - ret := []Command{} - for _, command := range c.Commands { - if !command.Hidden { - ret = append(ret, command) - } - } - return ret -} diff --git a/vendor/github.com/minio/cli/cli.go b/vendor/github.com/minio/cli/cli.go deleted file mode 100644 index 74fd101f4..000000000 --- a/vendor/github.com/minio/cli/cli.go +++ /dev/null @@ -1,21 +0,0 @@ -// Package cli provides a minimal framework for creating and organizing command line -// Go applications. cli is designed to be easy to understand and write, the most simple -// cli application can be written as follows: -// func main() { -// cli.NewApp().Run(os.Args) -// } -// -// Of course this application does not do much, so let's make this an actual application: -// func main() { -// app := cli.NewApp() -// app.Name = "greet" -// app.Usage = "say a greeting" -// app.Action = func(c *cli.Context) error { -// println("Greetings") -// } -// -// app.Run(os.Args) -// } -package cli - -//go:generate python ./generate-flag-types cli -i flag-types.json -o flag_generated.go diff --git a/vendor/github.com/minio/cli/command.go b/vendor/github.com/minio/cli/command.go deleted file mode 100644 index 908a2ef27..000000000 --- a/vendor/github.com/minio/cli/command.go +++ /dev/null @@ -1,316 +0,0 @@ -package cli - -import ( - "fmt" - "io/ioutil" - "sort" - "strings" -) - -// Command is a subcommand for a cli.App. -type Command struct { - // The name of the command - Name string - // short name of the command. Typically one character (deprecated, use `Aliases`) - ShortName string - // A list of aliases for the command - Aliases []string - // A short description of the usage of this command - Usage string - // Custom text to show on USAGE section of help - UsageText string - // A longer explanation of how the command works - Description string - // A short description of the arguments of this command - ArgsUsage string - // The category the command is part of - Category string - // The function to call when checking for bash command completions - BashComplete BashCompleteFunc - // An action to execute before any sub-subcommands are run, but after the context is ready - // If a non-nil error is returned, no sub-subcommands are run - Before BeforeFunc - // An action to execute after any subcommands are run, but after the subcommand has finished - // It is run even if Action() panics - After AfterFunc - // The function to call when this command is invoked - Action interface{} - // TODO: replace `Action: interface{}` with `Action: ActionFunc` once some kind - // of deprecation period has passed, maybe? - - // Execute this function if a usage error occurs. - OnUsageError OnUsageErrorFunc - // List of child commands - Subcommands Commands - // List of flags to parse - Flags []Flag - // Treat all flags as normal arguments if true - SkipFlagParsing bool - // Skip argument reordering which attempts to move flags before arguments, - // but only works if all flags appear after all arguments. This behavior was - // removed n version 2 since it only works under specific conditions so we - // backport here by exposing it as an option for compatibility. - SkipArgReorder bool - // Boolean to hide built-in help flag - HideHelp bool - // Boolean to hide built-in help command - HideHelpCommand bool - // Boolean to hide this command from help or completion - Hidden bool - - // Full name of command for help, defaults to full command name, including parent commands. - HelpName string - commandNamePath []string - - // CustomHelpTemplate the text template for the command help topic. - // cli.go uses text/template to render templates. You can - // render custom help text by setting this variable. - CustomHelpTemplate string -} - -type CommandsByName []Command - -func (c CommandsByName) Len() int { - return len(c) -} - -func (c CommandsByName) Less(i, j int) bool { - return c[i].Name < c[j].Name -} - -func (c CommandsByName) Swap(i, j int) { - c[i], c[j] = c[j], c[i] -} - -// FullName returns the full name of the command. -// For subcommands this ensures that parent commands are part of the command path -func (c Command) FullName() string { - if c.commandNamePath == nil { - return c.Name - } - return strings.Join(c.commandNamePath, " ") -} - -// Commands is a slice of Command -type Commands []Command - -// Run invokes the command given the context, parses ctx.Args() to generate command-specific flags -func (c Command) Run(ctx *Context) (err error) { - if len(c.Subcommands) > 0 { - return c.startApp(ctx) - } - - if !c.HideHelp && (HelpFlag != BoolFlag{}) { - // append help to flags - c.Flags = append( - c.Flags, - HelpFlag, - ) - } - - set, err := flagSet(c.Name, c.Flags) - if err != nil { - return err - } - set.SetOutput(ioutil.Discard) - - if c.SkipFlagParsing { - err = set.Parse(append([]string{"--"}, ctx.Args().Tail()...)) - } else if !c.SkipArgReorder { - firstFlagIndex := -1 - terminatorIndex := -1 - for index, arg := range ctx.Args() { - if arg == "--" { - terminatorIndex = index - break - } else if arg == "-" { - // Do nothing. A dash alone is not really a flag. - continue - } else if strings.HasPrefix(arg, "-") && firstFlagIndex == -1 { - firstFlagIndex = index - } - } - - if firstFlagIndex > -1 { - args := ctx.Args() - regularArgs := make([]string, len(args[1:firstFlagIndex])) - copy(regularArgs, args[1:firstFlagIndex]) - - var flagArgs []string - if terminatorIndex > -1 { - flagArgs = args[firstFlagIndex:terminatorIndex] - regularArgs = append(regularArgs, args[terminatorIndex:]...) - } else { - flagArgs = args[firstFlagIndex:] - } - - err = set.Parse(append(flagArgs, regularArgs...)) - } else { - err = set.Parse(ctx.Args().Tail()) - } - } else { - err = set.Parse(ctx.Args().Tail()) - } - - nerr := normalizeFlags(c.Flags, set) - if nerr != nil { - fmt.Fprintln(ctx.App.Writer, nerr) - fmt.Fprintln(ctx.App.Writer) - ShowCommandHelp(ctx, c.Name) - return nerr - } - - context := NewContext(ctx.App, set, ctx) - context.Command = c - if checkCommandCompletions(context, c.Name) { - return nil - } - - if err != nil { - if c.OnUsageError != nil { - err := c.OnUsageError(context, err, false) - HandleExitCoder(err) - return err - } - fmt.Fprintln(context.App.Writer, "Incorrect Usage:", err.Error()) - fmt.Fprintln(context.App.Writer) - ShowCommandHelp(context, c.Name) - return err - } - - if checkCommandHelp(context, c.Name) { - return nil - } - - if c.After != nil { - defer func() { - afterErr := c.After(context) - if afterErr != nil { - HandleExitCoder(err) - if err != nil { - err = NewMultiError(err, afterErr) - } else { - err = afterErr - } - } - }() - } - - if c.Before != nil { - err = c.Before(context) - if err != nil { - fmt.Fprintln(context.App.Writer, err) - fmt.Fprintln(context.App.Writer) - ShowCommandHelp(context, c.Name) - HandleExitCoder(err) - return err - } - } - - if c.Action == nil { - c.Action = helpSubcommand.Action - } - - err = HandleAction(c.Action, context) - - if err != nil { - HandleExitCoder(err) - } - return err -} - -// Names returns the names including short names and aliases. -func (c Command) Names() []string { - names := []string{c.Name} - - if c.ShortName != "" { - names = append(names, c.ShortName) - } - - return append(names, c.Aliases...) -} - -// HasName returns true if Command.Name or Command.ShortName matches given name -func (c Command) HasName(name string) bool { - for _, n := range c.Names() { - if n == name { - return true - } - } - return false -} - -func (c Command) startApp(ctx *Context) error { - app := NewApp() - app.Metadata = ctx.App.Metadata - // set the name and usage - app.Name = fmt.Sprintf("%s %s", ctx.App.Name, c.Name) - if c.HelpName == "" { - app.HelpName = c.HelpName - } else { - app.HelpName = app.Name - } - - app.Usage = c.Usage - app.Description = c.Description - app.ArgsUsage = c.ArgsUsage - - // set CommandNotFound - app.CommandNotFound = ctx.App.CommandNotFound - app.CustomAppHelpTemplate = c.CustomHelpTemplate - - // set the flags and commands - app.Commands = c.Subcommands - app.Flags = c.Flags - app.HideHelp = c.HideHelp - app.HideHelpCommand = c.HideHelpCommand - - app.Version = ctx.App.Version - app.HideVersion = ctx.App.HideVersion - app.Compiled = ctx.App.Compiled - app.Author = ctx.App.Author - app.Email = ctx.App.Email - app.Writer = ctx.App.Writer - app.ErrWriter = ctx.App.ErrWriter - - app.categories = CommandCategories{} - for _, command := range c.Subcommands { - app.categories = app.categories.AddCommand(command.Category, command) - } - - sort.Sort(app.categories) - - // bash completion - app.EnableBashCompletion = ctx.App.EnableBashCompletion - if c.BashComplete != nil { - app.BashComplete = c.BashComplete - } - - // set the actions - app.Before = c.Before - app.After = c.After - if c.Action != nil { - app.Action = c.Action - } else { - app.Action = helpSubcommand.Action - } - - for index, cc := range app.Commands { - app.Commands[index].commandNamePath = []string{c.Name, cc.Name} - } - - return app.RunAsSubcommand(ctx) -} - -// VisibleFlags returns a slice of the Flags with Hidden=false -func (c Command) VisibleFlags() []Flag { - flags := c.Flags - if !c.HideHelp && (HelpFlag != BoolFlag{}) { - // append help to flags - flags = append( - flags, - HelpFlag, - ) - } - return visibleFlags(flags) -} diff --git a/vendor/github.com/minio/cli/context.go b/vendor/github.com/minio/cli/context.go deleted file mode 100644 index cb89e92a0..000000000 --- a/vendor/github.com/minio/cli/context.go +++ /dev/null @@ -1,276 +0,0 @@ -package cli - -import ( - "errors" - "flag" - "reflect" - "strings" - "syscall" -) - -// Context is a type that is passed through to -// each Handler action in a cli application. Context -// can be used to retrieve context-specific Args and -// parsed command-line options. -type Context struct { - App *App - Command Command - shellComplete bool - flagSet *flag.FlagSet - setFlags map[string]bool - parentContext *Context -} - -// NewContext creates a new context. For use in when invoking an App or Command action. -func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context { - c := &Context{App: app, flagSet: set, parentContext: parentCtx} - - if parentCtx != nil { - c.shellComplete = parentCtx.shellComplete - } - - return c -} - -// NumFlags returns the number of flags set -func (c *Context) NumFlags() int { - return c.flagSet.NFlag() -} - -// Set sets a context flag to a value. -func (c *Context) Set(name, value string) error { - return c.flagSet.Set(name, value) -} - -// GlobalSet sets a context flag to a value on the global flagset -func (c *Context) GlobalSet(name, value string) error { - return globalContext(c).flagSet.Set(name, value) -} - -// IsSet determines if the flag was actually set -func (c *Context) IsSet(name string) bool { - if c.setFlags == nil { - c.setFlags = make(map[string]bool) - - c.flagSet.Visit(func(f *flag.Flag) { - c.setFlags[f.Name] = true - }) - - c.flagSet.VisitAll(func(f *flag.Flag) { - if _, ok := c.setFlags[f.Name]; ok { - return - } - c.setFlags[f.Name] = false - }) - - // XXX hack to support IsSet for flags with EnvVar - // - // There isn't an easy way to do this with the current implementation since - // whether a flag was set via an environment variable is very difficult to - // determine here. Instead, we intend to introduce a backwards incompatible - // change in version 2 to add `IsSet` to the Flag interface to push the - // responsibility closer to where the information required to determine - // whether a flag is set by non-standard means such as environment - // variables is avaliable. - // - // See https://github.com/urfave/cli/issues/294 for additional discussion - flags := c.Command.Flags - if c.Command.Name == "" { // cannot == Command{} since it contains slice types - if c.App != nil { - flags = c.App.Flags - } - } - for _, f := range flags { - eachName(f.GetName(), func(name string) { - if isSet, ok := c.setFlags[name]; isSet || !ok { - return - } - - val := reflect.ValueOf(f) - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - - envVarValue := val.FieldByName("EnvVar") - if !envVarValue.IsValid() { - return - } - - eachName(envVarValue.String(), func(envVar string) { - envVar = strings.TrimSpace(envVar) - if _, ok := syscall.Getenv(envVar); ok { - c.setFlags[name] = true - return - } - }) - }) - } - } - - return c.setFlags[name] -} - -// GlobalIsSet determines if the global flag was actually set -func (c *Context) GlobalIsSet(name string) bool { - ctx := c - if ctx.parentContext != nil { - ctx = ctx.parentContext - } - - for ; ctx != nil; ctx = ctx.parentContext { - if ctx.IsSet(name) { - return true - } - } - return false -} - -// FlagNames returns a slice of flag names used in this context. -func (c *Context) FlagNames() (names []string) { - for _, flag := range c.Command.Flags { - name := strings.Split(flag.GetName(), ",")[0] - if name == "help" { - continue - } - names = append(names, name) - } - return -} - -// GlobalFlagNames returns a slice of global flag names used by the app. -func (c *Context) GlobalFlagNames() (names []string) { - for _, flag := range c.App.Flags { - name := strings.Split(flag.GetName(), ",")[0] - if name == "help" || name == "version" { - continue - } - names = append(names, name) - } - return -} - -// Parent returns the parent context, if any -func (c *Context) Parent() *Context { - return c.parentContext -} - -// value returns the value of the flag coressponding to `name` -func (c *Context) value(name string) interface{} { - return c.flagSet.Lookup(name).Value.(flag.Getter).Get() -} - -// Args contains apps console arguments -type Args []string - -// Args returns the command line arguments associated with the context. -func (c *Context) Args() Args { - args := Args(c.flagSet.Args()) - return args -} - -// NArg returns the number of the command line arguments. -func (c *Context) NArg() int { - return len(c.Args()) -} - -// Get returns the nth argument, or else a blank string -func (a Args) Get(n int) string { - if len(a) > n { - return a[n] - } - return "" -} - -// First returns the first argument, or else a blank string -func (a Args) First() string { - return a.Get(0) -} - -// Tail returns the rest of the arguments (not the first one) -// or else an empty string slice -func (a Args) Tail() []string { - if len(a) >= 2 { - return []string(a)[1:] - } - return []string{} -} - -// Present checks if there are any arguments present -func (a Args) Present() bool { - return len(a) != 0 -} - -// Swap swaps arguments at the given indexes -func (a Args) Swap(from, to int) error { - if from >= len(a) || to >= len(a) { - return errors.New("index out of range") - } - a[from], a[to] = a[to], a[from] - return nil -} - -func globalContext(ctx *Context) *Context { - if ctx == nil { - return nil - } - - for { - if ctx.parentContext == nil { - return ctx - } - ctx = ctx.parentContext - } -} - -func lookupGlobalFlagSet(name string, ctx *Context) *flag.FlagSet { - if ctx.parentContext != nil { - ctx = ctx.parentContext - } - for ; ctx != nil; ctx = ctx.parentContext { - if f := ctx.flagSet.Lookup(name); f != nil { - return ctx.flagSet - } - } - return nil -} - -func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) { - switch ff.Value.(type) { - case *StringSlice: - default: - set.Set(name, ff.Value.String()) - } -} - -func normalizeFlags(flags []Flag, set *flag.FlagSet) error { - visited := make(map[string]bool) - set.Visit(func(f *flag.Flag) { - visited[f.Name] = true - }) - for _, f := range flags { - parts := strings.Split(f.GetName(), ",") - if len(parts) == 1 { - continue - } - var ff *flag.Flag - for _, name := range parts { - name = strings.Trim(name, " ") - if visited[name] { - if ff != nil { - return errors.New("Cannot use two forms of the same flag: " + name + " " + ff.Name) - } - ff = set.Lookup(name) - } - } - if ff == nil { - continue - } - for _, name := range parts { - name = strings.Trim(name, " ") - if !visited[name] { - copyFlag(name, ff, set) - } - } - } - return nil -} diff --git a/vendor/github.com/minio/cli/errors.go b/vendor/github.com/minio/cli/errors.go deleted file mode 100644 index 562b2953c..000000000 --- a/vendor/github.com/minio/cli/errors.go +++ /dev/null @@ -1,115 +0,0 @@ -package cli - -import ( - "fmt" - "io" - "os" - "strings" -) - -// OsExiter is the function used when the app exits. If not set defaults to os.Exit. -var OsExiter = os.Exit - -// ErrWriter is used to write errors to the user. This can be anything -// implementing the io.Writer interface and defaults to os.Stderr. -var ErrWriter io.Writer = os.Stderr - -// MultiError is an error that wraps multiple errors. -type MultiError struct { - Errors []error -} - -// NewMultiError creates a new MultiError. Pass in one or more errors. -func NewMultiError(err ...error) MultiError { - return MultiError{Errors: err} -} - -// Error implements the error interface. -func (m MultiError) Error() string { - errs := make([]string, len(m.Errors)) - for i, err := range m.Errors { - errs[i] = err.Error() - } - - return strings.Join(errs, "\n") -} - -type ErrorFormatter interface { - Format(s fmt.State, verb rune) -} - -// ExitCoder is the interface checked by `App` and `Command` for a custom exit -// code -type ExitCoder interface { - error - ExitCode() int -} - -// ExitError fulfills both the builtin `error` interface and `ExitCoder` -type ExitError struct { - exitCode int - message interface{} -} - -// NewExitError makes a new *ExitError -func NewExitError(message interface{}, exitCode int) *ExitError { - return &ExitError{ - exitCode: exitCode, - message: message, - } -} - -// Error returns the string message, fulfilling the interface required by -// `error` -func (ee *ExitError) Error() string { - return fmt.Sprintf("%v", ee.message) -} - -// ExitCode returns the exit code, fulfilling the interface required by -// `ExitCoder` -func (ee *ExitError) ExitCode() int { - return ee.exitCode -} - -// HandleExitCoder checks if the error fulfills the ExitCoder interface, and if -// so prints the error to stderr (if it is non-empty) and calls OsExiter with the -// given exit code. If the given error is a MultiError, then this func is -// called on all members of the Errors slice and calls OsExiter with the last exit code. -func HandleExitCoder(err error) { - if err == nil { - return - } - - if exitErr, ok := err.(ExitCoder); ok { - if err.Error() != "" { - if _, ok := exitErr.(ErrorFormatter); ok { - fmt.Fprintf(ErrWriter, "%+v\n", err) - } else { - fmt.Fprintln(ErrWriter, err) - } - } - OsExiter(exitErr.ExitCode()) - return - } - - if multiErr, ok := err.(MultiError); ok { - code := handleMultiError(multiErr) - OsExiter(code) - return - } -} - -func handleMultiError(multiErr MultiError) int { - code := 1 - for _, merr := range multiErr.Errors { - if multiErr2, ok := merr.(MultiError); ok { - code = handleMultiError(multiErr2) - } else { - fmt.Fprintln(ErrWriter, merr) - if exitErr, ok := merr.(ExitCoder); ok { - code = exitErr.ExitCode() - } - } - } - return code -} diff --git a/vendor/github.com/minio/cli/flag.go b/vendor/github.com/minio/cli/flag.go deleted file mode 100644 index 877ff3523..000000000 --- a/vendor/github.com/minio/cli/flag.go +++ /dev/null @@ -1,799 +0,0 @@ -package cli - -import ( - "flag" - "fmt" - "reflect" - "runtime" - "strconv" - "strings" - "syscall" - "time" -) - -const defaultPlaceholder = "value" - -// BashCompletionFlag enables bash-completion for all commands and subcommands -var BashCompletionFlag Flag = BoolFlag{ - Name: "generate-bash-completion", - Hidden: true, -} - -// VersionFlag prints the version for the application -var VersionFlag Flag = BoolFlag{ - Name: "version, v", - Usage: "print the version", -} - -// HelpFlag prints the help for all commands and subcommands -// Set to the zero value (BoolFlag{}) to disable flag -- keeps subcommand -// unless HideHelp is set to true) -var HelpFlag Flag = BoolFlag{ - Name: "help, h", - Usage: "show help", -} - -// FlagStringer converts a flag definition to a string. This is used by help -// to display a flag. -var FlagStringer FlagStringFunc = stringifyFlag - -// FlagsByName is a slice of Flag. -type FlagsByName []Flag - -func (f FlagsByName) Len() int { - return len(f) -} - -func (f FlagsByName) Less(i, j int) bool { - return f[i].GetName() < f[j].GetName() -} - -func (f FlagsByName) Swap(i, j int) { - f[i], f[j] = f[j], f[i] -} - -// Flag is a common interface related to parsing flags in cli. -// For more advanced flag parsing techniques, it is recommended that -// this interface be implemented. -type Flag interface { - fmt.Stringer - // Apply Flag settings to the given flag set - Apply(*flag.FlagSet) - GetName() string -} - -// errorableFlag is an interface that allows us to return errors during apply -// it allows flags defined in this library to return errors in a fashion backwards compatible -// TODO remove in v2 and modify the existing Flag interface to return errors -type errorableFlag interface { - Flag - - ApplyWithError(*flag.FlagSet) error -} - -func flagSet(name string, flags []Flag) (*flag.FlagSet, error) { - set := flag.NewFlagSet(name, flag.ContinueOnError) - - for _, f := range flags { - //TODO remove in v2 when errorableFlag is removed - if ef, ok := f.(errorableFlag); ok { - if err := ef.ApplyWithError(set); err != nil { - return nil, err - } - } else { - f.Apply(set) - } - } - return set, nil -} - -func eachName(longName string, fn func(string)) { - parts := strings.Split(longName, ",") - for _, name := range parts { - name = strings.Trim(name, " ") - fn(name) - } -} - -// Generic is a generic parseable type identified by a specific flag -type Generic interface { - Set(value string) error - String() string -} - -// Apply takes the flagset and calls Set on the generic flag with the value -// provided by the user for parsing by the flag -// Ignores parsing errors -func (f GenericFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError takes the flagset and calls Set on the generic flag with the value -// provided by the user for parsing by the flag -func (f GenericFlag) ApplyWithError(set *flag.FlagSet) error { - val := f.Value - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - if err := val.Set(envVal); err != nil { - return fmt.Errorf("could not parse %s as value for flag %s: %s", envVal, f.Name, err) - } - break - } - } - } - - eachName(f.Name, func(name string) { - set.Var(f.Value, name, f.Usage) - }) - - return nil -} - -// StringSlice is an opaque type for []string to satisfy flag.Value and flag.Getter -type StringSlice []string - -// Set appends the string value to the list of values -func (f *StringSlice) Set(value string) error { - *f = append(*f, value) - return nil -} - -// String returns a readable representation of this value (for usage defaults) -func (f *StringSlice) String() string { - return fmt.Sprintf("%s", *f) -} - -// Value returns the slice of strings set by this flag -func (f *StringSlice) Value() []string { - return *f -} - -// Get returns the slice of strings set by this flag -func (f *StringSlice) Get() interface{} { - return *f -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f StringSliceFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f StringSliceFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - newVal := &StringSlice{} - for _, s := range strings.Split(envVal, ",") { - s = strings.TrimSpace(s) - if err := newVal.Set(s); err != nil { - return fmt.Errorf("could not parse %s as string value for flag %s: %s", envVal, f.Name, err) - } - } - f.Value = newVal - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Value == nil { - f.Value = &StringSlice{} - } - set.Var(f.Value, name, f.Usage) - }) - - return nil -} - -// IntSlice is an opaque type for []int to satisfy flag.Value and flag.Getter -type IntSlice []int - -// Set parses the value into an integer and appends it to the list of values -func (f *IntSlice) Set(value string) error { - tmp, err := strconv.Atoi(value) - if err != nil { - return err - } - *f = append(*f, tmp) - return nil -} - -// String returns a readable representation of this value (for usage defaults) -func (f *IntSlice) String() string { - return fmt.Sprintf("%#v", *f) -} - -// Value returns the slice of ints set by this flag -func (f *IntSlice) Value() []int { - return *f -} - -// Get returns the slice of ints set by this flag -func (f *IntSlice) Get() interface{} { - return *f -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f IntSliceFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f IntSliceFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - newVal := &IntSlice{} - for _, s := range strings.Split(envVal, ",") { - s = strings.TrimSpace(s) - if err := newVal.Set(s); err != nil { - return fmt.Errorf("could not parse %s as int slice value for flag %s: %s", envVal, f.Name, err) - } - } - f.Value = newVal - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Value == nil { - f.Value = &IntSlice{} - } - set.Var(f.Value, name, f.Usage) - }) - - return nil -} - -// Int64Slice is an opaque type for []int to satisfy flag.Value and flag.Getter -type Int64Slice []int64 - -// Set parses the value into an integer and appends it to the list of values -func (f *Int64Slice) Set(value string) error { - tmp, err := strconv.ParseInt(value, 10, 64) - if err != nil { - return err - } - *f = append(*f, tmp) - return nil -} - -// String returns a readable representation of this value (for usage defaults) -func (f *Int64Slice) String() string { - return fmt.Sprintf("%#v", *f) -} - -// Value returns the slice of ints set by this flag -func (f *Int64Slice) Value() []int64 { - return *f -} - -// Get returns the slice of ints set by this flag -func (f *Int64Slice) Get() interface{} { - return *f -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f Int64SliceFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f Int64SliceFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - newVal := &Int64Slice{} - for _, s := range strings.Split(envVal, ",") { - s = strings.TrimSpace(s) - if err := newVal.Set(s); err != nil { - return fmt.Errorf("could not parse %s as int64 slice value for flag %s: %s", envVal, f.Name, err) - } - } - f.Value = newVal - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Value == nil { - f.Value = &Int64Slice{} - } - set.Var(f.Value, name, f.Usage) - }) - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f BoolFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f BoolFlag) ApplyWithError(set *flag.FlagSet) error { - val := false - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - if envVal == "" { - val = false - break - } - - envValBool, err := strconv.ParseBool(envVal) - if err != nil { - return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err) - } - - val = envValBool - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.BoolVar(f.Destination, name, val, f.Usage) - return - } - set.Bool(name, val, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f BoolTFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f BoolTFlag) ApplyWithError(set *flag.FlagSet) error { - val := true - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - if envVal == "" { - val = false - break - } - - envValBool, err := strconv.ParseBool(envVal) - if err != nil { - return fmt.Errorf("could not parse %s as bool value for flag %s: %s", envVal, f.Name, err) - } - - val = envValBool - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.BoolVar(f.Destination, name, val, f.Usage) - return - } - set.Bool(name, val, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f StringFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f StringFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - f.Value = envVal - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.StringVar(f.Destination, name, f.Value, f.Usage) - return - } - set.String(name, f.Value, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f IntFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f IntFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - envValInt, err := strconv.ParseInt(envVal, 0, 64) - if err != nil { - return fmt.Errorf("could not parse %s as int value for flag %s: %s", envVal, f.Name, err) - } - f.Value = int(envValInt) - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.IntVar(f.Destination, name, f.Value, f.Usage) - return - } - set.Int(name, f.Value, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f Int64Flag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f Int64Flag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - envValInt, err := strconv.ParseInt(envVal, 0, 64) - if err != nil { - return fmt.Errorf("could not parse %s as int value for flag %s: %s", envVal, f.Name, err) - } - - f.Value = envValInt - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.Int64Var(f.Destination, name, f.Value, f.Usage) - return - } - set.Int64(name, f.Value, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f UintFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f UintFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - envValInt, err := strconv.ParseUint(envVal, 0, 64) - if err != nil { - return fmt.Errorf("could not parse %s as uint value for flag %s: %s", envVal, f.Name, err) - } - - f.Value = uint(envValInt) - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.UintVar(f.Destination, name, f.Value, f.Usage) - return - } - set.Uint(name, f.Value, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f Uint64Flag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f Uint64Flag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - envValInt, err := strconv.ParseUint(envVal, 0, 64) - if err != nil { - return fmt.Errorf("could not parse %s as uint64 value for flag %s: %s", envVal, f.Name, err) - } - - f.Value = uint64(envValInt) - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.Uint64Var(f.Destination, name, f.Value, f.Usage) - return - } - set.Uint64(name, f.Value, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f DurationFlag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f DurationFlag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - envValDuration, err := time.ParseDuration(envVal) - if err != nil { - return fmt.Errorf("could not parse %s as duration for flag %s: %s", envVal, f.Name, err) - } - - f.Value = envValDuration - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.DurationVar(f.Destination, name, f.Value, f.Usage) - return - } - set.Duration(name, f.Value, f.Usage) - }) - - return nil -} - -// Apply populates the flag given the flag set and environment -// Ignores errors -func (f Float64Flag) Apply(set *flag.FlagSet) { - f.ApplyWithError(set) -} - -// ApplyWithError populates the flag given the flag set and environment -func (f Float64Flag) ApplyWithError(set *flag.FlagSet) error { - if f.EnvVar != "" { - for _, envVar := range strings.Split(f.EnvVar, ",") { - envVar = strings.TrimSpace(envVar) - if envVal, ok := syscall.Getenv(envVar); ok { - envValFloat, err := strconv.ParseFloat(envVal, 10) - if err != nil { - return fmt.Errorf("could not parse %s as float64 value for flag %s: %s", envVal, f.Name, err) - } - - f.Value = float64(envValFloat) - break - } - } - } - - eachName(f.Name, func(name string) { - if f.Destination != nil { - set.Float64Var(f.Destination, name, f.Value, f.Usage) - return - } - set.Float64(name, f.Value, f.Usage) - }) - - return nil -} - -func visibleFlags(fl []Flag) []Flag { - visible := []Flag{} - for _, flag := range fl { - field := flagValue(flag).FieldByName("Hidden") - if !field.IsValid() || !field.Bool() { - visible = append(visible, flag) - } - } - return visible -} - -func prefixFor(name string) (prefix string) { - if len(name) == 1 { - prefix = "-" - } else { - prefix = "--" - } - - return -} - -// Returns the placeholder, if any, and the unquoted usage string. -func unquoteUsage(usage string) (string, string) { - for i := 0; i < len(usage); i++ { - if usage[i] == '`' { - for j := i + 1; j < len(usage); j++ { - if usage[j] == '`' { - name := usage[i+1 : j] - usage = usage[:i] + name + usage[j+1:] - return name, usage - } - } - break - } - } - return "", usage -} - -func prefixedNames(fullName, placeholder string) string { - var prefixed string - parts := strings.Split(fullName, ",") - for i, name := range parts { - name = strings.Trim(name, " ") - prefixed += prefixFor(name) + name - if placeholder != "" { - prefixed += " " + placeholder - } - if i < len(parts)-1 { - prefixed += ", " - } - } - return prefixed -} - -func withEnvHint(envVar, str string) string { - envText := "" - if envVar != "" { - prefix := "$" - suffix := "" - sep := ", $" - if runtime.GOOS == "windows" { - prefix = "%" - suffix = "%" - sep = "%, %" - } - envText = fmt.Sprintf(" [%s%s%s]", prefix, strings.Join(strings.Split(envVar, ","), sep), suffix) - } - return str + envText -} - -func flagValue(f Flag) reflect.Value { - fv := reflect.ValueOf(f) - for fv.Kind() == reflect.Ptr { - fv = reflect.Indirect(fv) - } - return fv -} - -func stringifyFlag(f Flag) string { - fv := flagValue(f) - - switch f.(type) { - case IntSliceFlag: - return withEnvHint(fv.FieldByName("EnvVar").String(), - stringifyIntSliceFlag(f.(IntSliceFlag))) - case Int64SliceFlag: - return withEnvHint(fv.FieldByName("EnvVar").String(), - stringifyInt64SliceFlag(f.(Int64SliceFlag))) - case StringSliceFlag: - return withEnvHint(fv.FieldByName("EnvVar").String(), - stringifyStringSliceFlag(f.(StringSliceFlag))) - } - - placeholder, usage := unquoteUsage(fv.FieldByName("Usage").String()) - - needsPlaceholder := false - defaultValueString := "" - - if val := fv.FieldByName("Value"); val.IsValid() { - needsPlaceholder = true - defaultValueString = fmt.Sprintf(" (default: %v)", val.Interface()) - - if val.Kind() == reflect.String && val.String() != "" { - defaultValueString = fmt.Sprintf(" (default: %q)", val.String()) - } - } - - if defaultValueString == " (default: )" { - defaultValueString = "" - } - - if needsPlaceholder && placeholder == "" { - placeholder = defaultPlaceholder - } - - usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultValueString)) - - return withEnvHint(fv.FieldByName("EnvVar").String(), - fmt.Sprintf("%s\t%s", prefixedNames(fv.FieldByName("Name").String(), placeholder), usageWithDefault)) -} - -func stringifyIntSliceFlag(f IntSliceFlag) string { - defaultVals := []string{} - if f.Value != nil && len(f.Value.Value()) > 0 { - for _, i := range f.Value.Value() { - defaultVals = append(defaultVals, fmt.Sprintf("%d", i)) - } - } - - return stringifySliceFlag(f.Usage, f.Name, defaultVals) -} - -func stringifyInt64SliceFlag(f Int64SliceFlag) string { - defaultVals := []string{} - if f.Value != nil && len(f.Value.Value()) > 0 { - for _, i := range f.Value.Value() { - defaultVals = append(defaultVals, fmt.Sprintf("%d", i)) - } - } - - return stringifySliceFlag(f.Usage, f.Name, defaultVals) -} - -func stringifyStringSliceFlag(f StringSliceFlag) string { - defaultVals := []string{} - if f.Value != nil && len(f.Value.Value()) > 0 { - for _, s := range f.Value.Value() { - if len(s) > 0 { - defaultVals = append(defaultVals, fmt.Sprintf("%q", s)) - } - } - } - - return stringifySliceFlag(f.Usage, f.Name, defaultVals) -} - -func stringifySliceFlag(usage, name string, defaultVals []string) string { - placeholder, usage := unquoteUsage(usage) - if placeholder == "" { - placeholder = defaultPlaceholder - } - - defaultVal := "" - if len(defaultVals) > 0 { - defaultVal = fmt.Sprintf(" (default: %s)", strings.Join(defaultVals, ", ")) - } - - usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultVal)) - return fmt.Sprintf("%s\t%s", prefixedNames(name, placeholder), usageWithDefault) -} diff --git a/vendor/github.com/minio/cli/flag_generated.go b/vendor/github.com/minio/cli/flag_generated.go deleted file mode 100644 index 491b61956..000000000 --- a/vendor/github.com/minio/cli/flag_generated.go +++ /dev/null @@ -1,627 +0,0 @@ -package cli - -import ( - "flag" - "strconv" - "time" -) - -// WARNING: This file is generated! - -// BoolFlag is a flag with type bool -type BoolFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Destination *bool -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f BoolFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f BoolFlag) GetName() string { - return f.Name -} - -// Bool looks up the value of a local BoolFlag, returns -// false if not found -func (c *Context) Bool(name string) bool { - return lookupBool(name, c.flagSet) -} - -// GlobalBool looks up the value of a global BoolFlag, returns -// false if not found -func (c *Context) GlobalBool(name string) bool { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupBool(name, fs) - } - return false -} - -func lookupBool(name string, set *flag.FlagSet) bool { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseBool(f.Value.String()) - if err != nil { - return false - } - return parsed - } - return false -} - -// BoolTFlag is a flag with type bool that is true by default -type BoolTFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Destination *bool -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f BoolTFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f BoolTFlag) GetName() string { - return f.Name -} - -// BoolT looks up the value of a local BoolTFlag, returns -// false if not found -func (c *Context) BoolT(name string) bool { - return lookupBoolT(name, c.flagSet) -} - -// GlobalBoolT looks up the value of a global BoolTFlag, returns -// false if not found -func (c *Context) GlobalBoolT(name string) bool { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupBoolT(name, fs) - } - return false -} - -func lookupBoolT(name string, set *flag.FlagSet) bool { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseBool(f.Value.String()) - if err != nil { - return false - } - return parsed - } - return false -} - -// DurationFlag is a flag with type time.Duration (see https://golang.org/pkg/time/#ParseDuration) -type DurationFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value time.Duration - Destination *time.Duration -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f DurationFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f DurationFlag) GetName() string { - return f.Name -} - -// Duration looks up the value of a local DurationFlag, returns -// 0 if not found -func (c *Context) Duration(name string) time.Duration { - return lookupDuration(name, c.flagSet) -} - -// GlobalDuration looks up the value of a global DurationFlag, returns -// 0 if not found -func (c *Context) GlobalDuration(name string) time.Duration { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupDuration(name, fs) - } - return 0 -} - -func lookupDuration(name string, set *flag.FlagSet) time.Duration { - f := set.Lookup(name) - if f != nil { - parsed, err := time.ParseDuration(f.Value.String()) - if err != nil { - return 0 - } - return parsed - } - return 0 -} - -// Float64Flag is a flag with type float64 -type Float64Flag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value float64 - Destination *float64 -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f Float64Flag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f Float64Flag) GetName() string { - return f.Name -} - -// Float64 looks up the value of a local Float64Flag, returns -// 0 if not found -func (c *Context) Float64(name string) float64 { - return lookupFloat64(name, c.flagSet) -} - -// GlobalFloat64 looks up the value of a global Float64Flag, returns -// 0 if not found -func (c *Context) GlobalFloat64(name string) float64 { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupFloat64(name, fs) - } - return 0 -} - -func lookupFloat64(name string, set *flag.FlagSet) float64 { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseFloat(f.Value.String(), 64) - if err != nil { - return 0 - } - return parsed - } - return 0 -} - -// GenericFlag is a flag with type Generic -type GenericFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value Generic -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f GenericFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f GenericFlag) GetName() string { - return f.Name -} - -// Generic looks up the value of a local GenericFlag, returns -// nil if not found -func (c *Context) Generic(name string) interface{} { - return lookupGeneric(name, c.flagSet) -} - -// GlobalGeneric looks up the value of a global GenericFlag, returns -// nil if not found -func (c *Context) GlobalGeneric(name string) interface{} { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupGeneric(name, fs) - } - return nil -} - -func lookupGeneric(name string, set *flag.FlagSet) interface{} { - f := set.Lookup(name) - if f != nil { - parsed, err := f.Value, error(nil) - if err != nil { - return nil - } - return parsed - } - return nil -} - -// Int64Flag is a flag with type int64 -type Int64Flag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value int64 - Destination *int64 -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f Int64Flag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f Int64Flag) GetName() string { - return f.Name -} - -// Int64 looks up the value of a local Int64Flag, returns -// 0 if not found -func (c *Context) Int64(name string) int64 { - return lookupInt64(name, c.flagSet) -} - -// GlobalInt64 looks up the value of a global Int64Flag, returns -// 0 if not found -func (c *Context) GlobalInt64(name string) int64 { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupInt64(name, fs) - } - return 0 -} - -func lookupInt64(name string, set *flag.FlagSet) int64 { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseInt(f.Value.String(), 0, 64) - if err != nil { - return 0 - } - return parsed - } - return 0 -} - -// IntFlag is a flag with type int -type IntFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value int - Destination *int -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f IntFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f IntFlag) GetName() string { - return f.Name -} - -// Int looks up the value of a local IntFlag, returns -// 0 if not found -func (c *Context) Int(name string) int { - return lookupInt(name, c.flagSet) -} - -// GlobalInt looks up the value of a global IntFlag, returns -// 0 if not found -func (c *Context) GlobalInt(name string) int { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupInt(name, fs) - } - return 0 -} - -func lookupInt(name string, set *flag.FlagSet) int { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseInt(f.Value.String(), 0, 64) - if err != nil { - return 0 - } - return int(parsed) - } - return 0 -} - -// IntSliceFlag is a flag with type *IntSlice -type IntSliceFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value *IntSlice -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f IntSliceFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f IntSliceFlag) GetName() string { - return f.Name -} - -// IntSlice looks up the value of a local IntSliceFlag, returns -// nil if not found -func (c *Context) IntSlice(name string) []int { - return lookupIntSlice(name, c.flagSet) -} - -// GlobalIntSlice looks up the value of a global IntSliceFlag, returns -// nil if not found -func (c *Context) GlobalIntSlice(name string) []int { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupIntSlice(name, fs) - } - return nil -} - -func lookupIntSlice(name string, set *flag.FlagSet) []int { - f := set.Lookup(name) - if f != nil { - parsed, err := (f.Value.(*IntSlice)).Value(), error(nil) - if err != nil { - return nil - } - return parsed - } - return nil -} - -// Int64SliceFlag is a flag with type *Int64Slice -type Int64SliceFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value *Int64Slice -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f Int64SliceFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f Int64SliceFlag) GetName() string { - return f.Name -} - -// Int64Slice looks up the value of a local Int64SliceFlag, returns -// nil if not found -func (c *Context) Int64Slice(name string) []int64 { - return lookupInt64Slice(name, c.flagSet) -} - -// GlobalInt64Slice looks up the value of a global Int64SliceFlag, returns -// nil if not found -func (c *Context) GlobalInt64Slice(name string) []int64 { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupInt64Slice(name, fs) - } - return nil -} - -func lookupInt64Slice(name string, set *flag.FlagSet) []int64 { - f := set.Lookup(name) - if f != nil { - parsed, err := (f.Value.(*Int64Slice)).Value(), error(nil) - if err != nil { - return nil - } - return parsed - } - return nil -} - -// StringFlag is a flag with type string -type StringFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value string - Destination *string -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f StringFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f StringFlag) GetName() string { - return f.Name -} - -// String looks up the value of a local StringFlag, returns -// "" if not found -func (c *Context) String(name string) string { - return lookupString(name, c.flagSet) -} - -// GlobalString looks up the value of a global StringFlag, returns -// "" if not found -func (c *Context) GlobalString(name string) string { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupString(name, fs) - } - return "" -} - -func lookupString(name string, set *flag.FlagSet) string { - f := set.Lookup(name) - if f != nil { - parsed, err := f.Value.String(), error(nil) - if err != nil { - return "" - } - return parsed - } - return "" -} - -// StringSliceFlag is a flag with type *StringSlice -type StringSliceFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value *StringSlice -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f StringSliceFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f StringSliceFlag) GetName() string { - return f.Name -} - -// StringSlice looks up the value of a local StringSliceFlag, returns -// nil if not found -func (c *Context) StringSlice(name string) []string { - return lookupStringSlice(name, c.flagSet) -} - -// GlobalStringSlice looks up the value of a global StringSliceFlag, returns -// nil if not found -func (c *Context) GlobalStringSlice(name string) []string { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupStringSlice(name, fs) - } - return nil -} - -func lookupStringSlice(name string, set *flag.FlagSet) []string { - f := set.Lookup(name) - if f != nil { - parsed, err := (f.Value.(*StringSlice)).Value(), error(nil) - if err != nil { - return nil - } - return parsed - } - return nil -} - -// Uint64Flag is a flag with type uint64 -type Uint64Flag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value uint64 - Destination *uint64 -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f Uint64Flag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f Uint64Flag) GetName() string { - return f.Name -} - -// Uint64 looks up the value of a local Uint64Flag, returns -// 0 if not found -func (c *Context) Uint64(name string) uint64 { - return lookupUint64(name, c.flagSet) -} - -// GlobalUint64 looks up the value of a global Uint64Flag, returns -// 0 if not found -func (c *Context) GlobalUint64(name string) uint64 { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupUint64(name, fs) - } - return 0 -} - -func lookupUint64(name string, set *flag.FlagSet) uint64 { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseUint(f.Value.String(), 0, 64) - if err != nil { - return 0 - } - return parsed - } - return 0 -} - -// UintFlag is a flag with type uint -type UintFlag struct { - Name string - Usage string - EnvVar string - Hidden bool - Value uint - Destination *uint -} - -// String returns a readable representation of this value -// (for usage defaults) -func (f UintFlag) String() string { - return FlagStringer(f) -} - -// GetName returns the name of the flag -func (f UintFlag) GetName() string { - return f.Name -} - -// Uint looks up the value of a local UintFlag, returns -// 0 if not found -func (c *Context) Uint(name string) uint { - return lookupUint(name, c.flagSet) -} - -// GlobalUint looks up the value of a global UintFlag, returns -// 0 if not found -func (c *Context) GlobalUint(name string) uint { - if fs := lookupGlobalFlagSet(name, c); fs != nil { - return lookupUint(name, fs) - } - return 0 -} - -func lookupUint(name string, set *flag.FlagSet) uint { - f := set.Lookup(name) - if f != nil { - parsed, err := strconv.ParseUint(f.Value.String(), 0, 64) - if err != nil { - return 0 - } - return uint(parsed) - } - return 0 -} diff --git a/vendor/github.com/minio/cli/funcs.go b/vendor/github.com/minio/cli/funcs.go deleted file mode 100644 index cba5e6cb0..000000000 --- a/vendor/github.com/minio/cli/funcs.go +++ /dev/null @@ -1,28 +0,0 @@ -package cli - -// BashCompleteFunc is an action to execute when the bash-completion flag is set -type BashCompleteFunc func(*Context) - -// BeforeFunc is an action to execute before any subcommands are run, but after -// the context is ready if a non-nil error is returned, no subcommands are run -type BeforeFunc func(*Context) error - -// AfterFunc is an action to execute after any subcommands are run, but after the -// subcommand has finished it is run even if Action() panics -type AfterFunc func(*Context) error - -// ActionFunc is the action to execute when no subcommands are specified -type ActionFunc func(*Context) error - -// CommandNotFoundFunc is executed if the proper command cannot be found -type CommandNotFoundFunc func(*Context, string) - -// OnUsageErrorFunc is executed if an usage error occurs. This is useful for displaying -// customized usage error messages. This function is able to replace the -// original error messages. If this function is not set, the "Incorrect usage" -// is displayed and the execution is interrupted. -type OnUsageErrorFunc func(context *Context, err error, isSubcommand bool) error - -// FlagStringFunc is used by the help generation to display a flag, which is -// expected to be a single line. -type FlagStringFunc func(Flag) string diff --git a/vendor/github.com/minio/cli/help.go b/vendor/github.com/minio/cli/help.go deleted file mode 100644 index e6cb66a4c..000000000 --- a/vendor/github.com/minio/cli/help.go +++ /dev/null @@ -1,337 +0,0 @@ -package cli - -import ( - "fmt" - "io" - "os" - "strings" - "text/tabwriter" - "text/template" -) - -// AppHelpTemplate is the text template for the Default help topic. -// cli.go uses text/template to render templates. You can -// render custom help text by setting this variable. -var AppHelpTemplate = `NAME: - {{.Name}}{{if .Usage}} - {{.Usage}}{{end}} - -USAGE: - {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}} - -VERSION: - {{.Version}}{{end}}{{end}}{{if .Description}} - -DESCRIPTION: - {{.Description}}{{end}}{{if len .Authors}} - -AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}: - {{range $index, $author := .Authors}}{{if $index}} - {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}} - -COMMANDS:{{range .VisibleCategories}}{{if .Name}} - {{.Name}}:{{end}}{{range .VisibleCommands}} - {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}} - -GLOBAL FLAGS: - {{range $index, $option := .VisibleFlags}}{{if $index}} - {{end}}{{$option}}{{end}}{{end}}{{if .Copyright}} - -COPYRIGHT: - {{.Copyright}}{{end}} -` - -// CommandHelpTemplate is the text template for the command help topic. -// cli.go uses text/template to render templates. You can -// render custom help text by setting this variable. -var CommandHelpTemplate = `NAME: - {{.HelpName}} - {{.Usage}} - -USAGE: - {{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{if .Category}} - -CATEGORY: - {{.Category}}{{end}}{{if .Description}} - -DESCRIPTION: - {{.Description}}{{end}}{{if .VisibleFlags}} - -FLAGS: - {{range .VisibleFlags}}{{.}} - {{end}}{{end}} -` - -// SubcommandHelpTemplate is the text template for the subcommand help topic. -// cli.go uses text/template to render templates. You can -// render custom help text by setting this variable. -var SubcommandHelpTemplate = `NAME: - {{.HelpName}} - {{if .Description}}{{.Description}}{{else}}{{.Usage}}{{end}} - -USAGE: - {{.HelpName}} COMMAND{{if .VisibleFlags}} [COMMAND FLAGS | -h]{{end}} [ARGUMENTS...] - -COMMANDS: - {{range .VisibleCommands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}} - {{end}}{{if .VisibleFlags}} -FLAGS: - {{range .VisibleFlags}}{{.}} - {{end}}{{end}} -` - -var helpCommand = Command{ - Name: "help", - Aliases: []string{"h"}, - Usage: "Shows a list of commands or help for one command", - ArgsUsage: "[command]", - Action: func(c *Context) error { - args := c.Args() - if args.Present() { - return ShowCommandHelp(c, args.First()) - } - - ShowAppHelp(c) - return nil - }, -} - -var helpSubcommand = Command{ - Name: "help", - Aliases: []string{"h"}, - Usage: "Shows a list of commands or help for one command", - ArgsUsage: "[command]", - Action: func(c *Context) error { - args := c.Args() - if args.Present() { - return ShowCommandHelp(c, args.First()) - } - - return ShowSubcommandHelp(c) - }, -} - -// Prints help for the App or Command -type helpPrinter func(w io.Writer, templ string, data interface{}) - -// Prints help for the App or Command with custom template function. -type helpPrinterCustom func(w io.Writer, templ string, data interface{}, customFunc map[string]interface{}) - -// HelpPrinter is a function that writes the help output. If not set a default -// is used. The function signature is: -// func(w io.Writer, templ string, data interface{}) -var HelpPrinter helpPrinter = printHelp - -// HelpPrinterCustom is same as HelpPrinter but -// takes a custom function for template function map. -var HelpPrinterCustom helpPrinterCustom = printHelpCustom - -// VersionPrinter prints the version for the App -var VersionPrinter = printVersion - -// ShowAppHelpAndExit - Prints the list of subcommands for the app and exits with exit code. -func ShowAppHelpAndExit(c *Context, exitCode int) { - ShowAppHelp(c) - os.Exit(exitCode) -} - -// ShowAppHelp is an action that displays the help. -func ShowAppHelp(c *Context) (err error) { - if c.App.CustomAppHelpTemplate == "" { - HelpPrinter(c.App.Writer, AppHelpTemplate, c.App) - return - } - customAppData := func() map[string]interface{} { - if c.App.ExtraInfo == nil { - return nil - } - return map[string]interface{}{ - "ExtraInfo": c.App.ExtraInfo, - } - } - HelpPrinterCustom(c.App.Writer, c.App.CustomAppHelpTemplate, c.App, customAppData()) - return nil -} - -// DefaultAppComplete prints the list of subcommands as the default app completion method -func DefaultAppComplete(c *Context) { - for _, command := range c.App.Commands { - if command.Hidden { - continue - } - for _, name := range command.Names() { - fmt.Fprintln(c.App.Writer, name) - } - } -} - -// ShowCommandHelpAndExit - exits with code after showing help -func ShowCommandHelpAndExit(c *Context, command string, code int) { - ShowCommandHelp(c, command) - os.Exit(code) -} - -// ShowCommandHelp prints help for the given command -func ShowCommandHelp(ctx *Context, command string) error { - // show the subcommand help for a command with subcommands - if command == "" { - HelpPrinter(ctx.App.Writer, SubcommandHelpTemplate, ctx.App) - return nil - } - - for _, c := range ctx.App.Commands { - if c.HasName(command) { - if c.CustomHelpTemplate != "" { - HelpPrinterCustom(ctx.App.Writer, c.CustomHelpTemplate, c, nil) - } else { - HelpPrinter(ctx.App.Writer, CommandHelpTemplate, c) - } - return nil - } - } - - if ctx.App.CommandNotFound == nil { - return NewExitError(fmt.Sprintf("No help topic for '%v'", command), 3) - } - - ctx.App.CommandNotFound(ctx, command) - return nil -} - -// ShowSubcommandHelp prints help for the given subcommand -func ShowSubcommandHelp(c *Context) error { - return ShowCommandHelp(c, c.Command.Name) -} - -// ShowVersion prints the version number of the App -func ShowVersion(c *Context) { - VersionPrinter(c) -} - -func printVersion(c *Context) { - fmt.Fprintf(c.App.Writer, "%v version %v\n", c.App.Name, c.App.Version) -} - -// ShowCompletions prints the lists of commands within a given context -func ShowCompletions(c *Context) { - a := c.App - if a != nil && a.BashComplete != nil { - a.BashComplete(c) - } -} - -// ShowCommandCompletions prints the custom completions for a given command -func ShowCommandCompletions(ctx *Context, command string) { - c := ctx.App.Command(command) - if c != nil && c.BashComplete != nil { - c.BashComplete(ctx) - } -} - -func printHelpCustom(out io.Writer, templ string, data interface{}, customFunc map[string]interface{}) { - funcMap := template.FuncMap{ - "join": strings.Join, - } - if customFunc != nil { - for key, value := range customFunc { - funcMap[key] = value - } - } - - w := tabwriter.NewWriter(out, 1, 8, 2, ' ', 0) - t := template.Must(template.New("help").Funcs(funcMap).Parse(templ)) - err := t.Execute(w, data) - if err != nil { - // If the writer is closed, t.Execute will fail, and there's nothing - // we can do to recover. - if os.Getenv("CLI_TEMPLATE_ERROR_DEBUG") != "" { - fmt.Fprintf(ErrWriter, "CLI TEMPLATE ERROR: %#v\n", err) - } - return - } - w.Flush() -} - -func printHelp(out io.Writer, templ string, data interface{}) { - printHelpCustom(out, templ, data, nil) -} - -func checkVersion(c *Context) bool { - found := false - if VersionFlag.GetName() != "" { - eachName(VersionFlag.GetName(), func(name string) { - if c.GlobalBool(name) || c.Bool(name) { - found = true - } - }) - } - return found -} - -func checkHelp(c *Context) bool { - found := false - if HelpFlag.GetName() != "" { - eachName(HelpFlag.GetName(), func(name string) { - if c.GlobalBool(name) || c.Bool(name) { - found = true - } - }) - } - return found -} - -func checkCommandHelp(c *Context, name string) bool { - if c.Bool("h") || c.Bool("help") { - ShowCommandHelp(c, name) - return true - } - - return false -} - -func checkSubcommandHelp(c *Context) bool { - if c.Bool("h") || c.Bool("help") { - ShowSubcommandHelp(c) - return true - } - - return false -} - -func checkShellCompleteFlag(a *App, arguments []string) (bool, []string) { - if !a.EnableBashCompletion { - return false, arguments - } - - pos := len(arguments) - 1 - lastArg := arguments[pos] - - if lastArg != "--"+BashCompletionFlag.GetName() { - return false, arguments - } - - return true, arguments[:pos] -} - -func checkCompletions(c *Context) bool { - if !c.shellComplete { - return false - } - - if args := c.Args(); args.Present() { - name := args.First() - if cmd := c.App.Command(name); cmd != nil { - // let the command handle the completion - return false - } - } - - ShowCompletions(c) - return true -} - -func checkCommandCompletions(c *Context, name string) bool { - if !c.shellComplete { - return false - } - - ShowCommandCompletions(c, name) - return true -} diff --git a/vendor/github.com/minio/sha256-simd/.travis.yml b/vendor/github.com/minio/sha256-simd/.travis.yml new file mode 100644 index 000000000..545066eb2 --- /dev/null +++ b/vendor/github.com/minio/sha256-simd/.travis.yml @@ -0,0 +1,21 @@ +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/github.com/minio/sha256-simd/README.md b/vendor/github.com/minio/sha256-simd/README.md new file mode 100644 index 000000000..95016018e --- /dev/null +++ b/vendor/github.com/minio/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 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/github.com/minio/sha256-simd/appveyor.yml b/vendor/github.com/minio/sha256-simd/appveyor.yml new file mode 100644 index 000000000..a66bfa9f2 --- /dev/null +++ b/vendor/github.com/minio/sha256-simd/appveyor.yml @@ -0,0 +1,32 @@ +# version format +version: "{build}" + +# Operating system (build VM template) +os: Windows Server 2012 R2 + +# Platform. +platform: x64 + +clone_folder: c:\gopath\src\github.com\minio\sha256-simd + +# environment variables +environment: + GOPATH: c:\gopath + GO15VENDOREXPERIMENT: 1 + +# scripts that run after cloning repository +install: + - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% + - go version + - go env + +# to run your custom scripts instead of automatic MSBuild +build_script: + - go test . + - go test -race . + +# to disable automatic tests +test: off + +# to disable deployment +deploy: off diff --git a/vendor/github.com/minio/sha256-simd/sha256blockAvx512_amd64.asm b/vendor/github.com/minio/sha256-simd/sha256blockAvx512_amd64.asm new file mode 100644 index 000000000..c959b1aa2 --- /dev/null +++ b/vendor/github.com/minio/sha256-simd/sha256blockAvx512_amd64.asm @@ -0,0 +1,686 @@ + +// 16x Parallel implementation of SHA256 for AVX512 + +// +// Minio Cloud Storage, (C) 2017 Minio, Inc. +// +// 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. + +// +// This code is based on the Intel Multi-Buffer Crypto for IPSec library +// and more specifically the following implementation: +// https://github.com/intel/intel-ipsec-mb/blob/master/avx512/sha256_x16_avx512.asm +// +// For Golang it has been converted into Plan 9 assembly with the help of +// github.com/minio/asm2plan9s to assemble the AVX512 instructions +// + +// Copyright (c) 2017, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// * Redistributions in binary form must 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 Intel Corporation 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. + +#define SHA256_DIGEST_ROW_SIZE 64 + +// arg1 +#define STATE rdi +#define STATE_P9 DI +// arg2 +#define INP_SIZE rsi +#define INP_SIZE_P9 SI + +#define IDX rcx +#define TBL rdx +#define TBL_P9 DX + +#define INPUT rax +#define INPUT_P9 AX + +#define inp0 r9 +#define SCRATCH_P9 R12 +#define SCRATCH r12 +#define maskp r13 +#define MASKP_P9 R13 +#define mask r14 +#define MASK_P9 R14 + +#define A zmm0 +#define B zmm1 +#define C zmm2 +#define D zmm3 +#define E zmm4 +#define F zmm5 +#define G zmm6 +#define H zmm7 +#define T1 zmm8 +#define TMP0 zmm9 +#define TMP1 zmm10 +#define TMP2 zmm11 +#define TMP3 zmm12 +#define TMP4 zmm13 +#define TMP5 zmm14 +#define TMP6 zmm15 + +#define W0 zmm16 +#define W1 zmm17 +#define W2 zmm18 +#define W3 zmm19 +#define W4 zmm20 +#define W5 zmm21 +#define W6 zmm22 +#define W7 zmm23 +#define W8 zmm24 +#define W9 zmm25 +#define W10 zmm26 +#define W11 zmm27 +#define W12 zmm28 +#define W13 zmm29 +#define W14 zmm30 +#define W15 zmm31 + + +#define TRANSPOSE16(_r0, _r1, _r2, _r3, _r4, _r5, _r6, _r7, _r8, _r9, _r10, _r11, _r12, _r13, _r14, _r15, _t0, _t1) \ + \ + \ // input r0 = {a15 a14 a13 a12 a11 a10 a9 a8 a7 a6 a5 a4 a3 a2 a1 a0} + \ // r1 = {b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0} + \ // r2 = {c15 c14 c13 c12 c11 c10 c9 c8 c7 c6 c5 c4 c3 c2 c1 c0} + \ // r3 = {d15 d14 d13 d12 d11 d10 d9 d8 d7 d6 d5 d4 d3 d2 d1 d0} + \ // r4 = {e15 e14 e13 e12 e11 e10 e9 e8 e7 e6 e5 e4 e3 e2 e1 e0} + \ // r5 = {f15 f14 f13 f12 f11 f10 f9 f8 f7 f6 f5 f4 f3 f2 f1 f0} + \ // r6 = {g15 g14 g13 g12 g11 g10 g9 g8 g7 g6 g5 g4 g3 g2 g1 g0} + \ // r7 = {h15 h14 h13 h12 h11 h10 h9 h8 h7 h6 h5 h4 h3 h2 h1 h0} + \ // r8 = {i15 i14 i13 i12 i11 i10 i9 i8 i7 i6 i5 i4 i3 i2 i1 i0} + \ // r9 = {j15 j14 j13 j12 j11 j10 j9 j8 j7 j6 j5 j4 j3 j2 j1 j0} + \ // r10 = {k15 k14 k13 k12 k11 k10 k9 k8 k7 k6 k5 k4 k3 k2 k1 k0} + \ // r11 = {l15 l14 l13 l12 l11 l10 l9 l8 l7 l6 l5 l4 l3 l2 l1 l0} + \ // r12 = {m15 m14 m13 m12 m11 m10 m9 m8 m7 m6 m5 m4 m3 m2 m1 m0} + \ // r13 = {n15 n14 n13 n12 n11 n10 n9 n8 n7 n6 n5 n4 n3 n2 n1 n0} + \ // r14 = {o15 o14 o13 o12 o11 o10 o9 o8 o7 o6 o5 o4 o3 o2 o1 o0} + \ // r15 = {p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0} + \ + \ // output r0 = { p0 o0 n0 m0 l0 k0 j0 i0 h0 g0 f0 e0 d0 c0 b0 a0} + \ // r1 = { p1 o1 n1 m1 l1 k1 j1 i1 h1 g1 f1 e1 d1 c1 b1 a1} + \ // r2 = { p2 o2 n2 m2 l2 k2 j2 i2 h2 g2 f2 e2 d2 c2 b2 a2} + \ // r3 = { p3 o3 n3 m3 l3 k3 j3 i3 h3 g3 f3 e3 d3 c3 b3 a3} + \ // r4 = { p4 o4 n4 m4 l4 k4 j4 i4 h4 g4 f4 e4 d4 c4 b4 a4} + \ // r5 = { p5 o5 n5 m5 l5 k5 j5 i5 h5 g5 f5 e5 d5 c5 b5 a5} + \ // r6 = { p6 o6 n6 m6 l6 k6 j6 i6 h6 g6 f6 e6 d6 c6 b6 a6} + \ // r7 = { p7 o7 n7 m7 l7 k7 j7 i7 h7 g7 f7 e7 d7 c7 b7 a7} + \ // r8 = { p8 o8 n8 m8 l8 k8 j8 i8 h8 g8 f8 e8 d8 c8 b8 a8} + \ // r9 = { p9 o9 n9 m9 l9 k9 j9 i9 h9 g9 f9 e9 d9 c9 b9 a9} + \ // r10 = {p10 o10 n10 m10 l10 k10 j10 i10 h10 g10 f10 e10 d10 c10 b10 a10} + \ // r11 = {p11 o11 n11 m11 l11 k11 j11 i11 h11 g11 f11 e11 d11 c11 b11 a11} + \ // r12 = {p12 o12 n12 m12 l12 k12 j12 i12 h12 g12 f12 e12 d12 c12 b12 a12} + \ // r13 = {p13 o13 n13 m13 l13 k13 j13 i13 h13 g13 f13 e13 d13 c13 b13 a13} + \ // r14 = {p14 o14 n14 m14 l14 k14 j14 i14 h14 g14 f14 e14 d14 c14 b14 a14} + \ // r15 = {p15 o15 n15 m15 l15 k15 j15 i15 h15 g15 f15 e15 d15 c15 b15 a15} + \ + \ // process top half + vshufps _t0, _r0, _r1, 0x44 \ // t0 = {b13 b12 a13 a12 b9 b8 a9 a8 b5 b4 a5 a4 b1 b0 a1 a0} + vshufps _r0, _r0, _r1, 0xEE \ // r0 = {b15 b14 a15 a14 b11 b10 a11 a10 b7 b6 a7 a6 b3 b2 a3 a2} + vshufps _t1, _r2, _r3, 0x44 \ // t1 = {d13 d12 c13 c12 d9 d8 c9 c8 d5 d4 c5 c4 d1 d0 c1 c0} + vshufps _r2, _r2, _r3, 0xEE \ // r2 = {d15 d14 c15 c14 d11 d10 c11 c10 d7 d6 c7 c6 d3 d2 c3 c2} + \ + vshufps _r3, _t0, _t1, 0xDD \ // r3 = {d13 c13 b13 a13 d9 c9 b9 a9 d5 c5 b5 a5 d1 c1 b1 a1} + vshufps _r1, _r0, _r2, 0x88 \ // r1 = {d14 c14 b14 a14 d10 c10 b10 a10 d6 c6 b6 a6 d2 c2 b2 a2} + vshufps _r0, _r0, _r2, 0xDD \ // r0 = {d15 c15 b15 a15 d11 c11 b11 a11 d7 c7 b7 a7 d3 c3 b3 a3} + vshufps _t0, _t0, _t1, 0x88 \ // t0 = {d12 c12 b12 a12 d8 c8 b8 a8 d4 c4 b4 a4 d0 c0 b0 a0} + \ + \ // use r2 in place of t0 + vshufps _r2, _r4, _r5, 0x44 \ // r2 = {f13 f12 e13 e12 f9 f8 e9 e8 f5 f4 e5 e4 f1 f0 e1 e0} + vshufps _r4, _r4, _r5, 0xEE \ // r4 = {f15 f14 e15 e14 f11 f10 e11 e10 f7 f6 e7 e6 f3 f2 e3 e2} + vshufps _t1, _r6, _r7, 0x44 \ // t1 = {h13 h12 g13 g12 h9 h8 g9 g8 h5 h4 g5 g4 h1 h0 g1 g0} + vshufps _r6, _r6, _r7, 0xEE \ // r6 = {h15 h14 g15 g14 h11 h10 g11 g10 h7 h6 g7 g6 h3 h2 g3 g2} + \ + vshufps _r7, _r2, _t1, 0xDD \ // r7 = {h13 g13 f13 e13 h9 g9 f9 e9 h5 g5 f5 e5 h1 g1 f1 e1} + vshufps _r5, _r4, _r6, 0x88 \ // r5 = {h14 g14 f14 e14 h10 g10 f10 e10 h6 g6 f6 e6 h2 g2 f2 e2} + vshufps _r4, _r4, _r6, 0xDD \ // r4 = {h15 g15 f15 e15 h11 g11 f11 e11 h7 g7 f7 e7 h3 g3 f3 e3} + vshufps _r2, _r2, _t1, 0x88 \ // r2 = {h12 g12 f12 e12 h8 g8 f8 e8 h4 g4 f4 e4 h0 g0 f0 e0} + \ + \ // use r6 in place of t0 + vshufps _r6, _r8, _r9, 0x44 \ // r6 = {j13 j12 i13 i12 j9 j8 i9 i8 j5 j4 i5 i4 j1 j0 i1 i0} + vshufps _r8, _r8, _r9, 0xEE \ // r8 = {j15 j14 i15 i14 j11 j10 i11 i10 j7 j6 i7 i6 j3 j2 i3 i2} + vshufps _t1, _r10, _r11, 0x44 \ // t1 = {l13 l12 k13 k12 l9 l8 k9 k8 l5 l4 k5 k4 l1 l0 k1 k0} + vshufps _r10, _r10, _r11, 0xEE \ // r10 = {l15 l14 k15 k14 l11 l10 k11 k10 l7 l6 k7 k6 l3 l2 k3 k2} + \ + vshufps _r11, _r6, _t1, 0xDD \ // r11 = {l13 k13 j13 113 l9 k9 j9 i9 l5 k5 j5 i5 l1 k1 j1 i1} + vshufps _r9, _r8, _r10, 0x88 \ // r9 = {l14 k14 j14 114 l10 k10 j10 i10 l6 k6 j6 i6 l2 k2 j2 i2} + vshufps _r8, _r8, _r10, 0xDD \ // r8 = {l15 k15 j15 115 l11 k11 j11 i11 l7 k7 j7 i7 l3 k3 j3 i3} + vshufps _r6, _r6, _t1, 0x88 \ // r6 = {l12 k12 j12 112 l8 k8 j8 i8 l4 k4 j4 i4 l0 k0 j0 i0} + \ + \ // use r10 in place of t0 + vshufps _r10, _r12, _r13, 0x44 \ // r10 = {n13 n12 m13 m12 n9 n8 m9 m8 n5 n4 m5 m4 n1 n0 a1 m0} + vshufps _r12, _r12, _r13, 0xEE \ // r12 = {n15 n14 m15 m14 n11 n10 m11 m10 n7 n6 m7 m6 n3 n2 a3 m2} + vshufps _t1, _r14, _r15, 0x44 \ // t1 = {p13 p12 013 012 p9 p8 09 08 p5 p4 05 04 p1 p0 01 00} + vshufps _r14, _r14, _r15, 0xEE \ // r14 = {p15 p14 015 014 p11 p10 011 010 p7 p6 07 06 p3 p2 03 02} + \ + vshufps _r15, _r10, _t1, 0xDD \ // r15 = {p13 013 n13 m13 p9 09 n9 m9 p5 05 n5 m5 p1 01 n1 m1} + vshufps _r13, _r12, _r14, 0x88 \ // r13 = {p14 014 n14 m14 p10 010 n10 m10 p6 06 n6 m6 p2 02 n2 m2} + vshufps _r12, _r12, _r14, 0xDD \ // r12 = {p15 015 n15 m15 p11 011 n11 m11 p7 07 n7 m7 p3 03 n3 m3} + vshufps _r10, _r10, _t1, 0x88 \ // r10 = {p12 012 n12 m12 p8 08 n8 m8 p4 04 n4 m4 p0 00 n0 m0} + \ + \ // At this point, the registers that contain interesting data are: + \ // t0, r3, r1, r0, r2, r7, r5, r4, r6, r11, r9, r8, r10, r15, r13, r12 + \ // Can use t1 and r14 as scratch registers + LEAQ PSHUFFLE_TRANSPOSE16_MASK1<>(SB), BX \ + LEAQ PSHUFFLE_TRANSPOSE16_MASK2<>(SB), R8 \ + \ + vmovdqu32 _r14, [rbx] \ + vpermi2q _r14, _t0, _r2 \ // r14 = {h8 g8 f8 e8 d8 c8 b8 a8 h0 g0 f0 e0 d0 c0 b0 a0} + vmovdqu32 _t1, [r8] \ + vpermi2q _t1, _t0, _r2 \ // t1 = {h12 g12 f12 e12 d12 c12 b12 a12 h4 g4 f4 e4 d4 c4 b4 a4} + \ + vmovdqu32 _r2, [rbx] \ + vpermi2q _r2, _r3, _r7 \ // r2 = {h9 g9 f9 e9 d9 c9 b9 a9 h1 g1 f1 e1 d1 c1 b1 a1} + vmovdqu32 _t0, [r8] \ + vpermi2q _t0, _r3, _r7 \ // t0 = {h13 g13 f13 e13 d13 c13 b13 a13 h5 g5 f5 e5 d5 c5 b5 a5} + \ + vmovdqu32 _r3, [rbx] \ + vpermi2q _r3, _r1, _r5 \ // r3 = {h10 g10 f10 e10 d10 c10 b10 a10 h2 g2 f2 e2 d2 c2 b2 a2} + vmovdqu32 _r7, [r8] \ + vpermi2q _r7, _r1, _r5 \ // r7 = {h14 g14 f14 e14 d14 c14 b14 a14 h6 g6 f6 e6 d6 c6 b6 a6} + \ + vmovdqu32 _r1, [rbx] \ + vpermi2q _r1, _r0, _r4 \ // r1 = {h11 g11 f11 e11 d11 c11 b11 a11 h3 g3 f3 e3 d3 c3 b3 a3} + vmovdqu32 _r5, [r8] \ + vpermi2q _r5, _r0, _r4 \ // r5 = {h15 g15 f15 e15 d15 c15 b15 a15 h7 g7 f7 e7 d7 c7 b7 a7} + \ + vmovdqu32 _r0, [rbx] \ + vpermi2q _r0, _r6, _r10 \ // r0 = {p8 o8 n8 m8 l8 k8 j8 i8 p0 o0 n0 m0 l0 k0 j0 i0} + vmovdqu32 _r4, [r8] \ + vpermi2q _r4, _r6, _r10 \ // r4 = {p12 o12 n12 m12 l12 k12 j12 i12 p4 o4 n4 m4 l4 k4 j4 i4} + \ + vmovdqu32 _r6, [rbx] \ + vpermi2q _r6, _r11, _r15 \ // r6 = {p9 o9 n9 m9 l9 k9 j9 i9 p1 o1 n1 m1 l1 k1 j1 i1} + vmovdqu32 _r10, [r8] \ + vpermi2q _r10, _r11, _r15 \ // r10 = {p13 o13 n13 m13 l13 k13 j13 i13 p5 o5 n5 m5 l5 k5 j5 i5} + \ + vmovdqu32 _r11, [rbx] \ + vpermi2q _r11, _r9, _r13 \ // r11 = {p10 o10 n10 m10 l10 k10 j10 i10 p2 o2 n2 m2 l2 k2 j2 i2} + vmovdqu32 _r15, [r8] \ + vpermi2q _r15, _r9, _r13 \ // r15 = {p14 o14 n14 m14 l14 k14 j14 i14 p6 o6 n6 m6 l6 k6 j6 i6} + \ + vmovdqu32 _r9, [rbx] \ + vpermi2q _r9, _r8, _r12 \ // r9 = {p11 o11 n11 m11 l11 k11 j11 i11 p3 o3 n3 m3 l3 k3 j3 i3} + vmovdqu32 _r13, [r8] \ + vpermi2q _r13, _r8, _r12 \ // r13 = {p15 o15 n15 m15 l15 k15 j15 i15 p7 o7 n7 m7 l7 k7 j7 i7} + \ + \ // At this point r8 and r12 can be used as scratch registers + vshuff64x2 _r8, _r14, _r0, 0xEE \ // r8 = {p8 o8 n8 m8 l8 k8 j8 i8 h8 g8 f8 e8 d8 c8 b8 a8} + vshuff64x2 _r0, _r14, _r0, 0x44 \ // r0 = {p0 o0 n0 m0 l0 k0 j0 i0 h0 g0 f0 e0 d0 c0 b0 a0} + \ + vshuff64x2 _r12, _t1, _r4, 0xEE \ // r12 = {p12 o12 n12 m12 l12 k12 j12 i12 h12 g12 f12 e12 d12 c12 b12 a12} + vshuff64x2 _r4, _t1, _r4, 0x44 \ // r4 = {p4 o4 n4 m4 l4 k4 j4 i4 h4 g4 f4 e4 d4 c4 b4 a4} + \ + vshuff64x2 _r14, _r7, _r15, 0xEE \ // r14 = {p14 o14 n14 m14 l14 k14 j14 i14 h14 g14 f14 e14 d14 c14 b14 a14} + vshuff64x2 _t1, _r7, _r15, 0x44 \ // t1 = {p6 o6 n6 m6 l6 k6 j6 i6 h6 g6 f6 e6 d6 c6 b6 a6} + \ + vshuff64x2 _r15, _r5, _r13, 0xEE \ // r15 = {p15 o15 n15 m15 l15 k15 j15 i15 h15 g15 f15 e15 d15 c15 b15 a15} + vshuff64x2 _r7, _r5, _r13, 0x44 \ // r7 = {p7 o7 n7 m7 l7 k7 j7 i7 h7 g7 f7 e7 d7 c7 b7 a7} + \ + vshuff64x2 _r13, _t0, _r10, 0xEE \ // r13 = {p13 o13 n13 m13 l13 k13 j13 i13 h13 g13 f13 e13 d13 c13 b13 a13} + vshuff64x2 _r5, _t0, _r10, 0x44 \ // r5 = {p5 o5 n5 m5 l5 k5 j5 i5 h5 g5 f5 e5 d5 c5 b5 a5} + \ + vshuff64x2 _r10, _r3, _r11, 0xEE \ // r10 = {p10 o10 n10 m10 l10 k10 j10 i10 h10 g10 f10 e10 d10 c10 b10 a10} + vshuff64x2 _t0, _r3, _r11, 0x44 \ // t0 = {p2 o2 n2 m2 l2 k2 j2 i2 h2 g2 f2 e2 d2 c2 b2 a2} + \ + vshuff64x2 _r11, _r1, _r9, 0xEE \ // r11 = {p11 o11 n11 m11 l11 k11 j11 i11 h11 g11 f11 e11 d11 c11 b11 a11} + vshuff64x2 _r3, _r1, _r9, 0x44 \ // r3 = {p3 o3 n3 m3 l3 k3 j3 i3 h3 g3 f3 e3 d3 c3 b3 a3} + \ + vshuff64x2 _r9, _r2, _r6, 0xEE \ // r9 = {p9 o9 n9 m9 l9 k9 j9 i9 h9 g9 f9 e9 d9 c9 b9 a9} + vshuff64x2 _r1, _r2, _r6, 0x44 \ // r1 = {p1 o1 n1 m1 l1 k1 j1 i1 h1 g1 f1 e1 d1 c1 b1 a1} + \ + vmovdqu32 _r2, _t0 \ // r2 = {p2 o2 n2 m2 l2 k2 j2 i2 h2 g2 f2 e2 d2 c2 b2 a2} + vmovdqu32 _r6, _t1 \ // r6 = {p6 o6 n6 m6 l6 k6 j6 i6 h6 g6 f6 e6 d6 c6 b6 a6} + + +// CH(A, B, C) = (A&B) ^ (~A&C) +// MAJ(E, F, G) = (E&F) ^ (E&G) ^ (F&G) +// SIGMA0 = ROR_2 ^ ROR_13 ^ ROR_22 +// SIGMA1 = ROR_6 ^ ROR_11 ^ ROR_25 +// sigma0 = ROR_7 ^ ROR_18 ^ SHR_3 +// sigma1 = ROR_17 ^ ROR_19 ^ SHR_10 + +// Main processing loop per round +#define PROCESS_LOOP(_WT, _ROUND, _A, _B, _C, _D, _E, _F, _G, _H) \ + \ // T1 = H + SIGMA1(E) + CH(E, F, G) + Kt + Wt + \ // T2 = SIGMA0(A) + MAJ(A, B, C) + \ // H=G, G=F, F=E, E=D+T1, D=C, C=B, B=A, A=T1+T2 + \ + \ // H becomes T2, then add T1 for A + \ // D becomes D + T1 for E + \ + vpaddd T1, _H, TMP3 \ // T1 = H + Kt + vmovdqu32 TMP0, _E \ + vprord TMP1, _E, 6 \ // ROR_6(E) + vprord TMP2, _E, 11 \ // ROR_11(E) + vprord TMP3, _E, 25 \ // ROR_25(E) + vpternlogd TMP0, _F, _G, 0xCA \ // TMP0 = CH(E,F,G) + vpaddd T1, T1, _WT \ // T1 = T1 + Wt + vpternlogd TMP1, TMP2, TMP3, 0x96 \ // TMP1 = SIGMA1(E) + vpaddd T1, T1, TMP0 \ // T1 = T1 + CH(E,F,G) + vpaddd T1, T1, TMP1 \ // T1 = T1 + SIGMA1(E) + vpaddd _D, _D, T1 \ // D = D + T1 + \ + vprord _H, _A, 2 \ // ROR_2(A) + vprord TMP2, _A, 13 \ // ROR_13(A) + vprord TMP3, _A, 22 \ // ROR_22(A) + vmovdqu32 TMP0, _A \ + vpternlogd TMP0, _B, _C, 0xE8 \ // TMP0 = MAJ(A,B,C) + vpternlogd _H, TMP2, TMP3, 0x96 \ // H(T2) = SIGMA0(A) + vpaddd _H, _H, TMP0 \ // H(T2) = SIGMA0(A) + MAJ(A,B,C) + vpaddd _H, _H, T1 \ // H(A) = H(T2) + T1 + \ + vmovdqu32 TMP3, [TBL + ((_ROUND+1)*64)] \ // Next Kt + + +#define MSG_SCHED_ROUND_16_63(_WT, _WTp1, _WTp9, _WTp14) \ + vprord TMP4, _WTp14, 17 \ // ROR_17(Wt-2) + vprord TMP5, _WTp14, 19 \ // ROR_19(Wt-2) + vpsrld TMP6, _WTp14, 10 \ // SHR_10(Wt-2) + vpternlogd TMP4, TMP5, TMP6, 0x96 \ // TMP4 = sigma1(Wt-2) + \ + vpaddd _WT, _WT, TMP4 \ // Wt = Wt-16 + sigma1(Wt-2) + vpaddd _WT, _WT, _WTp9 \ // Wt = Wt-16 + sigma1(Wt-2) + Wt-7 + \ + vprord TMP4, _WTp1, 7 \ // ROR_7(Wt-15) + vprord TMP5, _WTp1, 18 \ // ROR_18(Wt-15) + vpsrld TMP6, _WTp1, 3 \ // SHR_3(Wt-15) + vpternlogd TMP4, TMP5, TMP6, 0x96 \ // TMP4 = sigma0(Wt-15) + \ + vpaddd _WT, _WT, TMP4 \ // Wt = Wt-16 + sigma1(Wt-2) + + \ // Wt-7 + sigma0(Wt-15) + + + +// Note this is reading in a block of data for one lane +// When all 16 are read, the data must be transposed to build msg schedule +#define MSG_SCHED_ROUND_00_15(_WT, OFFSET, LABEL) \ + TESTQ $(1<(SB), TBL_P9 + vmovdqu32 TMP2, [TBL] + + // Get first K from table + MOVQ table+16(FP), TBL_P9 + vmovdqu32 TMP3, [TBL] + + // Save digests for later addition + vmovdqu32 [SCRATCH + 64*0], A + vmovdqu32 [SCRATCH + 64*1], B + vmovdqu32 [SCRATCH + 64*2], C + vmovdqu32 [SCRATCH + 64*3], D + vmovdqu32 [SCRATCH + 64*4], E + vmovdqu32 [SCRATCH + 64*5], F + vmovdqu32 [SCRATCH + 64*6], G + vmovdqu32 [SCRATCH + 64*7], H + + add IDX, 64 + + // Transpose input data + TRANSPOSE16(W0, W1, W2, W3, W4, W5, W6, W7, W8, W9, W10, W11, W12, W13, W14, W15, TMP0, TMP1) + + vpshufb W0, W0, TMP2 + vpshufb W1, W1, TMP2 + vpshufb W2, W2, TMP2 + vpshufb W3, W3, TMP2 + vpshufb W4, W4, TMP2 + vpshufb W5, W5, TMP2 + vpshufb W6, W6, TMP2 + vpshufb W7, W7, TMP2 + vpshufb W8, W8, TMP2 + vpshufb W9, W9, TMP2 + vpshufb W10, W10, TMP2 + vpshufb W11, W11, TMP2 + vpshufb W12, W12, TMP2 + vpshufb W13, W13, TMP2 + vpshufb W14, W14, TMP2 + vpshufb W15, W15, TMP2 + + // MSG Schedule for W0-W15 is now complete in registers + // Process first 48 rounds + // Calculate next Wt+16 after processing is complete and Wt is unneeded + + PROCESS_LOOP( W0, 0, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_16_63( W0, W1, W9, W14) + PROCESS_LOOP( W1, 1, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_16_63( W1, W2, W10, W15) + PROCESS_LOOP( W2, 2, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_16_63( W2, W3, W11, W0) + PROCESS_LOOP( W3, 3, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_16_63( W3, W4, W12, W1) + PROCESS_LOOP( W4, 4, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_16_63( W4, W5, W13, W2) + PROCESS_LOOP( W5, 5, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_16_63( W5, W6, W14, W3) + PROCESS_LOOP( W6, 6, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_16_63( W6, W7, W15, W4) + PROCESS_LOOP( W7, 7, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_16_63( W7, W8, W0, W5) + PROCESS_LOOP( W8, 8, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_16_63( W8, W9, W1, W6) + PROCESS_LOOP( W9, 9, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_16_63( W9, W10, W2, W7) + PROCESS_LOOP(W10, 10, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_16_63(W10, W11, W3, W8) + PROCESS_LOOP(W11, 11, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_16_63(W11, W12, W4, W9) + PROCESS_LOOP(W12, 12, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_16_63(W12, W13, W5, W10) + PROCESS_LOOP(W13, 13, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_16_63(W13, W14, W6, W11) + PROCESS_LOOP(W14, 14, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_16_63(W14, W15, W7, W12) + PROCESS_LOOP(W15, 15, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_16_63(W15, W0, W8, W13) + PROCESS_LOOP( W0, 16, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_16_63( W0, W1, W9, W14) + PROCESS_LOOP( W1, 17, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_16_63( W1, W2, W10, W15) + PROCESS_LOOP( W2, 18, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_16_63( W2, W3, W11, W0) + PROCESS_LOOP( W3, 19, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_16_63( W3, W4, W12, W1) + PROCESS_LOOP( W4, 20, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_16_63( W4, W5, W13, W2) + PROCESS_LOOP( W5, 21, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_16_63( W5, W6, W14, W3) + PROCESS_LOOP( W6, 22, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_16_63( W6, W7, W15, W4) + PROCESS_LOOP( W7, 23, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_16_63( W7, W8, W0, W5) + PROCESS_LOOP( W8, 24, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_16_63( W8, W9, W1, W6) + PROCESS_LOOP( W9, 25, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_16_63( W9, W10, W2, W7) + PROCESS_LOOP(W10, 26, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_16_63(W10, W11, W3, W8) + PROCESS_LOOP(W11, 27, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_16_63(W11, W12, W4, W9) + PROCESS_LOOP(W12, 28, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_16_63(W12, W13, W5, W10) + PROCESS_LOOP(W13, 29, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_16_63(W13, W14, W6, W11) + PROCESS_LOOP(W14, 30, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_16_63(W14, W15, W7, W12) + PROCESS_LOOP(W15, 31, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_16_63(W15, W0, W8, W13) + PROCESS_LOOP( W0, 32, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_16_63( W0, W1, W9, W14) + PROCESS_LOOP( W1, 33, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_16_63( W1, W2, W10, W15) + PROCESS_LOOP( W2, 34, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_16_63( W2, W3, W11, W0) + PROCESS_LOOP( W3, 35, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_16_63( W3, W4, W12, W1) + PROCESS_LOOP( W4, 36, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_16_63( W4, W5, W13, W2) + PROCESS_LOOP( W5, 37, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_16_63( W5, W6, W14, W3) + PROCESS_LOOP( W6, 38, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_16_63( W6, W7, W15, W4) + PROCESS_LOOP( W7, 39, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_16_63( W7, W8, W0, W5) + PROCESS_LOOP( W8, 40, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_16_63( W8, W9, W1, W6) + PROCESS_LOOP( W9, 41, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_16_63( W9, W10, W2, W7) + PROCESS_LOOP(W10, 42, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_16_63(W10, W11, W3, W8) + PROCESS_LOOP(W11, 43, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_16_63(W11, W12, W4, W9) + PROCESS_LOOP(W12, 44, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_16_63(W12, W13, W5, W10) + PROCESS_LOOP(W13, 45, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_16_63(W13, W14, W6, W11) + PROCESS_LOOP(W14, 46, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_16_63(W14, W15, W7, W12) + PROCESS_LOOP(W15, 47, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_16_63(W15, W0, W8, W13) + + // Check if this is the last block + sub INP_SIZE, 1 + JE lastLoop + + // Load next mask for inputs + ADDQ $8, MASKP_P9 + MOVQ (MASKP_P9), MASK_P9 + + // Process last 16 rounds + // Read in next block msg data for use in first 16 words of msg sched + + PROCESS_LOOP( W0, 48, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_00_15( W0, 0, skipNext0) + PROCESS_LOOP( W1, 49, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_00_15( W1, 1, skipNext1) + PROCESS_LOOP( W2, 50, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_00_15( W2, 2, skipNext2) + PROCESS_LOOP( W3, 51, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_00_15( W3, 3, skipNext3) + PROCESS_LOOP( W4, 52, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_00_15( W4, 4, skipNext4) + PROCESS_LOOP( W5, 53, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_00_15( W5, 5, skipNext5) + PROCESS_LOOP( W6, 54, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_00_15( W6, 6, skipNext6) + PROCESS_LOOP( W7, 55, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_00_15( W7, 7, skipNext7) + PROCESS_LOOP( W8, 56, A, B, C, D, E, F, G, H) + MSG_SCHED_ROUND_00_15( W8, 8, skipNext8) + PROCESS_LOOP( W9, 57, H, A, B, C, D, E, F, G) + MSG_SCHED_ROUND_00_15( W9, 9, skipNext9) + PROCESS_LOOP(W10, 58, G, H, A, B, C, D, E, F) + MSG_SCHED_ROUND_00_15(W10, 10, skipNext10) + PROCESS_LOOP(W11, 59, F, G, H, A, B, C, D, E) + MSG_SCHED_ROUND_00_15(W11, 11, skipNext11) + PROCESS_LOOP(W12, 60, E, F, G, H, A, B, C, D) + MSG_SCHED_ROUND_00_15(W12, 12, skipNext12) + PROCESS_LOOP(W13, 61, D, E, F, G, H, A, B, C) + MSG_SCHED_ROUND_00_15(W13, 13, skipNext13) + PROCESS_LOOP(W14, 62, C, D, E, F, G, H, A, B) + MSG_SCHED_ROUND_00_15(W14, 14, skipNext14) + PROCESS_LOOP(W15, 63, B, C, D, E, F, G, H, A) + MSG_SCHED_ROUND_00_15(W15, 15, skipNext15) + + // Add old digest + vmovdqu32 TMP2, A + vmovdqu32 A, [SCRATCH + 64*0] + vpaddd A{k1}, A, TMP2 + vmovdqu32 TMP2, B + vmovdqu32 B, [SCRATCH + 64*1] + vpaddd B{k1}, B, TMP2 + vmovdqu32 TMP2, C + vmovdqu32 C, [SCRATCH + 64*2] + vpaddd C{k1}, C, TMP2 + vmovdqu32 TMP2, D + vmovdqu32 D, [SCRATCH + 64*3] + vpaddd D{k1}, D, TMP2 + vmovdqu32 TMP2, E + vmovdqu32 E, [SCRATCH + 64*4] + vpaddd E{k1}, E, TMP2 + vmovdqu32 TMP2, F + vmovdqu32 F, [SCRATCH + 64*5] + vpaddd F{k1}, F, TMP2 + vmovdqu32 TMP2, G + vmovdqu32 G, [SCRATCH + 64*6] + vpaddd G{k1}, G, TMP2 + vmovdqu32 TMP2, H + vmovdqu32 H, [SCRATCH + 64*7] + vpaddd H{k1}, H, TMP2 + + kmovq k1, mask + JMP lloop + +lastLoop: + // Process last 16 rounds + PROCESS_LOOP( W0, 48, A, B, C, D, E, F, G, H) + PROCESS_LOOP( W1, 49, H, A, B, C, D, E, F, G) + PROCESS_LOOP( W2, 50, G, H, A, B, C, D, E, F) + PROCESS_LOOP( W3, 51, F, G, H, A, B, C, D, E) + PROCESS_LOOP( W4, 52, E, F, G, H, A, B, C, D) + PROCESS_LOOP( W5, 53, D, E, F, G, H, A, B, C) + PROCESS_LOOP( W6, 54, C, D, E, F, G, H, A, B) + PROCESS_LOOP( W7, 55, B, C, D, E, F, G, H, A) + PROCESS_LOOP( W8, 56, A, B, C, D, E, F, G, H) + PROCESS_LOOP( W9, 57, H, A, B, C, D, E, F, G) + PROCESS_LOOP(W10, 58, G, H, A, B, C, D, E, F) + PROCESS_LOOP(W11, 59, F, G, H, A, B, C, D, E) + PROCESS_LOOP(W12, 60, E, F, G, H, A, B, C, D) + PROCESS_LOOP(W13, 61, D, E, F, G, H, A, B, C) + PROCESS_LOOP(W14, 62, C, D, E, F, G, H, A, B) + PROCESS_LOOP(W15, 63, B, C, D, E, F, G, H, A) + + // Add old digest + vmovdqu32 TMP2, A + vmovdqu32 A, [SCRATCH + 64*0] + vpaddd A{k1}, A, TMP2 + vmovdqu32 TMP2, B + vmovdqu32 B, [SCRATCH + 64*1] + vpaddd B{k1}, B, TMP2 + vmovdqu32 TMP2, C + vmovdqu32 C, [SCRATCH + 64*2] + vpaddd C{k1}, C, TMP2 + vmovdqu32 TMP2, D + vmovdqu32 D, [SCRATCH + 64*3] + vpaddd D{k1}, D, TMP2 + vmovdqu32 TMP2, E + vmovdqu32 E, [SCRATCH + 64*4] + vpaddd E{k1}, E, TMP2 + vmovdqu32 TMP2, F + vmovdqu32 F, [SCRATCH + 64*5] + vpaddd F{k1}, F, TMP2 + vmovdqu32 TMP2, G + vmovdqu32 G, [SCRATCH + 64*6] + vpaddd G{k1}, G, TMP2 + vmovdqu32 TMP2, H + vmovdqu32 H, [SCRATCH + 64*7] + vpaddd H{k1}, H, TMP2 + + // Write out digest + vmovdqu32 [STATE + 0*SHA256_DIGEST_ROW_SIZE], A + vmovdqu32 [STATE + 1*SHA256_DIGEST_ROW_SIZE], B + vmovdqu32 [STATE + 2*SHA256_DIGEST_ROW_SIZE], C + vmovdqu32 [STATE + 3*SHA256_DIGEST_ROW_SIZE], D + vmovdqu32 [STATE + 4*SHA256_DIGEST_ROW_SIZE], E + vmovdqu32 [STATE + 5*SHA256_DIGEST_ROW_SIZE], F + vmovdqu32 [STATE + 6*SHA256_DIGEST_ROW_SIZE], G + vmovdqu32 [STATE + 7*SHA256_DIGEST_ROW_SIZE], H + + VZEROUPPER + RET + +// +// Tables +// + +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x000(SB)/8, $0x0405060700010203 +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x008(SB)/8, $0x0c0d0e0f08090a0b +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x010(SB)/8, $0x0405060700010203 +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x018(SB)/8, $0x0c0d0e0f08090a0b +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x020(SB)/8, $0x0405060700010203 +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x028(SB)/8, $0x0c0d0e0f08090a0b +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x030(SB)/8, $0x0405060700010203 +DATA PSHUFFLE_BYTE_FLIP_MASK<>+0x038(SB)/8, $0x0c0d0e0f08090a0b +GLOBL PSHUFFLE_BYTE_FLIP_MASK<>(SB), 8, $64 + +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x000(SB)/8, $0x0000000000000000 +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x008(SB)/8, $0x0000000000000001 +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x010(SB)/8, $0x0000000000000008 +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x018(SB)/8, $0x0000000000000009 +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x020(SB)/8, $0x0000000000000004 +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x028(SB)/8, $0x0000000000000005 +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x030(SB)/8, $0x000000000000000C +DATA PSHUFFLE_TRANSPOSE16_MASK1<>+0x038(SB)/8, $0x000000000000000D +GLOBL PSHUFFLE_TRANSPOSE16_MASK1<>(SB), 8, $64 + +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x000(SB)/8, $0x0000000000000002 +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x008(SB)/8, $0x0000000000000003 +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x010(SB)/8, $0x000000000000000A +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x018(SB)/8, $0x000000000000000B +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x020(SB)/8, $0x0000000000000006 +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x028(SB)/8, $0x0000000000000007 +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x030(SB)/8, $0x000000000000000E +DATA PSHUFFLE_TRANSPOSE16_MASK2<>+0x038(SB)/8, $0x000000000000000F +GLOBL PSHUFFLE_TRANSPOSE16_MASK2<>(SB), 8, $64 diff --git a/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE deleted file mode 100644 index f9c841a51..000000000 --- a/vendor/github.com/mitchellh/go-homedir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -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/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go deleted file mode 100644 index 47e1f9ef8..000000000 --- a/vendor/github.com/mitchellh/go-homedir/homedir.go +++ /dev/null @@ -1,137 +0,0 @@ -package homedir - -import ( - "bytes" - "errors" - "os" - "os/exec" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" -) - -// DisableCache will disable caching of the home directory. Caching is enabled -// by default. -var DisableCache bool - -var homedirCache string -var cacheLock sync.RWMutex - -// Dir returns the home directory for the executing user. -// -// This uses an OS-specific method for discovering the home directory. -// An error is returned if a home directory cannot be detected. -func Dir() (string, error) { - if !DisableCache { - cacheLock.RLock() - cached := homedirCache - cacheLock.RUnlock() - if cached != "" { - return cached, nil - } - } - - cacheLock.Lock() - defer cacheLock.Unlock() - - var result string - var err error - if runtime.GOOS == "windows" { - result, err = dirWindows() - } else { - // Unix-like system, so just assume Unix - result, err = dirUnix() - } - - if err != nil { - return "", err - } - homedirCache = result - return result, nil -} - -// Expand expands the path to include the home directory if the path -// is prefixed with `~`. If it isn't prefixed with `~`, the path is -// returned as-is. -func Expand(path string) (string, error) { - if len(path) == 0 { - return path, nil - } - - if path[0] != '~' { - return path, nil - } - - if len(path) > 1 && path[1] != '/' && path[1] != '\\' { - return "", errors.New("cannot expand user-specific home dir") - } - - dir, err := Dir() - if err != nil { - return "", err - } - - return filepath.Join(dir, path[1:]), nil -} - -func dirUnix() (string, error) { - // First prefer the HOME environmental variable - if home := os.Getenv("HOME"); home != "" { - return home, nil - } - - // If that fails, try getent - var stdout bytes.Buffer - cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid())) - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - // If the error is ErrNotFound, we ignore it. Otherwise, return it. - if err != exec.ErrNotFound { - return "", err - } - } else { - if passwd := strings.TrimSpace(stdout.String()); passwd != "" { - // username:password:uid:gid:gecos:home:shell - passwdParts := strings.SplitN(passwd, ":", 7) - if len(passwdParts) > 5 { - return passwdParts[5], nil - } - } - } - - // If all else fails, try the shell - stdout.Reset() - cmd = exec.Command("sh", "-c", "cd && pwd") - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - return "", err - } - - result := strings.TrimSpace(stdout.String()) - if result == "" { - return "", errors.New("blank output when reading home directory") - } - - return result, nil -} - -func dirWindows() (string, error) { - // First prefer the HOME environmental variable - if home := os.Getenv("HOME"); home != "" { - return home, nil - } - - drive := os.Getenv("HOMEDRIVE") - path := os.Getenv("HOMEPATH") - home := drive + path - if drive == "" || path == "" { - home = os.Getenv("USERPROFILE") - } - if home == "" { - return "", errors.New("HOMEDRIVE, HOMEPATH, and USERPROFILE are blank") - } - - return home, nil -} diff --git a/vendor/github.com/onsi/ginkgo/LICENSE b/vendor/github.com/onsi/ginkgo/LICENSE deleted file mode 100644 index 9415ee72c..000000000 --- a/vendor/github.com/onsi/ginkgo/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -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/onsi/ginkgo/config/config.go b/vendor/github.com/onsi/ginkgo/config/config.go deleted file mode 100644 index b6e1248bd..000000000 --- a/vendor/github.com/onsi/ginkgo/config/config.go +++ /dev/null @@ -1,193 +0,0 @@ -/* -Ginkgo accepts a number of configuration options. - -These are documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) - -You can also learn more via - - ginkgo help - -or (I kid you not): - - go test -asdf -*/ -package config - -import ( - "flag" - "time" - - "fmt" -) - -const VERSION = "1.4.0" - -type GinkgoConfigType struct { - RandomSeed int64 - RandomizeAllSpecs bool - RegexScansFilePath bool - FocusString string - SkipString string - SkipMeasurements bool - FailOnPending bool - FailFast bool - FlakeAttempts int - EmitSpecProgress bool - DryRun bool - - ParallelNode int - ParallelTotal int - SyncHost string - StreamHost string -} - -var GinkgoConfig = GinkgoConfigType{} - -type DefaultReporterConfigType struct { - NoColor bool - SlowSpecThreshold float64 - NoisyPendings bool - NoisySkippings bool - Succinct bool - Verbose bool - FullTrace bool -} - -var DefaultReporterConfig = DefaultReporterConfigType{} - -func processPrefix(prefix string) string { - if prefix != "" { - prefix = prefix + "." - } - return prefix -} - -func Flags(flagSet *flag.FlagSet, prefix string, includeParallelFlags bool) { - prefix = processPrefix(prefix) - flagSet.Int64Var(&(GinkgoConfig.RandomSeed), prefix+"seed", time.Now().Unix(), "The seed used to randomize the spec suite.") - flagSet.BoolVar(&(GinkgoConfig.RandomizeAllSpecs), prefix+"randomizeAllSpecs", false, "If set, ginkgo will randomize all specs together. By default, ginkgo only randomizes the top level Describe/Context groups.") - flagSet.BoolVar(&(GinkgoConfig.SkipMeasurements), prefix+"skipMeasurements", false, "If set, ginkgo will skip any measurement specs.") - flagSet.BoolVar(&(GinkgoConfig.FailOnPending), prefix+"failOnPending", false, "If set, ginkgo will mark the test suite as failed if any specs are pending.") - flagSet.BoolVar(&(GinkgoConfig.FailFast), prefix+"failFast", false, "If set, ginkgo will stop running a test suite after a failure occurs.") - - flagSet.BoolVar(&(GinkgoConfig.DryRun), prefix+"dryRun", false, "If set, ginkgo will walk the test hierarchy without actually running anything. Best paired with -v.") - - flagSet.StringVar(&(GinkgoConfig.FocusString), prefix+"focus", "", "If set, ginkgo will only run specs that match this regular expression.") - flagSet.StringVar(&(GinkgoConfig.SkipString), prefix+"skip", "", "If set, ginkgo will only run specs that do not match this regular expression.") - - flagSet.BoolVar(&(GinkgoConfig.RegexScansFilePath), prefix+"regexScansFilePath", false, "If set, ginkgo regex matching also will look at the file path (code location).") - - flagSet.IntVar(&(GinkgoConfig.FlakeAttempts), prefix+"flakeAttempts", 1, "Make up to this many attempts to run each spec. Please note that if any of the attempts succeed, the suite will not be failed. But any failures will still be recorded.") - - flagSet.BoolVar(&(GinkgoConfig.EmitSpecProgress), prefix+"progress", false, "If set, ginkgo will emit progress information as each spec runs to the GinkgoWriter.") - - if includeParallelFlags { - flagSet.IntVar(&(GinkgoConfig.ParallelNode), prefix+"parallel.node", 1, "This worker node's (one-indexed) node number. For running specs in parallel.") - flagSet.IntVar(&(GinkgoConfig.ParallelTotal), prefix+"parallel.total", 1, "The total number of worker nodes. For running specs in parallel.") - flagSet.StringVar(&(GinkgoConfig.SyncHost), prefix+"parallel.synchost", "", "The address for the server that will synchronize the running nodes.") - flagSet.StringVar(&(GinkgoConfig.StreamHost), prefix+"parallel.streamhost", "", "The address for the server that the running nodes should stream data to.") - } - - flagSet.BoolVar(&(DefaultReporterConfig.NoColor), prefix+"noColor", false, "If set, suppress color output in default reporter.") - flagSet.Float64Var(&(DefaultReporterConfig.SlowSpecThreshold), prefix+"slowSpecThreshold", 5.0, "(in seconds) Specs that take longer to run than this threshold are flagged as slow by the default reporter.") - flagSet.BoolVar(&(DefaultReporterConfig.NoisyPendings), prefix+"noisyPendings", true, "If set, default reporter will shout about pending tests.") - flagSet.BoolVar(&(DefaultReporterConfig.NoisySkippings), prefix+"noisySkippings", true, "If set, default reporter will shout about skipping tests.") - flagSet.BoolVar(&(DefaultReporterConfig.Verbose), prefix+"v", false, "If set, default reporter print out all specs as they begin.") - flagSet.BoolVar(&(DefaultReporterConfig.Succinct), prefix+"succinct", false, "If set, default reporter prints out a very succinct report") - flagSet.BoolVar(&(DefaultReporterConfig.FullTrace), prefix+"trace", false, "If set, default reporter prints out the full stack trace when a failure occurs") -} - -func BuildFlagArgs(prefix string, ginkgo GinkgoConfigType, reporter DefaultReporterConfigType) []string { - prefix = processPrefix(prefix) - result := make([]string, 0) - - if ginkgo.RandomSeed > 0 { - result = append(result, fmt.Sprintf("--%sseed=%d", prefix, ginkgo.RandomSeed)) - } - - if ginkgo.RandomizeAllSpecs { - result = append(result, fmt.Sprintf("--%srandomizeAllSpecs", prefix)) - } - - if ginkgo.SkipMeasurements { - result = append(result, fmt.Sprintf("--%sskipMeasurements", prefix)) - } - - if ginkgo.FailOnPending { - result = append(result, fmt.Sprintf("--%sfailOnPending", prefix)) - } - - if ginkgo.FailFast { - result = append(result, fmt.Sprintf("--%sfailFast", prefix)) - } - - if ginkgo.DryRun { - result = append(result, fmt.Sprintf("--%sdryRun", prefix)) - } - - if ginkgo.FocusString != "" { - result = append(result, fmt.Sprintf("--%sfocus=%s", prefix, ginkgo.FocusString)) - } - - if ginkgo.SkipString != "" { - result = append(result, fmt.Sprintf("--%sskip=%s", prefix, ginkgo.SkipString)) - } - - if ginkgo.FlakeAttempts > 1 { - result = append(result, fmt.Sprintf("--%sflakeAttempts=%d", prefix, ginkgo.FlakeAttempts)) - } - - if ginkgo.EmitSpecProgress { - result = append(result, fmt.Sprintf("--%sprogress", prefix)) - } - - if ginkgo.ParallelNode != 0 { - result = append(result, fmt.Sprintf("--%sparallel.node=%d", prefix, ginkgo.ParallelNode)) - } - - if ginkgo.ParallelTotal != 0 { - result = append(result, fmt.Sprintf("--%sparallel.total=%d", prefix, ginkgo.ParallelTotal)) - } - - if ginkgo.StreamHost != "" { - result = append(result, fmt.Sprintf("--%sparallel.streamhost=%s", prefix, ginkgo.StreamHost)) - } - - if ginkgo.SyncHost != "" { - result = append(result, fmt.Sprintf("--%sparallel.synchost=%s", prefix, ginkgo.SyncHost)) - } - - if ginkgo.RegexScansFilePath { - result = append(result, fmt.Sprintf("--%sregexScansFilePath", prefix)) - } - - if reporter.NoColor { - result = append(result, fmt.Sprintf("--%snoColor", prefix)) - } - - if reporter.SlowSpecThreshold > 0 { - result = append(result, fmt.Sprintf("--%sslowSpecThreshold=%.5f", prefix, reporter.SlowSpecThreshold)) - } - - if !reporter.NoisyPendings { - result = append(result, fmt.Sprintf("--%snoisyPendings=false", prefix)) - } - - if !reporter.NoisySkippings { - result = append(result, fmt.Sprintf("--%snoisySkippings=false", prefix)) - } - - if reporter.Verbose { - result = append(result, fmt.Sprintf("--%sv", prefix)) - } - - if reporter.Succinct { - result = append(result, fmt.Sprintf("--%ssuccinct", prefix)) - } - - if reporter.FullTrace { - result = append(result, fmt.Sprintf("--%strace", prefix)) - } - - return result -} diff --git a/vendor/github.com/onsi/ginkgo/extensions/table/table.go b/vendor/github.com/onsi/ginkgo/extensions/table/table.go deleted file mode 100644 index ae8ab7d24..000000000 --- a/vendor/github.com/onsi/ginkgo/extensions/table/table.go +++ /dev/null @@ -1,98 +0,0 @@ -/* - -Table provides a simple DSL for Ginkgo-native Table-Driven Tests - -The godoc documentation describes Table's API. More comprehensive documentation (with examples!) is available at http://onsi.github.io/ginkgo#table-driven-tests - -*/ - -package table - -import ( - "fmt" - "reflect" - - "github.com/onsi/ginkgo" -) - -/* -DescribeTable describes a table-driven test. - -For example: - - DescribeTable("a simple table", - func(x int, y int, expected bool) { - Ω(x > y).Should(Equal(expected)) - }, - Entry("x > y", 1, 0, true), - Entry("x == y", 0, 0, false), - Entry("x < y", 0, 1, false), - ) - -The first argument to `DescribeTable` is a string description. -The second argument is a function that will be run for each table entry. Your assertions go here - the function is equivalent to a Ginkgo It. -The subsequent arguments must be of type `TableEntry`. We recommend using the `Entry` convenience constructors. - -The `Entry` constructor takes a string description followed by an arbitrary set of parameters. These parameters are passed into your function. - -Under the hood, `DescribeTable` simply generates a new Ginkgo `Describe`. Each `Entry` is turned into an `It` within the `Describe`. - -It's important to understand that the `Describe`s and `It`s are generated at evaluation time (i.e. when Ginkgo constructs the tree of tests and before the tests run). - -Individual Entries can be focused (with FEntry) or marked pending (with PEntry or XEntry). In addition, the entire table can be focused or marked pending with FDescribeTable and PDescribeTable/XDescribeTable. -*/ -func DescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { - describeTable(description, itBody, entries, false, false) - return true -} - -/* -You can focus a table with `FDescribeTable`. This is equivalent to `FDescribe`. -*/ -func FDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { - describeTable(description, itBody, entries, false, true) - return true -} - -/* -You can mark a table as pending with `PDescribeTable`. This is equivalent to `PDescribe`. -*/ -func PDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { - describeTable(description, itBody, entries, true, false) - return true -} - -/* -You can mark a table as pending with `XDescribeTable`. This is equivalent to `XDescribe`. -*/ -func XDescribeTable(description string, itBody interface{}, entries ...TableEntry) bool { - describeTable(description, itBody, entries, true, false) - return true -} - -func describeTable(description string, itBody interface{}, entries []TableEntry, pending bool, focused bool) { - itBodyValue := reflect.ValueOf(itBody) - if itBodyValue.Kind() != reflect.Func { - panic(fmt.Sprintf("DescribeTable expects a function, got %#v", itBody)) - } - - if pending { - ginkgo.PDescribe(description, func() { - for _, entry := range entries { - entry.generateIt(itBodyValue) - } - }) - } else if focused { - ginkgo.FDescribe(description, func() { - for _, entry := range entries { - entry.generateIt(itBodyValue) - } - }) - } else { - ginkgo.Describe(description, func() { - for _, entry := range entries { - entry.generateIt(itBodyValue) - } - }) - } -} diff --git a/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go b/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go deleted file mode 100644 index 5fa645bce..000000000 --- a/vendor/github.com/onsi/ginkgo/extensions/table/table_entry.go +++ /dev/null @@ -1,81 +0,0 @@ -package table - -import ( - "reflect" - - "github.com/onsi/ginkgo" -) - -/* -TableEntry represents an entry in a table test. You generally use the `Entry` constructor. -*/ -type TableEntry struct { - Description string - Parameters []interface{} - Pending bool - Focused bool -} - -func (t TableEntry) generateIt(itBody reflect.Value) { - if t.Pending { - ginkgo.PIt(t.Description) - return - } - - values := []reflect.Value{} - for i, param := range t.Parameters { - var value reflect.Value - - if param == nil { - inType := itBody.Type().In(i) - value = reflect.Zero(inType) - } else { - value = reflect.ValueOf(param) - } - - values = append(values, value) - } - - body := func() { - itBody.Call(values) - } - - if t.Focused { - ginkgo.FIt(t.Description, body) - } else { - ginkgo.It(t.Description, body) - } -} - -/* -Entry constructs a TableEntry. - -The first argument is a required description (this becomes the content of the generated Ginkgo `It`). -Subsequent parameters are saved off and sent to the callback passed in to `DescribeTable`. - -Each Entry ends up generating an individual Ginkgo It. -*/ -func Entry(description string, parameters ...interface{}) TableEntry { - return TableEntry{description, parameters, false, false} -} - -/* -You can focus a particular entry with FEntry. This is equivalent to FIt. -*/ -func FEntry(description string, parameters ...interface{}) TableEntry { - return TableEntry{description, parameters, false, true} -} - -/* -You can mark a particular entry as pending with PEntry. This is equivalent to PIt. -*/ -func PEntry(description string, parameters ...interface{}) TableEntry { - return TableEntry{description, parameters, true, false} -} - -/* -You can mark a particular entry as pending with XEntry. This is equivalent to XIt. -*/ -func XEntry(description string, parameters ...interface{}) TableEntry { - return TableEntry{description, parameters, true, false} -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/bootstrap_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/bootstrap_command.go deleted file mode 100644 index fea4d4d4e..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/bootstrap_command.go +++ /dev/null @@ -1,202 +0,0 @@ -package main - -import ( - "bytes" - "flag" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "strings" - "text/template" - - "go/build" - - "github.com/onsi/ginkgo/ginkgo/nodot" -) - -func BuildBootstrapCommand() *Command { - var ( - agouti, noDot, internal bool - customBootstrapFile string - ) - flagSet := flag.NewFlagSet("bootstrap", flag.ExitOnError) - flagSet.BoolVar(&agouti, "agouti", false, "If set, bootstrap will generate a bootstrap file for writing Agouti tests") - flagSet.BoolVar(&noDot, "nodot", false, "If set, bootstrap will generate a bootstrap file that does not . import ginkgo and gomega") - flagSet.BoolVar(&internal, "internal", false, "If set, generate will generate a test file that uses the regular package name") - flagSet.StringVar(&customBootstrapFile, "template", "", "If specified, generate will use the contents of the file passed as the bootstrap template") - - return &Command{ - Name: "bootstrap", - FlagSet: flagSet, - UsageCommand: "ginkgo bootstrap ", - Usage: []string{ - "Bootstrap a test suite for the current package", - "Accepts the following flags:", - }, - Command: func(args []string, additionalArgs []string) { - generateBootstrap(agouti, noDot, internal, customBootstrapFile) - }, - } -} - -var bootstrapText = `package {{.Package}} - -import ( - "testing" - - {{.GinkgoImport}} - {{.GomegaImport}} -) - -func Test{{.FormattedName}}(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "{{.FormattedName}} Suite") -} -` - -var agoutiBootstrapText = `package {{.Package}} - -import ( - "testing" - - {{.GinkgoImport}} - {{.GomegaImport}} - "github.com/sclevine/agouti" -) - -func Test{{.FormattedName}}(t *testing.T) { - RegisterFailHandler(Fail) - RunSpecs(t, "{{.FormattedName}} Suite") -} - -var agoutiDriver *agouti.WebDriver - -var _ = BeforeSuite(func() { - // Choose a WebDriver: - - agoutiDriver = agouti.PhantomJS() - // agoutiDriver = agouti.Selenium() - // agoutiDriver = agouti.ChromeDriver() - - Expect(agoutiDriver.Start()).To(Succeed()) -}) - -var _ = AfterSuite(func() { - Expect(agoutiDriver.Stop()).To(Succeed()) -}) -` - -type bootstrapData struct { - Package string - FormattedName string - GinkgoImport string - GomegaImport string -} - -func getPackageAndFormattedName() (string, string, string) { - path, err := os.Getwd() - if err != nil { - complainAndQuit("Could not get current working directory: \n" + err.Error()) - } - - dirName := strings.Replace(filepath.Base(path), "-", "_", -1) - dirName = strings.Replace(dirName, " ", "_", -1) - - pkg, err := build.ImportDir(path, 0) - packageName := pkg.Name - if err != nil { - packageName = dirName - } - - formattedName := prettifyPackageName(filepath.Base(path)) - return packageName, dirName, formattedName -} - -func prettifyPackageName(name string) string { - name = strings.Replace(name, "-", " ", -1) - name = strings.Replace(name, "_", " ", -1) - name = strings.Title(name) - name = strings.Replace(name, " ", "", -1) - return name -} - -func determinePackageName(name string, internal bool) string { - if internal { - return name - } - - return name + "_test" -} - -func fileExists(path string) bool { - _, err := os.Stat(path) - if err == nil { - return true - } - return false -} - -func generateBootstrap(agouti, noDot, internal bool, customBootstrapFile string) { - packageName, bootstrapFilePrefix, formattedName := getPackageAndFormattedName() - data := bootstrapData{ - Package: determinePackageName(packageName, internal), - FormattedName: formattedName, - GinkgoImport: `. "github.com/onsi/ginkgo"`, - GomegaImport: `. "github.com/onsi/gomega"`, - } - - if noDot { - data.GinkgoImport = `"github.com/onsi/ginkgo"` - data.GomegaImport = `"github.com/onsi/gomega"` - } - - targetFile := fmt.Sprintf("%s_suite_test.go", bootstrapFilePrefix) - if fileExists(targetFile) { - fmt.Printf("%s already exists.\n\n", targetFile) - os.Exit(1) - } else { - fmt.Printf("Generating ginkgo test suite bootstrap for %s in:\n\t%s\n", packageName, targetFile) - } - - f, err := os.Create(targetFile) - if err != nil { - complainAndQuit("Could not create file: " + err.Error()) - panic(err.Error()) - } - defer f.Close() - - var templateText string - if customBootstrapFile != "" { - tpl, err := ioutil.ReadFile(customBootstrapFile) - if err != nil { - panic(err.Error()) - } - templateText = string(tpl) - } else if agouti { - templateText = agoutiBootstrapText - } else { - templateText = bootstrapText - } - - bootstrapTemplate, err := template.New("bootstrap").Parse(templateText) - if err != nil { - panic(err.Error()) - } - - buf := &bytes.Buffer{} - bootstrapTemplate.Execute(buf, data) - - if noDot { - contents, err := nodot.ApplyNoDot(buf.Bytes()) - if err != nil { - complainAndQuit("Failed to import nodot declarations: " + err.Error()) - } - fmt.Println("To update the nodot declarations in the future, switch to this directory and run:\n\tginkgo nodot") - buf = bytes.NewBuffer(contents) - } - - buf.WriteTo(f) - - goFmt(targetFile) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/build_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/build_command.go deleted file mode 100644 index f0eb375c3..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/build_command.go +++ /dev/null @@ -1,68 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os" - "path/filepath" - - "github.com/onsi/ginkgo/ginkgo/interrupthandler" - "github.com/onsi/ginkgo/ginkgo/testrunner" -) - -func BuildBuildCommand() *Command { - commandFlags := NewBuildCommandFlags(flag.NewFlagSet("build", flag.ExitOnError)) - interruptHandler := interrupthandler.NewInterruptHandler() - builder := &SpecBuilder{ - commandFlags: commandFlags, - interruptHandler: interruptHandler, - } - - return &Command{ - Name: "build", - FlagSet: commandFlags.FlagSet, - UsageCommand: "ginkgo build ", - Usage: []string{ - "Build the passed in (or the package in the current directory if left blank).", - "Accepts the following flags:", - }, - Command: builder.BuildSpecs, - } -} - -type SpecBuilder struct { - commandFlags *RunWatchAndBuildCommandFlags - interruptHandler *interrupthandler.InterruptHandler -} - -func (r *SpecBuilder) BuildSpecs(args []string, additionalArgs []string) { - r.commandFlags.computeNodes() - - suites, _ := findSuites(args, r.commandFlags.Recurse, r.commandFlags.SkipPackage, false) - - if len(suites) == 0 { - complainAndQuit("Found no test suites") - } - - passed := true - for _, suite := range suites { - runner := testrunner.New(suite, 1, false, 0, r.commandFlags.GoOpts, nil) - fmt.Printf("Compiling %s...\n", suite.PackageName) - - path, _ := filepath.Abs(filepath.Join(suite.Path, fmt.Sprintf("%s.test", suite.PackageName))) - err := runner.CompileTo(path) - if err != nil { - fmt.Println(err.Error()) - passed = false - } else { - fmt.Printf(" compiled %s.test\n", suite.PackageName) - } - - runner.CleanUp() - } - - if passed { - os.Exit(0) - } - os.Exit(1) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert/ginkgo_ast_nodes.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert/ginkgo_ast_nodes.go deleted file mode 100644 index 02e2b3b32..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert/ginkgo_ast_nodes.go +++ /dev/null @@ -1,123 +0,0 @@ -package convert - -import ( - "fmt" - "go/ast" - "strings" - "unicode" -) - -/* - * Creates a func init() node - */ -func createVarUnderscoreBlock() *ast.ValueSpec { - valueSpec := &ast.ValueSpec{} - object := &ast.Object{Kind: 4, Name: "_", Decl: valueSpec, Data: 0} - ident := &ast.Ident{Name: "_", Obj: object} - valueSpec.Names = append(valueSpec.Names, ident) - return valueSpec -} - -/* - * Creates a Describe("Testing with ginkgo", func() { }) node - */ -func createDescribeBlock() *ast.CallExpr { - blockStatement := &ast.BlockStmt{List: []ast.Stmt{}} - - fieldList := &ast.FieldList{} - funcType := &ast.FuncType{Params: fieldList} - funcLit := &ast.FuncLit{Type: funcType, Body: blockStatement} - basicLit := &ast.BasicLit{Kind: 9, Value: "\"Testing with Ginkgo\""} - describeIdent := &ast.Ident{Name: "Describe"} - return &ast.CallExpr{Fun: describeIdent, Args: []ast.Expr{basicLit, funcLit}} -} - -/* - * Convenience function to return the name of the *testing.T param - * for a Test function that will be rewritten. This is useful because - * we will want to replace the usage of this named *testing.T inside the - * body of the function with a GinktoT. - */ -func namedTestingTArg(node *ast.FuncDecl) string { - return node.Type.Params.List[0].Names[0].Name // *exhale* -} - -/* - * Convenience function to return the block statement node for a Describe statement - */ -func blockStatementFromDescribe(desc *ast.CallExpr) *ast.BlockStmt { - var funcLit *ast.FuncLit - var found = false - - for _, node := range desc.Args { - switch node := node.(type) { - case *ast.FuncLit: - found = true - funcLit = node - break - } - } - - if !found { - panic("Error finding ast.FuncLit inside describe statement. Somebody done goofed.") - } - - return funcLit.Body -} - -/* convenience function for creating an It("TestNameHere") - * with all the body of the test function inside the anonymous - * func passed to It() - */ -func createItStatementForTestFunc(testFunc *ast.FuncDecl) *ast.ExprStmt { - blockStatement := &ast.BlockStmt{List: testFunc.Body.List} - fieldList := &ast.FieldList{} - funcType := &ast.FuncType{Params: fieldList} - funcLit := &ast.FuncLit{Type: funcType, Body: blockStatement} - - testName := rewriteTestName(testFunc.Name.Name) - basicLit := &ast.BasicLit{Kind: 9, Value: fmt.Sprintf("\"%s\"", testName)} - itBlockIdent := &ast.Ident{Name: "It"} - callExpr := &ast.CallExpr{Fun: itBlockIdent, Args: []ast.Expr{basicLit, funcLit}} - return &ast.ExprStmt{X: callExpr} -} - -/* -* rewrite test names to be human readable -* eg: rewrites "TestSomethingAmazing" as "something amazing" - */ -func rewriteTestName(testName string) string { - nameComponents := []string{} - currentString := "" - indexOfTest := strings.Index(testName, "Test") - if indexOfTest != 0 { - return testName - } - - testName = strings.Replace(testName, "Test", "", 1) - first, rest := testName[0], testName[1:] - testName = string(unicode.ToLower(rune(first))) + rest - - for _, rune := range testName { - if unicode.IsUpper(rune) { - nameComponents = append(nameComponents, currentString) - currentString = string(unicode.ToLower(rune)) - } else { - currentString += string(rune) - } - } - - return strings.Join(append(nameComponents, currentString), " ") -} - -func newGinkgoTFromIdent(ident *ast.Ident) *ast.CallExpr { - return &ast.CallExpr{ - Lparen: ident.NamePos + 1, - Rparen: ident.NamePos + 2, - Fun: &ast.Ident{Name: "GinkgoT"}, - } -} - -func newGinkgoTInterface() *ast.Ident { - return &ast.Ident{Name: "GinkgoTInterface"} -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert/import.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert/import.go deleted file mode 100644 index e226196f7..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert/import.go +++ /dev/null @@ -1,91 +0,0 @@ -package convert - -import ( - "errors" - "fmt" - "go/ast" -) - -/* - * Given the root node of an AST, returns the node containing the - * import statements for the file. - */ -func importsForRootNode(rootNode *ast.File) (imports *ast.GenDecl, err error) { - for _, declaration := range rootNode.Decls { - decl, ok := declaration.(*ast.GenDecl) - if !ok || len(decl.Specs) == 0 { - continue - } - - _, ok = decl.Specs[0].(*ast.ImportSpec) - if ok { - imports = decl - return - } - } - - err = errors.New(fmt.Sprintf("Could not find imports for root node:\n\t%#v\n", rootNode)) - return -} - -/* - * Removes "testing" import, if present - */ -func removeTestingImport(rootNode *ast.File) { - importDecl, err := importsForRootNode(rootNode) - if err != nil { - panic(err.Error()) - } - - var index int - for i, importSpec := range importDecl.Specs { - importSpec := importSpec.(*ast.ImportSpec) - if importSpec.Path.Value == "\"testing\"" { - index = i - break - } - } - - importDecl.Specs = append(importDecl.Specs[:index], importDecl.Specs[index+1:]...) -} - -/* - * Adds import statements for onsi/ginkgo, if missing - */ -func addGinkgoImports(rootNode *ast.File) { - importDecl, err := importsForRootNode(rootNode) - if err != nil { - panic(err.Error()) - } - - if len(importDecl.Specs) == 0 { - // TODO: might need to create a import decl here - panic("unimplemented : expected to find an imports block") - } - - needsGinkgo := true - for _, importSpec := range importDecl.Specs { - importSpec, ok := importSpec.(*ast.ImportSpec) - if !ok { - continue - } - - if importSpec.Path.Value == "\"github.com/onsi/ginkgo\"" { - needsGinkgo = false - } - } - - if needsGinkgo { - importDecl.Specs = append(importDecl.Specs, createImport(".", "\"github.com/onsi/ginkgo\"")) - } -} - -/* - * convenience function to create an import statement - */ -func createImport(name, path string) *ast.ImportSpec { - return &ast.ImportSpec{ - Name: &ast.Ident{Name: name}, - Path: &ast.BasicLit{Kind: 9, Value: path}, - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert/package_rewriter.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert/package_rewriter.go deleted file mode 100644 index ed09c460d..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert/package_rewriter.go +++ /dev/null @@ -1,127 +0,0 @@ -package convert - -import ( - "fmt" - "go/build" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "regexp" -) - -/* - * RewritePackage takes a name (eg: my-package/tools), finds its test files using - * Go's build package, and then rewrites them. A ginkgo test suite file will - * also be added for this package, and all of its child packages. - */ -func RewritePackage(packageName string) { - pkg, err := packageWithName(packageName) - if err != nil { - panic(fmt.Sprintf("unexpected error reading package: '%s'\n%s\n", packageName, err.Error())) - } - - for _, filename := range findTestsInPackage(pkg) { - rewriteTestsInFile(filename) - } - return -} - -/* - * Given a package, findTestsInPackage reads the test files in the directory, - * and then recurses on each child package, returning a slice of all test files - * found in this process. - */ -func findTestsInPackage(pkg *build.Package) (testfiles []string) { - for _, file := range append(pkg.TestGoFiles, pkg.XTestGoFiles...) { - testfiles = append(testfiles, filepath.Join(pkg.Dir, file)) - } - - dirFiles, err := ioutil.ReadDir(pkg.Dir) - if err != nil { - panic(fmt.Sprintf("unexpected error reading dir: '%s'\n%s\n", pkg.Dir, err.Error())) - } - - re := regexp.MustCompile(`^[._]`) - - for _, file := range dirFiles { - if !file.IsDir() { - continue - } - - if re.Match([]byte(file.Name())) { - continue - } - - packageName := filepath.Join(pkg.ImportPath, file.Name()) - subPackage, err := packageWithName(packageName) - if err != nil { - panic(fmt.Sprintf("unexpected error reading package: '%s'\n%s\n", packageName, err.Error())) - } - - testfiles = append(testfiles, findTestsInPackage(subPackage)...) - } - - addGinkgoSuiteForPackage(pkg) - goFmtPackage(pkg) - return -} - -/* - * Shells out to `ginkgo bootstrap` to create a test suite file - */ -func addGinkgoSuiteForPackage(pkg *build.Package) { - originalDir, err := os.Getwd() - if err != nil { - panic(err) - } - - suite_test_file := filepath.Join(pkg.Dir, pkg.Name+"_suite_test.go") - - _, err = os.Stat(suite_test_file) - if err == nil { - return // test file already exists, this should be a no-op - } - - err = os.Chdir(pkg.Dir) - if err != nil { - panic(err) - } - - output, err := exec.Command("ginkgo", "bootstrap").Output() - - if err != nil { - panic(fmt.Sprintf("error running 'ginkgo bootstrap'.\nstdout: %s\n%s\n", output, err.Error())) - } - - err = os.Chdir(originalDir) - if err != nil { - panic(err) - } -} - -/* - * Shells out to `go fmt` to format the package - */ -func goFmtPackage(pkg *build.Package) { - output, err := exec.Command("go", "fmt", pkg.ImportPath).Output() - - if err != nil { - fmt.Printf("Warning: Error running 'go fmt %s'.\nstdout: %s\n%s\n", pkg.ImportPath, output, err.Error()) - } -} - -/* - * Attempts to return a package with its test files already read. - * The ImportMode arg to build.Import lets you specify if you want go to read the - * buildable go files inside the package, but it fails if the package has no go files - */ -func packageWithName(name string) (pkg *build.Package, err error) { - pkg, err = build.Default.Import(name, ".", build.ImportMode(0)) - if err == nil { - return - } - - pkg, err = build.Default.Import(name, ".", build.ImportMode(1)) - return -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert/test_finder.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert/test_finder.go deleted file mode 100644 index b33595c9a..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert/test_finder.go +++ /dev/null @@ -1,56 +0,0 @@ -package convert - -import ( - "go/ast" - "regexp" -) - -/* - * Given a root node, walks its top level statements and returns - * points to function nodes to rewrite as It statements. - * These functions, according to Go testing convention, must be named - * TestWithCamelCasedName and receive a single *testing.T argument. - */ -func findTestFuncs(rootNode *ast.File) (testsToRewrite []*ast.FuncDecl) { - testNameRegexp := regexp.MustCompile("^Test[0-9A-Z].+") - - ast.Inspect(rootNode, func(node ast.Node) bool { - if node == nil { - return false - } - - switch node := node.(type) { - case *ast.FuncDecl: - matches := testNameRegexp.MatchString(node.Name.Name) - - if matches && receivesTestingT(node) { - testsToRewrite = append(testsToRewrite, node) - } - } - - return true - }) - - return -} - -/* - * convenience function that looks at args to a function and determines if its - * params include an argument of type *testing.T - */ -func receivesTestingT(node *ast.FuncDecl) bool { - if len(node.Type.Params.List) != 1 { - return false - } - - base, ok := node.Type.Params.List[0].Type.(*ast.StarExpr) - if !ok { - return false - } - - intermediate := base.X.(*ast.SelectorExpr) - isTestingPackage := intermediate.X.(*ast.Ident).Name == "testing" - isTestingT := intermediate.Sel.Name == "T" - - return isTestingPackage && isTestingT -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert/testfile_rewriter.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert/testfile_rewriter.go deleted file mode 100644 index 4b001a7db..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert/testfile_rewriter.go +++ /dev/null @@ -1,163 +0,0 @@ -package convert - -import ( - "bytes" - "fmt" - "go/ast" - "go/format" - "go/parser" - "go/token" - "io/ioutil" - "os" -) - -/* - * Given a file path, rewrites any tests in the Ginkgo format. - * First, we parse the AST, and update the imports declaration. - * Then, we walk the first child elements in the file, returning tests to rewrite. - * A top level init func is declared, with a single Describe func inside. - * Then the test functions to rewrite are inserted as It statements inside the Describe. - * Finally we walk the rest of the file, replacing other usages of *testing.T - * Once that is complete, we write the AST back out again to its file. - */ -func rewriteTestsInFile(pathToFile string) { - fileSet := token.NewFileSet() - rootNode, err := parser.ParseFile(fileSet, pathToFile, nil, 0) - if err != nil { - panic(fmt.Sprintf("Error parsing test file '%s':\n%s\n", pathToFile, err.Error())) - } - - addGinkgoImports(rootNode) - removeTestingImport(rootNode) - - varUnderscoreBlock := createVarUnderscoreBlock() - describeBlock := createDescribeBlock() - varUnderscoreBlock.Values = []ast.Expr{describeBlock} - - for _, testFunc := range findTestFuncs(rootNode) { - rewriteTestFuncAsItStatement(testFunc, rootNode, describeBlock) - } - - underscoreDecl := &ast.GenDecl{ - Tok: 85, // gah, magick numbers are needed to make this work - TokPos: 14, // this tricks Go into writing "var _ = Describe" - Specs: []ast.Spec{varUnderscoreBlock}, - } - - imports := rootNode.Decls[0] - tail := rootNode.Decls[1:] - rootNode.Decls = append(append([]ast.Decl{imports}, underscoreDecl), tail...) - rewriteOtherFuncsToUseGinkgoT(rootNode.Decls) - walkNodesInRootNodeReplacingTestingT(rootNode) - - var buffer bytes.Buffer - if err = format.Node(&buffer, fileSet, rootNode); err != nil { - panic(fmt.Sprintf("Error formatting ast node after rewriting tests.\n%s\n", err.Error())) - } - - fileInfo, err := os.Stat(pathToFile) - if err != nil { - panic(fmt.Sprintf("Error stat'ing file: %s\n", pathToFile)) - } - - ioutil.WriteFile(pathToFile, buffer.Bytes(), fileInfo.Mode()) - return -} - -/* - * Given a test func named TestDoesSomethingNeat, rewrites it as - * It("does something neat", func() { __test_body_here__ }) and adds it - * to the Describe's list of statements - */ -func rewriteTestFuncAsItStatement(testFunc *ast.FuncDecl, rootNode *ast.File, describe *ast.CallExpr) { - var funcIndex int = -1 - for index, child := range rootNode.Decls { - if child == testFunc { - funcIndex = index - break - } - } - - if funcIndex < 0 { - panic(fmt.Sprintf("Assert failed: Error finding index for test node %s\n", testFunc.Name.Name)) - } - - var block *ast.BlockStmt = blockStatementFromDescribe(describe) - block.List = append(block.List, createItStatementForTestFunc(testFunc)) - replaceTestingTsWithGinkgoT(block, namedTestingTArg(testFunc)) - - // remove the old test func from the root node's declarations - rootNode.Decls = append(rootNode.Decls[:funcIndex], rootNode.Decls[funcIndex+1:]...) - return -} - -/* - * walks nodes inside of a test func's statements and replaces the usage of - * it's named *testing.T param with GinkgoT's - */ -func replaceTestingTsWithGinkgoT(statementsBlock *ast.BlockStmt, testingT string) { - ast.Inspect(statementsBlock, func(node ast.Node) bool { - if node == nil { - return false - } - - keyValueExpr, ok := node.(*ast.KeyValueExpr) - if ok { - replaceNamedTestingTsInKeyValueExpression(keyValueExpr, testingT) - return true - } - - funcLiteral, ok := node.(*ast.FuncLit) - if ok { - replaceTypeDeclTestingTsInFuncLiteral(funcLiteral) - return true - } - - callExpr, ok := node.(*ast.CallExpr) - if !ok { - return true - } - replaceTestingTsInArgsLists(callExpr, testingT) - - funCall, ok := callExpr.Fun.(*ast.SelectorExpr) - if ok { - replaceTestingTsMethodCalls(funCall, testingT) - } - - return true - }) -} - -/* - * rewrite t.Fail() or any other *testing.T method by replacing with T().Fail() - * This function receives a selector expression (eg: t.Fail()) and - * the name of the *testing.T param from the function declaration. Rewrites the - * selector expression in place if the target was a *testing.T - */ -func replaceTestingTsMethodCalls(selectorExpr *ast.SelectorExpr, testingT string) { - ident, ok := selectorExpr.X.(*ast.Ident) - if !ok { - return - } - - if ident.Name == testingT { - selectorExpr.X = newGinkgoTFromIdent(ident) - } -} - -/* - * replaces usages of a named *testing.T param inside of a call expression - * with a new GinkgoT object - */ -func replaceTestingTsInArgsLists(callExpr *ast.CallExpr, testingT string) { - for index, arg := range callExpr.Args { - ident, ok := arg.(*ast.Ident) - if !ok { - continue - } - - if ident.Name == testingT { - callExpr.Args[index] = newGinkgoTFromIdent(ident) - } - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert/testing_t_rewriter.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert/testing_t_rewriter.go deleted file mode 100644 index 418cdc4e5..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert/testing_t_rewriter.go +++ /dev/null @@ -1,130 +0,0 @@ -package convert - -import ( - "go/ast" -) - -/* - * Rewrites any other top level funcs that receive a *testing.T param - */ -func rewriteOtherFuncsToUseGinkgoT(declarations []ast.Decl) { - for _, decl := range declarations { - decl, ok := decl.(*ast.FuncDecl) - if !ok { - continue - } - - for _, param := range decl.Type.Params.List { - starExpr, ok := param.Type.(*ast.StarExpr) - if !ok { - continue - } - - selectorExpr, ok := starExpr.X.(*ast.SelectorExpr) - if !ok { - continue - } - - xIdent, ok := selectorExpr.X.(*ast.Ident) - if !ok || xIdent.Name != "testing" { - continue - } - - if selectorExpr.Sel.Name != "T" { - continue - } - - param.Type = newGinkgoTInterface() - } - } -} - -/* - * Walks all of the nodes in the file, replacing *testing.T in struct - * and func literal nodes. eg: - * type foo struct { *testing.T } - * var bar = func(t *testing.T) { } - */ -func walkNodesInRootNodeReplacingTestingT(rootNode *ast.File) { - ast.Inspect(rootNode, func(node ast.Node) bool { - if node == nil { - return false - } - - switch node := node.(type) { - case *ast.StructType: - replaceTestingTsInStructType(node) - case *ast.FuncLit: - replaceTypeDeclTestingTsInFuncLiteral(node) - } - - return true - }) -} - -/* - * replaces named *testing.T inside a composite literal - */ -func replaceNamedTestingTsInKeyValueExpression(kve *ast.KeyValueExpr, testingT string) { - ident, ok := kve.Value.(*ast.Ident) - if !ok { - return - } - - if ident.Name == testingT { - kve.Value = newGinkgoTFromIdent(ident) - } -} - -/* - * replaces *testing.T params in a func literal with GinkgoT - */ -func replaceTypeDeclTestingTsInFuncLiteral(functionLiteral *ast.FuncLit) { - for _, arg := range functionLiteral.Type.Params.List { - starExpr, ok := arg.Type.(*ast.StarExpr) - if !ok { - continue - } - - selectorExpr, ok := starExpr.X.(*ast.SelectorExpr) - if !ok { - continue - } - - target, ok := selectorExpr.X.(*ast.Ident) - if !ok { - continue - } - - if target.Name == "testing" && selectorExpr.Sel.Name == "T" { - arg.Type = newGinkgoTInterface() - } - } -} - -/* - * Replaces *testing.T types inside of a struct declaration with a GinkgoT - * eg: type foo struct { *testing.T } - */ -func replaceTestingTsInStructType(structType *ast.StructType) { - for _, field := range structType.Fields.List { - starExpr, ok := field.Type.(*ast.StarExpr) - if !ok { - continue - } - - selectorExpr, ok := starExpr.X.(*ast.SelectorExpr) - if !ok { - continue - } - - xIdent, ok := selectorExpr.X.(*ast.Ident) - if !ok { - continue - } - - if xIdent.Name == "testing" && selectorExpr.Sel.Name == "T" { - field.Type = newGinkgoTInterface() - } - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/convert_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/convert_command.go deleted file mode 100644 index 5944ed85c..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/convert_command.go +++ /dev/null @@ -1,45 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os" - - "github.com/onsi/ginkgo/ginkgo/convert" -) - -func BuildConvertCommand() *Command { - return &Command{ - Name: "convert", - FlagSet: flag.NewFlagSet("convert", flag.ExitOnError), - UsageCommand: "ginkgo convert /path/to/package", - Usage: []string{ - "Convert the package at the passed in path from an XUnit-style test to a Ginkgo-style test", - }, - Command: convertPackage, - } -} - -func convertPackage(args []string, additionalArgs []string) { - if len(args) != 1 { - println(fmt.Sprintf("usage: ginkgo convert /path/to/your/package")) - os.Exit(1) - } - - defer func() { - err := recover() - if err != nil { - switch err := err.(type) { - case error: - println(err.Error()) - case string: - println(err) - default: - println(fmt.Sprintf("unexpected error: %#v", err)) - } - os.Exit(1) - } - }() - - convert.RewritePackage(args[0]) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/generate_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/generate_command.go deleted file mode 100644 index 019fd2337..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/generate_command.go +++ /dev/null @@ -1,167 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os" - "path/filepath" - "strings" - "text/template" -) - -func BuildGenerateCommand() *Command { - var agouti, noDot, internal bool - flagSet := flag.NewFlagSet("generate", flag.ExitOnError) - flagSet.BoolVar(&agouti, "agouti", false, "If set, generate will generate a test file for writing Agouti tests") - flagSet.BoolVar(&noDot, "nodot", false, "If set, generate will generate a test file that does not . import ginkgo and gomega") - flagSet.BoolVar(&internal, "internal", false, "If set, generate will generate a test file that uses the regular package name") - - return &Command{ - Name: "generate", - FlagSet: flagSet, - UsageCommand: "ginkgo generate ", - Usage: []string{ - "Generate a test file named filename_test.go", - "If the optional argument is omitted, a file named after the package in the current directory will be created.", - "Accepts the following flags:", - }, - Command: func(args []string, additionalArgs []string) { - generateSpec(args, agouti, noDot, internal) - }, - } -} - -var specText = `package {{.Package}} - -import ( - {{if .IncludeImports}}. "github.com/onsi/ginkgo"{{end}} - {{if .IncludeImports}}. "github.com/onsi/gomega"{{end}} - - {{if .DotImportPackage}}. "{{.PackageImportPath}}"{{end}} -) - -var _ = Describe("{{.Subject}}", func() { - -}) -` - -var agoutiSpecText = `package {{.Package}} - -import ( - {{if .IncludeImports}}. "github.com/onsi/ginkgo"{{end}} - {{if .IncludeImports}}. "github.com/onsi/gomega"{{end}} - "github.com/sclevine/agouti" - . "github.com/sclevine/agouti/matchers" - - {{if .DotImportPackage}}. "{{.PackageImportPath}}"{{end}} -) - -var _ = Describe("{{.Subject}}", func() { - var page *agouti.Page - - BeforeEach(func() { - var err error - page, err = agoutiDriver.NewPage() - Expect(err).NotTo(HaveOccurred()) - }) - - AfterEach(func() { - Expect(page.Destroy()).To(Succeed()) - }) -}) -` - -type specData struct { - Package string - Subject string - PackageImportPath string - IncludeImports bool - DotImportPackage bool -} - -func generateSpec(args []string, agouti, noDot, internal bool) { - if len(args) == 0 { - err := generateSpecForSubject("", agouti, noDot, internal) - if err != nil { - fmt.Println(err.Error()) - fmt.Println("") - os.Exit(1) - } - fmt.Println("") - return - } - - var failed bool - for _, arg := range args { - err := generateSpecForSubject(arg, agouti, noDot, internal) - if err != nil { - failed = true - fmt.Println(err.Error()) - } - } - fmt.Println("") - if failed { - os.Exit(1) - } -} - -func generateSpecForSubject(subject string, agouti, noDot, internal bool) error { - packageName, specFilePrefix, formattedName := getPackageAndFormattedName() - if subject != "" { - subject = strings.Split(subject, ".go")[0] - subject = strings.Split(subject, "_test")[0] - specFilePrefix = subject - formattedName = prettifyPackageName(subject) - } - - data := specData{ - Package: determinePackageName(packageName, internal), - Subject: formattedName, - PackageImportPath: getPackageImportPath(), - IncludeImports: !noDot, - DotImportPackage: !internal, - } - - targetFile := fmt.Sprintf("%s_test.go", specFilePrefix) - if fileExists(targetFile) { - return fmt.Errorf("%s already exists.", targetFile) - } else { - fmt.Printf("Generating ginkgo test for %s in:\n %s\n", data.Subject, targetFile) - } - - f, err := os.Create(targetFile) - if err != nil { - return err - } - defer f.Close() - - var templateText string - if agouti { - templateText = agoutiSpecText - } else { - templateText = specText - } - - specTemplate, err := template.New("spec").Parse(templateText) - if err != nil { - return err - } - - specTemplate.Execute(f, data) - goFmt(targetFile) - return nil -} - -func getPackageImportPath() string { - workingDir, err := os.Getwd() - if err != nil { - panic(err.Error()) - } - sep := string(filepath.Separator) - paths := strings.Split(workingDir, sep+"src"+sep) - if len(paths) == 1 { - fmt.Printf("\nCouldn't identify package import path.\n\n\tginkgo generate\n\nMust be run within a package directory under $GOPATH/src/...\nYou're going to have to change UNKNOWN_PACKAGE_PATH in the generated file...\n\n") - return "UNKNOWN_PACKAGE_PATH" - } - return filepath.ToSlash(paths[len(paths)-1]) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/help_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/help_command.go deleted file mode 100644 index 23b1d2f11..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/help_command.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "flag" - "fmt" -) - -func BuildHelpCommand() *Command { - return &Command{ - Name: "help", - FlagSet: flag.NewFlagSet("help", flag.ExitOnError), - UsageCommand: "ginkgo help ", - Usage: []string{ - "Print usage information. If a command is passed in, print usage information just for that command.", - }, - Command: printHelp, - } -} - -func printHelp(args []string, additionalArgs []string) { - if len(args) == 0 { - usage() - } else { - command, found := commandMatching(args[0]) - if !found { - complainAndQuit(fmt.Sprintf("Unknown command: %s", args[0])) - } - - usageForCommand(command, true) - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/interrupt_handler.go b/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/interrupt_handler.go deleted file mode 100644 index c15db0b02..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/interrupt_handler.go +++ /dev/null @@ -1,52 +0,0 @@ -package interrupthandler - -import ( - "os" - "os/signal" - "sync" - "syscall" -) - -type InterruptHandler struct { - interruptCount int - lock *sync.Mutex - C chan bool -} - -func NewInterruptHandler() *InterruptHandler { - h := &InterruptHandler{ - lock: &sync.Mutex{}, - C: make(chan bool, 0), - } - - go h.handleInterrupt() - SwallowSigQuit() - - return h -} - -func (h *InterruptHandler) WasInterrupted() bool { - h.lock.Lock() - defer h.lock.Unlock() - - return h.interruptCount > 0 -} - -func (h *InterruptHandler) handleInterrupt() { - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) - - <-c - signal.Stop(c) - - h.lock.Lock() - h.interruptCount++ - if h.interruptCount == 1 { - close(h.C) - } else if h.interruptCount > 5 { - os.Exit(1) - } - h.lock.Unlock() - - go h.handleInterrupt() -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go b/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go deleted file mode 100644 index 43c18544a..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_unix.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build freebsd openbsd netbsd dragonfly darwin linux solaris - -package interrupthandler - -import ( - "os" - "os/signal" - "syscall" -) - -func SwallowSigQuit() { - c := make(chan os.Signal, 1024) - signal.Notify(c, syscall.SIGQUIT) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go b/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go deleted file mode 100644 index 7f4a50e19..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/interrupthandler/sigquit_swallower_windows.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build windows - -package interrupthandler - -func SwallowSigQuit() { - //noop -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/main.go b/vendor/github.com/onsi/ginkgo/ginkgo/main.go deleted file mode 100644 index 4a1aeef4f..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/main.go +++ /dev/null @@ -1,300 +0,0 @@ -/* -The Ginkgo CLI - -The Ginkgo CLI is fully documented [here](http://onsi.github.io/ginkgo/#the_ginkgo_cli) - -You can also learn more by running: - - ginkgo help - -Here are some of the more commonly used commands: - -To install: - - go install github.com/onsi/ginkgo/ginkgo - -To run tests: - - ginkgo - -To run tests in all subdirectories: - - ginkgo -r - -To run tests in particular packages: - - ginkgo /path/to/package /path/to/another/package - -To pass arguments/flags to your tests: - - ginkgo -- - -To run tests in parallel - - ginkgo -p - -this will automatically detect the optimal number of nodes to use. Alternatively, you can specify the number of nodes with: - - ginkgo -nodes=N - -(note that you don't need to provide -p in this case). - -By default the Ginkgo CLI will spin up a server that the individual test processes send test output to. The CLI aggregates this output and then presents coherent test output, one test at a time, as each test completes. -An alternative is to have the parallel nodes run and stream interleaved output back. This useful for debugging, particularly in contexts where tests hang/fail to start. To get this interleaved output: - - ginkgo -nodes=N -stream=true - -On windows, the default value for stream is true. - -By default, when running multiple tests (with -r or a list of packages) Ginkgo will abort when a test fails. To have Ginkgo run subsequent test suites instead you can: - - ginkgo -keepGoing - -To fail if there are ginkgo tests in a directory but no test suite (missing `RunSpecs`) - - ginkgo -requireSuite - -To monitor packages and rerun tests when changes occur: - - ginkgo watch <-r> - -passing `ginkgo watch` the `-r` flag will recursively detect all test suites under the current directory and monitor them. -`watch` does not detect *new* packages. Moreover, changes in package X only rerun the tests for package X, tests for packages -that depend on X are not rerun. - -[OSX & Linux only] To receive (desktop) notifications when a test run completes: - - ginkgo -notify - -this is particularly useful with `ginkgo watch`. Notifications are currently only supported on OS X and require that you `brew install terminal-notifier` - -Sometimes (to suss out race conditions/flakey tests, for example) you want to keep running a test suite until it fails. You can do this with: - - ginkgo -untilItFails - -To bootstrap a test suite: - - ginkgo bootstrap - -To generate a test file: - - ginkgo generate - -To bootstrap/generate test files without using "." imports: - - ginkgo bootstrap --nodot - ginkgo generate --nodot - -this will explicitly export all the identifiers in Ginkgo and Gomega allowing you to rename them to avoid collisions. When you pull to the latest Ginkgo/Gomega you'll want to run - - ginkgo nodot - -to refresh this list and pull in any new identifiers. In particular, this will pull in any new Gomega matchers that get added. - -To convert an existing XUnit style test suite to a Ginkgo-style test suite: - - ginkgo convert . - -To unfocus tests: - - ginkgo unfocus - -or - - ginkgo blur - -To compile a test suite: - - ginkgo build - -will output an executable file named `package.test`. This can be run directly or by invoking - - ginkgo - -To print out Ginkgo's version: - - ginkgo version - -To get more help: - - ginkgo help -*/ -package main - -import ( - "flag" - "fmt" - "os" - "os/exec" - "strings" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/ginkgo/testsuite" -) - -const greenColor = "\x1b[32m" -const redColor = "\x1b[91m" -const defaultStyle = "\x1b[0m" -const lightGrayColor = "\x1b[37m" - -type Command struct { - Name string - AltName string - FlagSet *flag.FlagSet - Usage []string - UsageCommand string - Command func(args []string, additionalArgs []string) - SuppressFlagDocumentation bool - FlagDocSubstitute []string -} - -func (c *Command) Matches(name string) bool { - return c.Name == name || (c.AltName != "" && c.AltName == name) -} - -func (c *Command) Run(args []string, additionalArgs []string) { - c.FlagSet.Parse(args) - c.Command(c.FlagSet.Args(), additionalArgs) -} - -var DefaultCommand *Command -var Commands []*Command - -func init() { - DefaultCommand = BuildRunCommand() - Commands = append(Commands, BuildWatchCommand()) - Commands = append(Commands, BuildBuildCommand()) - Commands = append(Commands, BuildBootstrapCommand()) - Commands = append(Commands, BuildGenerateCommand()) - Commands = append(Commands, BuildNodotCommand()) - Commands = append(Commands, BuildConvertCommand()) - Commands = append(Commands, BuildUnfocusCommand()) - Commands = append(Commands, BuildVersionCommand()) - Commands = append(Commands, BuildHelpCommand()) -} - -func main() { - args := []string{} - additionalArgs := []string{} - - foundDelimiter := false - - for _, arg := range os.Args[1:] { - if !foundDelimiter { - if arg == "--" { - foundDelimiter = true - continue - } - } - - if foundDelimiter { - additionalArgs = append(additionalArgs, arg) - } else { - args = append(args, arg) - } - } - - if len(args) > 0 { - commandToRun, found := commandMatching(args[0]) - if found { - commandToRun.Run(args[1:], additionalArgs) - return - } - } - - DefaultCommand.Run(args, additionalArgs) -} - -func commandMatching(name string) (*Command, bool) { - for _, command := range Commands { - if command.Matches(name) { - return command, true - } - } - return nil, false -} - -func usage() { - fmt.Fprintf(os.Stderr, "Ginkgo Version %s\n\n", config.VERSION) - usageForCommand(DefaultCommand, false) - for _, command := range Commands { - fmt.Fprintf(os.Stderr, "\n") - usageForCommand(command, false) - } -} - -func usageForCommand(command *Command, longForm bool) { - fmt.Fprintf(os.Stderr, "%s\n%s\n", command.UsageCommand, strings.Repeat("-", len(command.UsageCommand))) - fmt.Fprintf(os.Stderr, "%s\n", strings.Join(command.Usage, "\n")) - if command.SuppressFlagDocumentation && !longForm { - fmt.Fprintf(os.Stderr, "%s\n", strings.Join(command.FlagDocSubstitute, "\n ")) - } else { - command.FlagSet.PrintDefaults() - } -} - -func complainAndQuit(complaint string) { - fmt.Fprintf(os.Stderr, "%s\nFor usage instructions:\n\tginkgo help\n", complaint) - os.Exit(1) -} - -func findSuites(args []string, recurseForAll bool, skipPackage string, allowPrecompiled bool) ([]testsuite.TestSuite, []string) { - suites := []testsuite.TestSuite{} - - if len(args) > 0 { - for _, arg := range args { - if allowPrecompiled { - suite, err := testsuite.PrecompiledTestSuite(arg) - if err == nil { - suites = append(suites, suite) - continue - } - } - recurseForSuite := recurseForAll - if strings.HasSuffix(arg, "/...") && arg != "/..." { - arg = arg[:len(arg)-4] - recurseForSuite = true - } - suites = append(suites, testsuite.SuitesInDir(arg, recurseForSuite)...) - } - } else { - suites = testsuite.SuitesInDir(".", recurseForAll) - } - - skippedPackages := []string{} - if skipPackage != "" { - skipFilters := strings.Split(skipPackage, ",") - filteredSuites := []testsuite.TestSuite{} - for _, suite := range suites { - skip := false - for _, skipFilter := range skipFilters { - if strings.Contains(suite.Path, skipFilter) { - skip = true - break - } - } - if skip { - skippedPackages = append(skippedPackages, suite.Path) - } else { - filteredSuites = append(filteredSuites, suite) - } - } - suites = filteredSuites - } - - return suites, skippedPackages -} - -func goFmt(path string) { - err := exec.Command("go", "fmt", path).Run() - if err != nil { - complainAndQuit("Could not fmt: " + err.Error()) - } -} - -func pluralizedWord(singular, plural string, count int) string { - if count == 1 { - return singular - } - return plural -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go b/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go deleted file mode 100644 index 3f7237c60..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot/nodot.go +++ /dev/null @@ -1,194 +0,0 @@ -package nodot - -import ( - "fmt" - "go/ast" - "go/build" - "go/parser" - "go/token" - "path/filepath" - "strings" -) - -func ApplyNoDot(data []byte) ([]byte, error) { - sections, err := generateNodotSections() - if err != nil { - return nil, err - } - - for _, section := range sections { - data = section.createOrUpdateIn(data) - } - - return data, nil -} - -type nodotSection struct { - name string - pkg string - declarations []string - types []string -} - -func (s nodotSection) createOrUpdateIn(data []byte) []byte { - renames := map[string]string{} - - contents := string(data) - - lines := strings.Split(contents, "\n") - - comment := "// Declarations for " + s.name - - newLines := []string{} - for _, line := range lines { - if line == comment { - continue - } - - words := strings.Split(line, " ") - lastWord := words[len(words)-1] - - if s.containsDeclarationOrType(lastWord) { - renames[lastWord] = words[1] - continue - } - - newLines = append(newLines, line) - } - - if len(newLines[len(newLines)-1]) > 0 { - newLines = append(newLines, "") - } - - newLines = append(newLines, comment) - - for _, typ := range s.types { - name, ok := renames[s.prefix(typ)] - if !ok { - name = typ - } - newLines = append(newLines, fmt.Sprintf("type %s %s", name, s.prefix(typ))) - } - - for _, decl := range s.declarations { - name, ok := renames[s.prefix(decl)] - if !ok { - name = decl - } - newLines = append(newLines, fmt.Sprintf("var %s = %s", name, s.prefix(decl))) - } - - newLines = append(newLines, "") - - newContents := strings.Join(newLines, "\n") - - return []byte(newContents) -} - -func (s nodotSection) prefix(declOrType string) string { - return s.pkg + "." + declOrType -} - -func (s nodotSection) containsDeclarationOrType(word string) bool { - for _, declaration := range s.declarations { - if s.prefix(declaration) == word { - return true - } - } - - for _, typ := range s.types { - if s.prefix(typ) == word { - return true - } - } - - return false -} - -func generateNodotSections() ([]nodotSection, error) { - sections := []nodotSection{} - - declarations, err := getExportedDeclerationsForPackage("github.com/onsi/ginkgo", "ginkgo_dsl.go", "GINKGO_VERSION", "GINKGO_PANIC") - if err != nil { - return nil, err - } - sections = append(sections, nodotSection{ - name: "Ginkgo DSL", - pkg: "ginkgo", - declarations: declarations, - types: []string{"Done", "Benchmarker"}, - }) - - declarations, err = getExportedDeclerationsForPackage("github.com/onsi/gomega", "gomega_dsl.go", "GOMEGA_VERSION") - if err != nil { - return nil, err - } - sections = append(sections, nodotSection{ - name: "Gomega DSL", - pkg: "gomega", - declarations: declarations, - }) - - declarations, err = getExportedDeclerationsForPackage("github.com/onsi/gomega", "matchers.go") - if err != nil { - return nil, err - } - sections = append(sections, nodotSection{ - name: "Gomega Matchers", - pkg: "gomega", - declarations: declarations, - }) - - return sections, nil -} - -func getExportedDeclerationsForPackage(pkgPath string, filename string, blacklist ...string) ([]string, error) { - pkg, err := build.Import(pkgPath, ".", 0) - if err != nil { - return []string{}, err - } - - declarations, err := getExportedDeclarationsForFile(filepath.Join(pkg.Dir, filename)) - if err != nil { - return []string{}, err - } - - blacklistLookup := map[string]bool{} - for _, declaration := range blacklist { - blacklistLookup[declaration] = true - } - - filteredDeclarations := []string{} - for _, declaration := range declarations { - if blacklistLookup[declaration] { - continue - } - filteredDeclarations = append(filteredDeclarations, declaration) - } - - return filteredDeclarations, nil -} - -func getExportedDeclarationsForFile(path string) ([]string, error) { - fset := token.NewFileSet() - tree, err := parser.ParseFile(fset, path, nil, 0) - if err != nil { - return []string{}, err - } - - declarations := []string{} - ast.FileExports(tree) - for _, decl := range tree.Decls { - switch x := decl.(type) { - case *ast.GenDecl: - switch s := x.Specs[0].(type) { - case *ast.ValueSpec: - declarations = append(declarations, s.Names[0].Name) - } - case *ast.FuncDecl: - declarations = append(declarations, x.Name.Name) - } - } - - return declarations, nil -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/nodot_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/nodot_command.go deleted file mode 100644 index 39b88b5d1..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/nodot_command.go +++ /dev/null @@ -1,77 +0,0 @@ -package main - -import ( - "bufio" - "flag" - "io/ioutil" - "os" - "path/filepath" - "regexp" - - "github.com/onsi/ginkgo/ginkgo/nodot" -) - -func BuildNodotCommand() *Command { - return &Command{ - Name: "nodot", - FlagSet: flag.NewFlagSet("bootstrap", flag.ExitOnError), - UsageCommand: "ginkgo nodot", - Usage: []string{ - "Update the nodot declarations in your test suite", - "Any missing declarations (from, say, a recently added matcher) will be added to your bootstrap file.", - "If you've renamed a declaration, that name will be honored and not overwritten.", - }, - Command: updateNodot, - } -} - -func updateNodot(args []string, additionalArgs []string) { - suiteFile, perm := findSuiteFile() - - data, err := ioutil.ReadFile(suiteFile) - if err != nil { - complainAndQuit("Failed to update nodot declarations: " + err.Error()) - } - - content, err := nodot.ApplyNoDot(data) - if err != nil { - complainAndQuit("Failed to update nodot declarations: " + err.Error()) - } - ioutil.WriteFile(suiteFile, content, perm) - - goFmt(suiteFile) -} - -func findSuiteFile() (string, os.FileMode) { - workingDir, err := os.Getwd() - if err != nil { - complainAndQuit("Could not find suite file for nodot: " + err.Error()) - } - - files, err := ioutil.ReadDir(workingDir) - if err != nil { - complainAndQuit("Could not find suite file for nodot: " + err.Error()) - } - - re := regexp.MustCompile(`RunSpecs\(|RunSpecsWithDefaultAndCustomReporters\(|RunSpecsWithCustomReporters\(`) - - for _, file := range files { - if file.IsDir() { - continue - } - path := filepath.Join(workingDir, file.Name()) - f, err := os.Open(path) - if err != nil { - complainAndQuit("Could not find suite file for nodot: " + err.Error()) - } - defer f.Close() - - if re.MatchReader(bufio.NewReader(f)) { - return path, file.Mode() - } - } - - complainAndQuit("Could not find a suite file for nodot: you need a bootstrap file that call's Ginkgo's RunSpecs() command.\nTry running ginkgo bootstrap first.") - - return "", 0 -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/notifications.go b/vendor/github.com/onsi/ginkgo/ginkgo/notifications.go deleted file mode 100644 index 368d61fb3..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/notifications.go +++ /dev/null @@ -1,141 +0,0 @@ -package main - -import ( - "fmt" - "os" - "os/exec" - "regexp" - "runtime" - "strings" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/ginkgo/testsuite" -) - -type Notifier struct { - commandFlags *RunWatchAndBuildCommandFlags -} - -func NewNotifier(commandFlags *RunWatchAndBuildCommandFlags) *Notifier { - return &Notifier{ - commandFlags: commandFlags, - } -} - -func (n *Notifier) VerifyNotificationsAreAvailable() { - if n.commandFlags.Notify { - onLinux := (runtime.GOOS == "linux") - onOSX := (runtime.GOOS == "darwin") - if onOSX { - - _, err := exec.LookPath("terminal-notifier") - if err != nil { - fmt.Printf(`--notify requires terminal-notifier, which you don't seem to have installed. - -OSX: - -To remedy this: - - brew install terminal-notifier - -To learn more about terminal-notifier: - - https://github.com/alloy/terminal-notifier -`) - os.Exit(1) - } - - } else if onLinux { - - _, err := exec.LookPath("notify-send") - if err != nil { - fmt.Printf(`--notify requires terminal-notifier or notify-send, which you don't seem to have installed. - -Linux: - -Download and install notify-send for your distribution -`) - os.Exit(1) - } - - } - } -} - -func (n *Notifier) SendSuiteCompletionNotification(suite testsuite.TestSuite, suitePassed bool) { - if suitePassed { - n.SendNotification("Ginkgo [PASS]", fmt.Sprintf(`Test suite for "%s" passed.`, suite.PackageName)) - } else { - n.SendNotification("Ginkgo [FAIL]", fmt.Sprintf(`Test suite for "%s" failed.`, suite.PackageName)) - } -} - -func (n *Notifier) SendNotification(title string, subtitle string) { - - if n.commandFlags.Notify { - onLinux := (runtime.GOOS == "linux") - onOSX := (runtime.GOOS == "darwin") - - if onOSX { - - _, err := exec.LookPath("terminal-notifier") - if err == nil { - args := []string{"-title", title, "-subtitle", subtitle, "-group", "com.onsi.ginkgo"} - terminal := os.Getenv("TERM_PROGRAM") - if terminal == "iTerm.app" { - args = append(args, "-activate", "com.googlecode.iterm2") - } else if terminal == "Apple_Terminal" { - args = append(args, "-activate", "com.apple.Terminal") - } - - exec.Command("terminal-notifier", args...).Run() - } - - } else if onLinux { - - _, err := exec.LookPath("notify-send") - if err == nil { - args := []string{"-a", "ginkgo", title, subtitle} - exec.Command("notify-send", args...).Run() - } - - } - } -} - -func (n *Notifier) RunCommand(suite testsuite.TestSuite, suitePassed bool) { - - command := n.commandFlags.AfterSuiteHook - if command != "" { - - // Allow for string replacement to pass input to the command - passed := "[FAIL]" - if suitePassed { - passed = "[PASS]" - } - command = strings.Replace(command, "(ginkgo-suite-passed)", passed, -1) - command = strings.Replace(command, "(ginkgo-suite-name)", suite.PackageName, -1) - - // Must break command into parts - splitArgs := regexp.MustCompile(`'.+'|".+"|\S+`) - parts := splitArgs.FindAllString(command, -1) - - output, err := exec.Command(parts[0], parts[1:]...).CombinedOutput() - if err != nil { - fmt.Println("Post-suite command failed:") - if config.DefaultReporterConfig.NoColor { - fmt.Printf("\t%s\n", output) - } else { - fmt.Printf("\t%s%s%s\n", redColor, string(output), defaultStyle) - } - n.SendNotification("Ginkgo [ERROR]", fmt.Sprintf(`After suite command "%s" failed`, n.commandFlags.AfterSuiteHook)) - } else { - fmt.Println("Post-suite command succeeded:") - if config.DefaultReporterConfig.NoColor { - fmt.Printf("\t%s\n", output) - } else { - fmt.Printf("\t%s%s%s\n", greenColor, string(output), defaultStyle) - } - } - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go deleted file mode 100644 index 7ec8d82a3..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/run_command.go +++ /dev/null @@ -1,269 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "math/rand" - "os" - "strings" - "time" - - "io/ioutil" - "path/filepath" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/ginkgo/interrupthandler" - "github.com/onsi/ginkgo/ginkgo/testrunner" - "github.com/onsi/ginkgo/types" -) - -func BuildRunCommand() *Command { - commandFlags := NewRunCommandFlags(flag.NewFlagSet("ginkgo", flag.ExitOnError)) - notifier := NewNotifier(commandFlags) - interruptHandler := interrupthandler.NewInterruptHandler() - runner := &SpecRunner{ - commandFlags: commandFlags, - notifier: notifier, - interruptHandler: interruptHandler, - suiteRunner: NewSuiteRunner(notifier, interruptHandler), - } - - return &Command{ - Name: "", - FlagSet: commandFlags.FlagSet, - UsageCommand: "ginkgo -- ", - Usage: []string{ - "Run the tests in the passed in (or the package in the current directory if left blank).", - "Any arguments after -- will be passed to the test.", - "Accepts the following flags:", - }, - Command: runner.RunSpecs, - } -} - -type SpecRunner struct { - commandFlags *RunWatchAndBuildCommandFlags - notifier *Notifier - interruptHandler *interrupthandler.InterruptHandler - suiteRunner *SuiteRunner -} - -func (r *SpecRunner) RunSpecs(args []string, additionalArgs []string) { - r.commandFlags.computeNodes() - r.notifier.VerifyNotificationsAreAvailable() - - suites, skippedPackages := findSuites(args, r.commandFlags.Recurse, r.commandFlags.SkipPackage, true) - if len(skippedPackages) > 0 { - fmt.Println("Will skip:") - for _, skippedPackage := range skippedPackages { - fmt.Println(" " + skippedPackage) - } - } - - if len(skippedPackages) > 0 && len(suites) == 0 { - fmt.Println("All tests skipped! Exiting...") - os.Exit(0) - } - - if len(suites) == 0 { - complainAndQuit("Found no test suites") - } - - r.ComputeSuccinctMode(len(suites)) - - t := time.Now() - - runners := []*testrunner.TestRunner{} - for _, suite := range suites { - runners = append(runners, testrunner.New(suite, r.commandFlags.NumCPU, r.commandFlags.ParallelStream, r.commandFlags.Timeout, r.commandFlags.GoOpts, additionalArgs)) - } - - numSuites := 0 - runResult := testrunner.PassingRunResult() - if r.commandFlags.UntilItFails { - iteration := 0 - for { - r.UpdateSeed() - randomizedRunners := r.randomizeOrder(runners) - runResult, numSuites = r.suiteRunner.RunSuites(randomizedRunners, r.commandFlags.NumCompilers, r.commandFlags.KeepGoing, nil) - iteration++ - - if r.interruptHandler.WasInterrupted() { - break - } - - if runResult.Passed { - fmt.Printf("\nAll tests passed...\nWill keep running them until they fail.\nThis was attempt #%d\n%s\n", iteration, orcMessage(iteration)) - } else { - fmt.Printf("\nTests failed on attempt #%d\n\n", iteration) - break - } - } - } else { - randomizedRunners := r.randomizeOrder(runners) - runResult, numSuites = r.suiteRunner.RunSuites(randomizedRunners, r.commandFlags.NumCompilers, r.commandFlags.KeepGoing, nil) - } - - if r.isInCoverageMode() { - if r.getOutputDir() != "" { - // If coverprofile is set, combine coverages - if r.getCoverprofile() != "" { - r.combineCoverprofiles(runners) - } else { - // Just move them - r.moveCoverprofiles(runners) - } - } - } - - for _, runner := range runners { - runner.CleanUp() - } - - fmt.Printf("\nGinkgo ran %d %s in %s\n", numSuites, pluralizedWord("suite", "suites", numSuites), time.Since(t)) - - if runResult.Passed { - if runResult.HasProgrammaticFocus && strings.TrimSpace(os.Getenv("GINKGO_EDITOR_INTEGRATION")) == "" { - fmt.Printf("Test Suite Passed\n") - fmt.Printf("Detected Programmatic Focus - setting exit status to %d\n", types.GINKGO_FOCUS_EXIT_CODE) - os.Exit(types.GINKGO_FOCUS_EXIT_CODE) - } else { - fmt.Printf("Test Suite Passed\n") - os.Exit(0) - } - } else { - fmt.Printf("Test Suite Failed\n") - os.Exit(1) - } -} - -// Moves all generated profiles to specified directory -func (r *SpecRunner) moveCoverprofiles(runners []*testrunner.TestRunner) { - for _, runner := range runners { - _, filename := filepath.Split(runner.CoverageFile) - err := os.Rename(runner.CoverageFile, filepath.Join(r.getOutputDir(), filename)) - - if err != nil { - fmt.Printf("Unable to move coverprofile %s, %v\n", runner.CoverageFile, err) - return - } - } -} - -// Combines all generated profiles in the specified directory -func (r *SpecRunner) combineCoverprofiles(runners []*testrunner.TestRunner) { - - path, _ := filepath.Abs(r.getOutputDir()) - - fmt.Println("path is " + path) - os.MkdirAll(path, os.ModePerm) - - combined, err := os.OpenFile(filepath.Join(path, r.getCoverprofile()), - os.O_APPEND|os.O_WRONLY|os.O_CREATE, 0666) - - if err != nil { - fmt.Printf("Unable to create combined profile, %v\n", err) - return - } - - for _, runner := range runners { - contents, err := ioutil.ReadFile(runner.CoverageFile) - - if err != nil { - fmt.Printf("Unable to read coverage file %s to combine, %v\n", runner.CoverageFile, err) - return - } - - _, err = combined.Write(contents) - - if err != nil { - fmt.Printf("Unable to append to coverprofile, %v\n", err) - return - } - } - - fmt.Println("All profiles combined") -} - -func (r *SpecRunner) isInCoverageMode() bool { - opts := r.commandFlags.GoOpts - return *opts["cover"].(*bool) || *opts["coverpkg"].(*string) != "" || *opts["covermode"].(*string) != "" -} - -func (r *SpecRunner) getCoverprofile() string { - return *r.commandFlags.GoOpts["coverprofile"].(*string) -} - -func (r *SpecRunner) getOutputDir() string { - return *r.commandFlags.GoOpts["outputdir"].(*string) -} - -func (r *SpecRunner) ComputeSuccinctMode(numSuites int) { - if config.DefaultReporterConfig.Verbose { - config.DefaultReporterConfig.Succinct = false - return - } - - if numSuites == 1 { - return - } - - if numSuites > 1 && !r.commandFlags.wasSet("succinct") { - config.DefaultReporterConfig.Succinct = true - } -} - -func (r *SpecRunner) UpdateSeed() { - if !r.commandFlags.wasSet("seed") { - config.GinkgoConfig.RandomSeed = time.Now().Unix() - } -} - -func (r *SpecRunner) randomizeOrder(runners []*testrunner.TestRunner) []*testrunner.TestRunner { - if !r.commandFlags.RandomizeSuites { - return runners - } - - if len(runners) <= 1 { - return runners - } - - randomizedRunners := make([]*testrunner.TestRunner, len(runners)) - randomizer := rand.New(rand.NewSource(config.GinkgoConfig.RandomSeed)) - permutation := randomizer.Perm(len(runners)) - for i, j := range permutation { - randomizedRunners[i] = runners[j] - } - return randomizedRunners -} - -func orcMessage(iteration int) string { - if iteration < 10 { - return "" - } else if iteration < 30 { - return []string{ - "If at first you succeed...", - "...try, try again.", - "Looking good!", - "Still good...", - "I think your tests are fine....", - "Yep, still passing", - "Oh boy, here I go testin' again!", - "Even the gophers are getting bored", - "Did you try -race?", - "Maybe you should stop now?", - "I'm getting tired...", - "What if I just made you a sandwich?", - "Hit ^C, hit ^C, please hit ^C", - "Make it stop. Please!", - "Come on! Enough is enough!", - "Dave, this conversation can serve no purpose anymore. Goodbye.", - "Just what do you think you're doing, Dave? ", - "I, Sisyphus", - "Insanity: doing the same thing over and over again and expecting different results. -Einstein", - "I guess Einstein never tried to churn butter", - }[iteration-10] + "\n" - } else { - return "No, seriously... you can probably stop now.\n" - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go b/vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go deleted file mode 100644 index b7cb7f566..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/run_watch_and_build_command_flags.go +++ /dev/null @@ -1,167 +0,0 @@ -package main - -import ( - "flag" - "runtime" - - "time" - - "github.com/onsi/ginkgo/config" -) - -type RunWatchAndBuildCommandFlags struct { - Recurse bool - SkipPackage string - GoOpts map[string]interface{} - - //for run and watch commands - NumCPU int - NumCompilers int - ParallelStream bool - Notify bool - AfterSuiteHook string - AutoNodes bool - Timeout time.Duration - - //only for run command - KeepGoing bool - UntilItFails bool - RandomizeSuites bool - - //only for watch command - Depth int - WatchRegExp string - - FlagSet *flag.FlagSet -} - -const runMode = 1 -const watchMode = 2 -const buildMode = 3 - -func NewRunCommandFlags(flagSet *flag.FlagSet) *RunWatchAndBuildCommandFlags { - c := &RunWatchAndBuildCommandFlags{ - FlagSet: flagSet, - } - c.flags(runMode) - return c -} - -func NewWatchCommandFlags(flagSet *flag.FlagSet) *RunWatchAndBuildCommandFlags { - c := &RunWatchAndBuildCommandFlags{ - FlagSet: flagSet, - } - c.flags(watchMode) - return c -} - -func NewBuildCommandFlags(flagSet *flag.FlagSet) *RunWatchAndBuildCommandFlags { - c := &RunWatchAndBuildCommandFlags{ - FlagSet: flagSet, - } - c.flags(buildMode) - return c -} - -func (c *RunWatchAndBuildCommandFlags) wasSet(flagName string) bool { - wasSet := false - c.FlagSet.Visit(func(f *flag.Flag) { - if f.Name == flagName { - wasSet = true - } - }) - - return wasSet -} - -func (c *RunWatchAndBuildCommandFlags) computeNodes() { - if c.wasSet("nodes") { - return - } - if c.AutoNodes { - switch n := runtime.NumCPU(); { - case n <= 4: - c.NumCPU = n - default: - c.NumCPU = n - 1 - } - } -} - -func (c *RunWatchAndBuildCommandFlags) stringSlot(slot string) *string { - var opt string - c.GoOpts[slot] = &opt - return &opt -} - -func (c *RunWatchAndBuildCommandFlags) boolSlot(slot string) *bool { - var opt bool - c.GoOpts[slot] = &opt - return &opt -} - -func (c *RunWatchAndBuildCommandFlags) intSlot(slot string) *int { - var opt int - c.GoOpts[slot] = &opt - return &opt -} - -func (c *RunWatchAndBuildCommandFlags) flags(mode int) { - c.GoOpts = make(map[string]interface{}) - - onWindows := (runtime.GOOS == "windows") - - c.FlagSet.BoolVar(&(c.Recurse), "r", false, "Find and run test suites under the current directory recursively.") - c.FlagSet.BoolVar(c.boolSlot("race"), "race", false, "Run tests with race detection enabled.") - c.FlagSet.BoolVar(c.boolSlot("cover"), "cover", false, "Run tests with coverage analysis, will generate coverage profiles with the package name in the current directory.") - c.FlagSet.StringVar(c.stringSlot("coverpkg"), "coverpkg", "", "Run tests with coverage on the given external modules.") - c.FlagSet.StringVar(&(c.SkipPackage), "skipPackage", "", "A comma-separated list of package names to be skipped. If any part of the package's path matches, that package is ignored.") - c.FlagSet.StringVar(c.stringSlot("tags"), "tags", "", "A list of build tags to consider satisfied during the build.") - c.FlagSet.StringVar(c.stringSlot("gcflags"), "gcflags", "", "Arguments to pass on each go tool compile invocation.") - c.FlagSet.StringVar(c.stringSlot("covermode"), "covermode", "", "Set the mode for coverage analysis.") - c.FlagSet.BoolVar(c.boolSlot("a"), "a", false, "Force rebuilding of packages that are already up-to-date.") - c.FlagSet.BoolVar(c.boolSlot("n"), "n", false, "Have `go test` print the commands but do not run them.") - c.FlagSet.BoolVar(c.boolSlot("msan"), "msan", false, "Enable interoperation with memory sanitizer.") - c.FlagSet.BoolVar(c.boolSlot("x"), "x", false, "Have `go test` print the commands.") - c.FlagSet.BoolVar(c.boolSlot("work"), "work", false, "Print the name of the temporary work directory and do not delete it when exiting.") - c.FlagSet.StringVar(c.stringSlot("asmflags"), "asmflags", "", "Arguments to pass on each go tool asm invocation.") - c.FlagSet.StringVar(c.stringSlot("buildmode"), "buildmode", "", "Build mode to use. See 'go help buildmode' for more.") - c.FlagSet.StringVar(c.stringSlot("compiler"), "compiler", "", "Name of compiler to use, as in runtime.Compiler (gccgo or gc).") - c.FlagSet.StringVar(c.stringSlot("gccgoflags"), "gccgoflags", "", "Arguments to pass on each gccgo compiler/linker invocation.") - c.FlagSet.StringVar(c.stringSlot("installsuffix"), "installsuffix", "", "A suffix to use in the name of the package installation directory.") - c.FlagSet.StringVar(c.stringSlot("ldflags"), "ldflags", "", "Arguments to pass on each go tool link invocation.") - c.FlagSet.BoolVar(c.boolSlot("linkshared"), "linkshared", false, "Link against shared libraries previously created with -buildmode=shared.") - c.FlagSet.StringVar(c.stringSlot("pkgdir"), "pkgdir", "", "install and load all packages from the given dir instead of the usual locations.") - c.FlagSet.StringVar(c.stringSlot("toolexec"), "toolexec", "", "a program to use to invoke toolchain programs like vet and asm.") - c.FlagSet.IntVar(c.intSlot("blockprofilerate"), "blockprofilerate", 1, "Control the detail provided in goroutine blocking profiles by calling runtime.SetBlockProfileRate with the given value.") - c.FlagSet.StringVar(c.stringSlot("coverprofile"), "coverprofile", "", "Write a coverage profile to the specified file after all tests have passed.") - c.FlagSet.StringVar(c.stringSlot("cpuprofile"), "cpuprofile", "", "Write a CPU profile to the specified file before exiting.") - c.FlagSet.StringVar(c.stringSlot("memprofile"), "memprofile", "", "Write a memory profile to the specified file after all tests have passed.") - c.FlagSet.IntVar(c.intSlot("memprofilerate"), "memprofilerate", 0, "Enable more precise (and expensive) memory profiles by setting runtime.MemProfileRate.") - c.FlagSet.StringVar(c.stringSlot("outputdir"), "outputdir", "", "Place output files from profiling in the specified directory.") - c.FlagSet.BoolVar(c.boolSlot("requireSuite"), "requireSuite", false, "Fail if there are ginkgo tests in a directory but no test suite (missing RunSpecs)") - - if mode == runMode || mode == watchMode { - config.Flags(c.FlagSet, "", false) - c.FlagSet.IntVar(&(c.NumCPU), "nodes", 1, "The number of parallel test nodes to run") - c.FlagSet.IntVar(&(c.NumCompilers), "compilers", 0, "The number of concurrent compilations to run (0 will autodetect)") - c.FlagSet.BoolVar(&(c.AutoNodes), "p", false, "Run in parallel with auto-detected number of nodes") - c.FlagSet.BoolVar(&(c.ParallelStream), "stream", onWindows, "stream parallel test output in real time: less coherent, but useful for debugging") - if !onWindows { - c.FlagSet.BoolVar(&(c.Notify), "notify", false, "Send desktop notifications when a test run completes") - } - c.FlagSet.StringVar(&(c.AfterSuiteHook), "afterSuiteHook", "", "Run a command when a suite test run completes") - c.FlagSet.DurationVar(&(c.Timeout), "timeout", 24*time.Hour, "Suite fails if it does not complete within the specified timeout") - } - - if mode == runMode { - c.FlagSet.BoolVar(&(c.KeepGoing), "keepGoing", false, "When true, failures from earlier test suites do not prevent later test suites from running") - c.FlagSet.BoolVar(&(c.UntilItFails), "untilItFails", false, "When true, Ginkgo will keep rerunning tests until a failure occurs") - c.FlagSet.BoolVar(&(c.RandomizeSuites), "randomizeSuites", false, "When true, Ginkgo will randomize the order in which test suites run") - } - - if mode == watchMode { - c.FlagSet.IntVar(&(c.Depth), "depth", 1, "Ginkgo will watch dependencies down to this depth in the dependency tree") - c.FlagSet.StringVar(&(c.WatchRegExp), "watchRegExp", `\.go$`, "Files matching this regular expression will be watched for changes") - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/suite_runner.go b/vendor/github.com/onsi/ginkgo/ginkgo/suite_runner.go deleted file mode 100644 index ce6c94602..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/suite_runner.go +++ /dev/null @@ -1,173 +0,0 @@ -package main - -import ( - "fmt" - "runtime" - "sync" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/ginkgo/interrupthandler" - "github.com/onsi/ginkgo/ginkgo/testrunner" - "github.com/onsi/ginkgo/ginkgo/testsuite" - colorable "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable" -) - -type compilationInput struct { - runner *testrunner.TestRunner - result chan compilationOutput -} - -type compilationOutput struct { - runner *testrunner.TestRunner - err error -} - -type SuiteRunner struct { - notifier *Notifier - interruptHandler *interrupthandler.InterruptHandler -} - -func NewSuiteRunner(notifier *Notifier, interruptHandler *interrupthandler.InterruptHandler) *SuiteRunner { - return &SuiteRunner{ - notifier: notifier, - interruptHandler: interruptHandler, - } -} - -func (r *SuiteRunner) compileInParallel(runners []*testrunner.TestRunner, numCompilers int, willCompile func(suite testsuite.TestSuite)) chan compilationOutput { - //we return this to the consumer, it will return each runner in order as it compiles - compilationOutputs := make(chan compilationOutput, len(runners)) - - //an array of channels - the nth runner's compilation output is sent to the nth channel in this array - //we read from these channels in order to ensure we run the suites in order - orderedCompilationOutputs := []chan compilationOutput{} - for _ = range runners { - orderedCompilationOutputs = append(orderedCompilationOutputs, make(chan compilationOutput, 1)) - } - - //we're going to spin up numCompilers compilers - they're going to run concurrently and will consume this channel - //we prefill the channel then close it, this ensures we compile things in the correct order - workPool := make(chan compilationInput, len(runners)) - for i, runner := range runners { - workPool <- compilationInput{runner, orderedCompilationOutputs[i]} - } - close(workPool) - - //pick a reasonable numCompilers - if numCompilers == 0 { - numCompilers = runtime.NumCPU() - } - - //a WaitGroup to help us wait for all compilers to shut down - wg := &sync.WaitGroup{} - wg.Add(numCompilers) - - //spin up the concurrent compilers - for i := 0; i < numCompilers; i++ { - go func() { - defer wg.Done() - for input := range workPool { - if r.interruptHandler.WasInterrupted() { - return - } - - if willCompile != nil { - willCompile(input.runner.Suite) - } - - //We retry because Go sometimes steps on itself when multiple compiles happen in parallel. This is ugly, but should help resolve flakiness... - var err error - retries := 0 - for retries <= 5 { - if r.interruptHandler.WasInterrupted() { - return - } - if err = input.runner.Compile(); err == nil { - break - } - retries++ - } - - input.result <- compilationOutput{input.runner, err} - } - }() - } - - //read from the compilation output channels *in order* and send them to the caller - //close the compilationOutputs channel to tell the caller we're done - go func() { - defer close(compilationOutputs) - for _, orderedCompilationOutput := range orderedCompilationOutputs { - select { - case compilationOutput := <-orderedCompilationOutput: - compilationOutputs <- compilationOutput - case <-r.interruptHandler.C: - //interrupt detected, wait for the compilers to shut down then bail - //this ensure we clean up after ourselves as we don't leave any compilation processes running - wg.Wait() - return - } - } - }() - - return compilationOutputs -} - -func (r *SuiteRunner) RunSuites(runners []*testrunner.TestRunner, numCompilers int, keepGoing bool, willCompile func(suite testsuite.TestSuite)) (testrunner.RunResult, int) { - runResult := testrunner.PassingRunResult() - - compilationOutputs := r.compileInParallel(runners, numCompilers, willCompile) - - numSuitesThatRan := 0 - suitesThatFailed := []testsuite.TestSuite{} - for compilationOutput := range compilationOutputs { - if compilationOutput.err != nil { - fmt.Print(compilationOutput.err.Error()) - } - numSuitesThatRan++ - suiteRunResult := testrunner.FailingRunResult() - if compilationOutput.err == nil { - suiteRunResult = compilationOutput.runner.Run() - } - r.notifier.SendSuiteCompletionNotification(compilationOutput.runner.Suite, suiteRunResult.Passed) - r.notifier.RunCommand(compilationOutput.runner.Suite, suiteRunResult.Passed) - runResult = runResult.Merge(suiteRunResult) - if !suiteRunResult.Passed { - suitesThatFailed = append(suitesThatFailed, compilationOutput.runner.Suite) - if !keepGoing { - break - } - } - if numSuitesThatRan < len(runners) && !config.DefaultReporterConfig.Succinct { - fmt.Println("") - } - } - - if keepGoing && !runResult.Passed { - r.listFailedSuites(suitesThatFailed) - } - - return runResult, numSuitesThatRan -} - -func (r *SuiteRunner) listFailedSuites(suitesThatFailed []testsuite.TestSuite) { - fmt.Println("") - fmt.Println("There were failures detected in the following suites:") - - maxPackageNameLength := 0 - for _, suite := range suitesThatFailed { - if len(suite.PackageName) > maxPackageNameLength { - maxPackageNameLength = len(suite.PackageName) - } - } - - packageNameFormatter := fmt.Sprintf("%%%ds", maxPackageNameLength) - - for _, suite := range suitesThatFailed { - if config.DefaultReporterConfig.NoColor { - fmt.Printf("\t"+packageNameFormatter+" %s\n", suite.PackageName, suite.Path) - } else { - fmt.Fprintf(colorable.NewColorableStdout(), "\t%s"+packageNameFormatter+"%s %s%s%s\n", redColor, suite.PackageName, defaultStyle, lightGrayColor, suite.Path, defaultStyle) - } - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/log_writer.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/log_writer.go deleted file mode 100644 index a73a6e379..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/log_writer.go +++ /dev/null @@ -1,52 +0,0 @@ -package testrunner - -import ( - "bytes" - "fmt" - "io" - "log" - "strings" - "sync" -) - -type logWriter struct { - buffer *bytes.Buffer - lock *sync.Mutex - log *log.Logger -} - -func newLogWriter(target io.Writer, node int) *logWriter { - return &logWriter{ - buffer: &bytes.Buffer{}, - lock: &sync.Mutex{}, - log: log.New(target, fmt.Sprintf("[%d] ", node), 0), - } -} - -func (w *logWriter) Write(data []byte) (n int, err error) { - w.lock.Lock() - defer w.lock.Unlock() - - w.buffer.Write(data) - contents := w.buffer.String() - - lines := strings.Split(contents, "\n") - for _, line := range lines[0 : len(lines)-1] { - w.log.Println(line) - } - - w.buffer.Reset() - w.buffer.Write([]byte(lines[len(lines)-1])) - return len(data), nil -} - -func (w *logWriter) Close() error { - w.lock.Lock() - defer w.lock.Unlock() - - if w.buffer.Len() > 0 { - w.log.Println(w.buffer.String()) - } - - return nil -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go deleted file mode 100644 index 5d472acb8..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/run_result.go +++ /dev/null @@ -1,27 +0,0 @@ -package testrunner - -type RunResult struct { - Passed bool - HasProgrammaticFocus bool -} - -func PassingRunResult() RunResult { - return RunResult{ - Passed: true, - HasProgrammaticFocus: false, - } -} - -func FailingRunResult() RunResult { - return RunResult{ - Passed: false, - HasProgrammaticFocus: false, - } -} - -func (r RunResult) Merge(o RunResult) RunResult { - return RunResult{ - Passed: r.Passed && o.Passed, - HasProgrammaticFocus: r.HasProgrammaticFocus || o.HasProgrammaticFocus, - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go b/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go deleted file mode 100644 index e12913668..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testrunner/test_runner.go +++ /dev/null @@ -1,554 +0,0 @@ -package testrunner - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "os" - "os/exec" - "path/filepath" - "strconv" - "strings" - "syscall" - "time" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/ginkgo/testsuite" - "github.com/onsi/ginkgo/internal/remote" - "github.com/onsi/ginkgo/reporters/stenographer" - "github.com/onsi/ginkgo/types" -) - -type TestRunner struct { - Suite testsuite.TestSuite - - compiled bool - compilationTargetPath string - - numCPU int - parallelStream bool - timeout time.Duration - goOpts map[string]interface{} - additionalArgs []string - stderr *bytes.Buffer - - CoverageFile string -} - -func New(suite testsuite.TestSuite, numCPU int, parallelStream bool, timeout time.Duration, goOpts map[string]interface{}, additionalArgs []string) *TestRunner { - runner := &TestRunner{ - Suite: suite, - numCPU: numCPU, - parallelStream: parallelStream, - goOpts: goOpts, - additionalArgs: additionalArgs, - timeout: timeout, - stderr: new(bytes.Buffer), - } - - if !suite.Precompiled { - dir, err := ioutil.TempDir("", "ginkgo") - if err != nil { - panic(fmt.Sprintf("couldn't create temporary directory... might be time to rm -rf:\n%s", err.Error())) - } - runner.compilationTargetPath = filepath.Join(dir, suite.PackageName+".test") - } - - return runner -} - -func (t *TestRunner) Compile() error { - return t.CompileTo(t.compilationTargetPath) -} - -func (t *TestRunner) BuildArgs(path string) []string { - args := []string{"test", "-c", "-i", "-o", path, t.Suite.Path} - - if t.getCoverMode() != "" { - args = append(args, "-cover", fmt.Sprintf("-covermode=%s", t.getCoverMode())) - } else { - if t.shouldCover() || t.getCoverPackage() != "" { - args = append(args, "-cover", "-covermode=atomic") - } - } - - boolOpts := []string{ - "a", - "n", - "msan", - "race", - "x", - "work", - "linkshared", - } - - for _, opt := range boolOpts { - if s, found := t.goOpts[opt].(*bool); found && *s { - args = append(args, fmt.Sprintf("-%s", opt)) - } - } - - intOpts := []string{ - "memprofilerate", - "blockprofilerate", - } - - for _, opt := range intOpts { - if s, found := t.goOpts[opt].(*int); found { - args = append(args, fmt.Sprintf("-%s=%d", opt, *s)) - } - } - - stringOpts := []string{ - "asmflags", - "buildmode", - "compiler", - "gccgoflags", - "installsuffix", - "ldflags", - "pkgdir", - "toolexec", - "coverprofile", - "cpuprofile", - "memprofile", - "outputdir", - "coverpkg", - "tags", - "gcflags", - } - - for _, opt := range stringOpts { - if s, found := t.goOpts[opt].(*string); found && *s != "" { - args = append(args, fmt.Sprintf("-%s=%s", opt, *s)) - } - } - return args -} - -func (t *TestRunner) CompileTo(path string) error { - if t.compiled { - return nil - } - - if t.Suite.Precompiled { - return nil - } - - args := t.BuildArgs(path) - cmd := exec.Command("go", args...) - - output, err := cmd.CombinedOutput() - - if err != nil { - if len(output) > 0 { - return fmt.Errorf("Failed to compile %s:\n\n%s", t.Suite.PackageName, output) - } - return fmt.Errorf("Failed to compile %s", t.Suite.PackageName) - } - - if len(output) > 0 { - fmt.Println(string(output)) - } - - if fileExists(path) == false { - compiledFile := t.Suite.PackageName + ".test" - if fileExists(compiledFile) { - // seems like we are on an old go version that does not support the -o flag on go test - // move the compiled test file to the desired location by hand - err = os.Rename(compiledFile, path) - if err != nil { - // We cannot move the file, perhaps because the source and destination - // are on different partitions. We can copy the file, however. - err = copyFile(compiledFile, path) - if err != nil { - return fmt.Errorf("Failed to copy compiled file: %s", err) - } - } - } else { - return fmt.Errorf("Failed to compile %s: output file %q could not be found", t.Suite.PackageName, path) - } - } - - t.compiled = true - - return nil -} - -func fileExists(path string) bool { - _, err := os.Stat(path) - return err == nil || os.IsNotExist(err) == false -} - -// copyFile copies the contents of the file named src to the file named -// by dst. The file will be created if it does not already exist. If the -// destination file exists, all it's contents will be replaced by the contents -// of the source file. -func copyFile(src, dst string) error { - srcInfo, err := os.Stat(src) - if err != nil { - return err - } - mode := srcInfo.Mode() - - in, err := os.Open(src) - if err != nil { - return err - } - - defer in.Close() - - out, err := os.Create(dst) - if err != nil { - return err - } - - defer func() { - closeErr := out.Close() - if err == nil { - err = closeErr - } - }() - - _, err = io.Copy(out, in) - if err != nil { - return err - } - - err = out.Sync() - if err != nil { - return err - } - - return out.Chmod(mode) -} - -func (t *TestRunner) Run() RunResult { - if t.Suite.IsGinkgo { - if t.numCPU > 1 { - if t.parallelStream { - return t.runAndStreamParallelGinkgoSuite() - } else { - return t.runParallelGinkgoSuite() - } - } else { - return t.runSerialGinkgoSuite() - } - } else { - return t.runGoTestSuite() - } -} - -func (t *TestRunner) CleanUp() { - if t.Suite.Precompiled { - return - } - os.RemoveAll(filepath.Dir(t.compilationTargetPath)) -} - -func (t *TestRunner) runSerialGinkgoSuite() RunResult { - ginkgoArgs := config.BuildFlagArgs("ginkgo", config.GinkgoConfig, config.DefaultReporterConfig) - return t.run(t.cmd(ginkgoArgs, os.Stdout, 1), nil) -} - -func (t *TestRunner) runGoTestSuite() RunResult { - return t.run(t.cmd([]string{"-test.v"}, os.Stdout, 1), nil) -} - -func (t *TestRunner) runAndStreamParallelGinkgoSuite() RunResult { - completions := make(chan RunResult) - writers := make([]*logWriter, t.numCPU) - - server, err := remote.NewServer(t.numCPU) - if err != nil { - panic("Failed to start parallel spec server") - } - - server.Start() - defer server.Close() - - for cpu := 0; cpu < t.numCPU; cpu++ { - config.GinkgoConfig.ParallelNode = cpu + 1 - config.GinkgoConfig.ParallelTotal = t.numCPU - config.GinkgoConfig.SyncHost = server.Address() - - ginkgoArgs := config.BuildFlagArgs("ginkgo", config.GinkgoConfig, config.DefaultReporterConfig) - - writers[cpu] = newLogWriter(os.Stdout, cpu+1) - - cmd := t.cmd(ginkgoArgs, writers[cpu], cpu+1) - - server.RegisterAlive(cpu+1, func() bool { - if cmd.ProcessState == nil { - return true - } - return !cmd.ProcessState.Exited() - }) - - go t.run(cmd, completions) - } - - res := PassingRunResult() - - for cpu := 0; cpu < t.numCPU; cpu++ { - res = res.Merge(<-completions) - } - - for _, writer := range writers { - writer.Close() - } - - os.Stdout.Sync() - - if t.shouldCombineCoverprofiles() { - t.combineCoverprofiles() - } - - return res -} - -func (t *TestRunner) runParallelGinkgoSuite() RunResult { - result := make(chan bool) - completions := make(chan RunResult) - writers := make([]*logWriter, t.numCPU) - reports := make([]*bytes.Buffer, t.numCPU) - - stenographer := stenographer.New(!config.DefaultReporterConfig.NoColor, config.GinkgoConfig.FlakeAttempts > 1) - aggregator := remote.NewAggregator(t.numCPU, result, config.DefaultReporterConfig, stenographer) - - server, err := remote.NewServer(t.numCPU) - if err != nil { - panic("Failed to start parallel spec server") - } - server.RegisterReporters(aggregator) - server.Start() - defer server.Close() - - for cpu := 0; cpu < t.numCPU; cpu++ { - config.GinkgoConfig.ParallelNode = cpu + 1 - config.GinkgoConfig.ParallelTotal = t.numCPU - config.GinkgoConfig.SyncHost = server.Address() - config.GinkgoConfig.StreamHost = server.Address() - - ginkgoArgs := config.BuildFlagArgs("ginkgo", config.GinkgoConfig, config.DefaultReporterConfig) - - reports[cpu] = &bytes.Buffer{} - writers[cpu] = newLogWriter(reports[cpu], cpu+1) - - cmd := t.cmd(ginkgoArgs, writers[cpu], cpu+1) - - server.RegisterAlive(cpu+1, func() bool { - if cmd.ProcessState == nil { - return true - } - return !cmd.ProcessState.Exited() - }) - - go t.run(cmd, completions) - } - - res := PassingRunResult() - - for cpu := 0; cpu < t.numCPU; cpu++ { - res = res.Merge(<-completions) - } - - //all test processes are done, at this point - //we should be able to wait for the aggregator to tell us that it's done - - select { - case <-result: - fmt.Println("") - case <-time.After(time.Second): - //the aggregator never got back to us! something must have gone wrong - fmt.Println(` - ------------------------------------------------------------------- - | | - | Ginkgo timed out waiting for all parallel nodes to report back! | - | | - ------------------------------------------------------------------- -`) - fmt.Println(t.Suite.PackageName, "timed out. path:", t.Suite.Path) - os.Stdout.Sync() - - for _, writer := range writers { - writer.Close() - } - - for _, report := range reports { - fmt.Print(report.String()) - } - - os.Stdout.Sync() - } - - if t.shouldCombineCoverprofiles() { - t.combineCoverprofiles() - } - - return res -} - -const CoverProfileSuffix = ".coverprofile" - -func (t *TestRunner) cmd(ginkgoArgs []string, stream io.Writer, node int) *exec.Cmd { - args := []string{"--test.timeout=" + t.timeout.String()} - - coverProfile := t.getCoverProfile() - - if t.shouldCombineCoverprofiles() { - - testCoverProfile := "--test.coverprofile=" - - coverageFile := "" - // Set default name for coverage results - if coverProfile == "" { - coverageFile = t.Suite.PackageName + CoverProfileSuffix - } else { - coverageFile = coverProfile - } - - testCoverProfile += coverageFile - - t.CoverageFile = filepath.Join(t.Suite.Path, coverageFile) - - if t.numCPU > 1 { - testCoverProfile = fmt.Sprintf("%s.%d", testCoverProfile, node) - } - args = append(args, testCoverProfile) - } - - args = append(args, ginkgoArgs...) - args = append(args, t.additionalArgs...) - - path := t.compilationTargetPath - if t.Suite.Precompiled { - path, _ = filepath.Abs(filepath.Join(t.Suite.Path, fmt.Sprintf("%s.test", t.Suite.PackageName))) - } - - cmd := exec.Command(path, args...) - - cmd.Dir = t.Suite.Path - cmd.Stderr = io.MultiWriter(stream, t.stderr) - cmd.Stdout = stream - - return cmd -} - -func (t *TestRunner) shouldCover() bool { - return *t.goOpts["cover"].(*bool) -} - -func (t *TestRunner) shouldRequireSuite() bool { - return *t.goOpts["requireSuite"].(*bool) -} - -func (t *TestRunner) getCoverProfile() string { - return *t.goOpts["coverprofile"].(*string) -} - -func (t *TestRunner) getCoverPackage() string { - return *t.goOpts["coverpkg"].(*string) -} - -func (t *TestRunner) getCoverMode() string { - return *t.goOpts["covermode"].(*string) -} - -func (t *TestRunner) shouldCombineCoverprofiles() bool { - return t.shouldCover() || t.getCoverPackage() != "" || t.getCoverMode() != "" -} - -func (t *TestRunner) run(cmd *exec.Cmd, completions chan RunResult) RunResult { - var res RunResult - - defer func() { - if completions != nil { - completions <- res - } - }() - - err := cmd.Start() - if err != nil { - fmt.Printf("Failed to run test suite!\n\t%s", err.Error()) - return res - } - - cmd.Wait() - - exitStatus := cmd.ProcessState.Sys().(syscall.WaitStatus).ExitStatus() - res.Passed = (exitStatus == 0) || (exitStatus == types.GINKGO_FOCUS_EXIT_CODE) - res.HasProgrammaticFocus = (exitStatus == types.GINKGO_FOCUS_EXIT_CODE) - - if strings.Contains(t.stderr.String(), "warning: no tests to run") { - if t.shouldRequireSuite() { - res.Passed = false - } - fmt.Fprintf(os.Stderr, `Found no test suites, did you forget to run "ginkgo bootstrap"?`) - } - - return res -} - -func (t *TestRunner) combineCoverprofiles() { - profiles := []string{} - - coverProfile := t.getCoverProfile() - - for cpu := 1; cpu <= t.numCPU; cpu++ { - var coverFile string - if coverProfile == "" { - coverFile = fmt.Sprintf("%s%s.%d", t.Suite.PackageName, CoverProfileSuffix, cpu) - } else { - coverFile = fmt.Sprintf("%s.%d", coverProfile, cpu) - } - - coverFile = filepath.Join(t.Suite.Path, coverFile) - coverProfile, err := ioutil.ReadFile(coverFile) - os.Remove(coverFile) - - if err == nil { - profiles = append(profiles, string(coverProfile)) - } - } - - if len(profiles) != t.numCPU { - return - } - - lines := map[string]int{} - lineOrder := []string{} - for i, coverProfile := range profiles { - for _, line := range strings.Split(string(coverProfile), "\n")[1:] { - if len(line) == 0 { - continue - } - components := strings.Split(line, " ") - count, _ := strconv.Atoi(components[len(components)-1]) - prefix := strings.Join(components[0:len(components)-1], " ") - lines[prefix] += count - if i == 0 { - lineOrder = append(lineOrder, prefix) - } - } - } - - output := []string{"mode: atomic"} - for _, line := range lineOrder { - output = append(output, fmt.Sprintf("%s %d", line, lines[line])) - } - finalOutput := strings.Join(output, "\n") - - finalFilename := "" - - if coverProfile != "" { - finalFilename = coverProfile - } else { - finalFilename = fmt.Sprintf("%s%s", t.Suite.PackageName, CoverProfileSuffix) - } - - coverageFilepath := filepath.Join(t.Suite.Path, finalFilename) - ioutil.WriteFile(coverageFilepath, []byte(finalOutput), 0666) - - t.CoverageFile = coverageFilepath -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go b/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go deleted file mode 100644 index 09b16015a..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/test_suite.go +++ /dev/null @@ -1,115 +0,0 @@ -package testsuite - -import ( - "errors" - "io/ioutil" - "os" - "path/filepath" - "regexp" - "strings" -) - -type TestSuite struct { - Path string - PackageName string - IsGinkgo bool - Precompiled bool -} - -func PrecompiledTestSuite(path string) (TestSuite, error) { - info, err := os.Stat(path) - if err != nil { - return TestSuite{}, err - } - - if info.IsDir() { - return TestSuite{}, errors.New("this is a directory, not a file") - } - - if filepath.Ext(path) != ".test" { - return TestSuite{}, errors.New("this is not a .test binary") - } - - if info.Mode()&0111 == 0 { - return TestSuite{}, errors.New("this is not executable") - } - - dir := relPath(filepath.Dir(path)) - packageName := strings.TrimSuffix(filepath.Base(path), filepath.Ext(path)) - - return TestSuite{ - Path: dir, - PackageName: packageName, - IsGinkgo: true, - Precompiled: true, - }, nil -} - -func SuitesInDir(dir string, recurse bool) []TestSuite { - suites := []TestSuite{} - - if vendorExperimentCheck(dir) { - return suites - } - - files, _ := ioutil.ReadDir(dir) - re := regexp.MustCompile(`_test\.go$`) - for _, file := range files { - if !file.IsDir() && re.Match([]byte(file.Name())) { - suites = append(suites, New(dir, files)) - break - } - } - - if recurse { - re = regexp.MustCompile(`^[._]`) - for _, file := range files { - if file.IsDir() && !re.Match([]byte(file.Name())) { - suites = append(suites, SuitesInDir(dir+"/"+file.Name(), recurse)...) - } - } - } - - return suites -} - -func relPath(dir string) string { - dir, _ = filepath.Abs(dir) - cwd, _ := os.Getwd() - dir, _ = filepath.Rel(cwd, filepath.Clean(dir)) - - if string(dir[0]) != "." { - dir = "." + string(filepath.Separator) + dir - } - - return dir -} - -func New(dir string, files []os.FileInfo) TestSuite { - return TestSuite{ - Path: relPath(dir), - PackageName: packageNameForSuite(dir), - IsGinkgo: filesHaveGinkgoSuite(dir, files), - } -} - -func packageNameForSuite(dir string) string { - path, _ := filepath.Abs(dir) - return filepath.Base(path) -} - -func filesHaveGinkgoSuite(dir string, files []os.FileInfo) bool { - reTestFile := regexp.MustCompile(`_test\.go$`) - reGinkgo := regexp.MustCompile(`package ginkgo|\/ginkgo"`) - - for _, file := range files { - if !file.IsDir() && reTestFile.Match([]byte(file.Name())) { - contents, _ := ioutil.ReadFile(dir + "/" + file.Name()) - if reGinkgo.Match(contents) { - return true - } - } - } - - return false -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go15.go b/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go15.go deleted file mode 100644 index 75f827a12..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go15.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build !go1.6 - -package testsuite - -import ( - "os" - "path" -) - -// "This change will only be enabled if the go command is run with -// GO15VENDOREXPERIMENT=1 in its environment." -// c.f. the vendor-experiment proposal https://goo.gl/2ucMeC -func vendorExperimentCheck(dir string) bool { - vendorExperiment := os.Getenv("GO15VENDOREXPERIMENT") - return vendorExperiment == "1" && path.Base(dir) == "vendor" -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go16.go b/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go16.go deleted file mode 100644 index 596e5e5c1..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/testsuite/vendor_check_go16.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build go1.6 - -package testsuite - -import ( - "os" - "path" -) - -// in 1.6 the vendor directory became the default go behaviour, so now -// check if its disabled. -func vendorExperimentCheck(dir string) bool { - vendorExperiment := os.Getenv("GO15VENDOREXPERIMENT") - return vendorExperiment != "0" && path.Base(dir) == "vendor" -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/unfocus_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/unfocus_command.go deleted file mode 100644 index 683c3a998..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/unfocus_command.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "os/exec" -) - -func BuildUnfocusCommand() *Command { - return &Command{ - Name: "unfocus", - AltName: "blur", - FlagSet: flag.NewFlagSet("unfocus", flag.ExitOnError), - UsageCommand: "ginkgo unfocus (or ginkgo blur)", - Usage: []string{ - "Recursively unfocuses any focused tests under the current directory", - }, - Command: unfocusSpecs, - } -} - -func unfocusSpecs([]string, []string) { - unfocus("Describe") - unfocus("Context") - unfocus("It") - unfocus("Measure") - unfocus("DescribeTable") - unfocus("Entry") -} - -func unfocus(component string) { - fmt.Printf("Removing F%s...\n", component) - cmd := exec.Command("gofmt", fmt.Sprintf("-r=F%s -> %s", component, component), "-w", ".") - out, _ := cmd.CombinedOutput() - if string(out) != "" { - println(string(out)) - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go deleted file mode 100644 index f586908e8..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/version_command.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import ( - "flag" - "fmt" - - "github.com/onsi/ginkgo/config" -) - -func BuildVersionCommand() *Command { - return &Command{ - Name: "version", - FlagSet: flag.NewFlagSet("version", flag.ExitOnError), - UsageCommand: "ginkgo version", - Usage: []string{ - "Print Ginkgo's version", - }, - Command: printVersion, - } -} - -func printVersion([]string, []string) { - fmt.Printf("Ginkgo Version %s\n", config.VERSION) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta.go deleted file mode 100644 index 6c485c5b1..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta.go +++ /dev/null @@ -1,22 +0,0 @@ -package watch - -import "sort" - -type Delta struct { - ModifiedPackages []string - - NewSuites []*Suite - RemovedSuites []*Suite - modifiedSuites []*Suite -} - -type DescendingByDelta []*Suite - -func (a DescendingByDelta) Len() int { return len(a) } -func (a DescendingByDelta) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a DescendingByDelta) Less(i, j int) bool { return a[i].Delta() > a[j].Delta() } - -func (d Delta) ModifiedSuites() []*Suite { - sort.Sort(DescendingByDelta(d.modifiedSuites)) - return d.modifiedSuites -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta_tracker.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta_tracker.go deleted file mode 100644 index a628303d7..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/delta_tracker.go +++ /dev/null @@ -1,75 +0,0 @@ -package watch - -import ( - "fmt" - - "regexp" - - "github.com/onsi/ginkgo/ginkgo/testsuite" -) - -type SuiteErrors map[testsuite.TestSuite]error - -type DeltaTracker struct { - maxDepth int - watchRegExp *regexp.Regexp - suites map[string]*Suite - packageHashes *PackageHashes -} - -func NewDeltaTracker(maxDepth int, watchRegExp *regexp.Regexp) *DeltaTracker { - return &DeltaTracker{ - maxDepth: maxDepth, - watchRegExp: watchRegExp, - packageHashes: NewPackageHashes(watchRegExp), - suites: map[string]*Suite{}, - } -} - -func (d *DeltaTracker) Delta(suites []testsuite.TestSuite) (delta Delta, errors SuiteErrors) { - errors = SuiteErrors{} - delta.ModifiedPackages = d.packageHashes.CheckForChanges() - - providedSuitePaths := map[string]bool{} - for _, suite := range suites { - providedSuitePaths[suite.Path] = true - } - - d.packageHashes.StartTrackingUsage() - - for _, suite := range d.suites { - if providedSuitePaths[suite.Suite.Path] { - if suite.Delta() > 0 { - delta.modifiedSuites = append(delta.modifiedSuites, suite) - } - } else { - delta.RemovedSuites = append(delta.RemovedSuites, suite) - } - } - - d.packageHashes.StopTrackingUsageAndPrune() - - for _, suite := range suites { - _, ok := d.suites[suite.Path] - if !ok { - s, err := NewSuite(suite, d.maxDepth, d.packageHashes) - if err != nil { - errors[suite] = err - continue - } - d.suites[suite.Path] = s - delta.NewSuites = append(delta.NewSuites, s) - } - } - - return delta, errors -} - -func (d *DeltaTracker) WillRun(suite testsuite.TestSuite) error { - s, ok := d.suites[suite.Path] - if !ok { - return fmt.Errorf("unknown suite %s", suite.Path) - } - - return s.MarkAsRunAndRecomputedDependencies(d.maxDepth) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go deleted file mode 100644 index 82c25face..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/dependencies.go +++ /dev/null @@ -1,91 +0,0 @@ -package watch - -import ( - "go/build" - "regexp" -) - -var ginkgoAndGomegaFilter = regexp.MustCompile(`github\.com/onsi/ginkgo|github\.com/onsi/gomega`) - -type Dependencies struct { - deps map[string]int -} - -func NewDependencies(path string, maxDepth int) (Dependencies, error) { - d := Dependencies{ - deps: map[string]int{}, - } - - if maxDepth == 0 { - return d, nil - } - - err := d.seedWithDepsForPackageAtPath(path) - if err != nil { - return d, err - } - - for depth := 1; depth < maxDepth; depth++ { - n := len(d.deps) - d.addDepsForDepth(depth) - if n == len(d.deps) { - break - } - } - - return d, nil -} - -func (d Dependencies) Dependencies() map[string]int { - return d.deps -} - -func (d Dependencies) seedWithDepsForPackageAtPath(path string) error { - pkg, err := build.ImportDir(path, 0) - if err != nil { - return err - } - - d.resolveAndAdd(pkg.Imports, 1) - d.resolveAndAdd(pkg.TestImports, 1) - d.resolveAndAdd(pkg.XTestImports, 1) - - delete(d.deps, pkg.Dir) - return nil -} - -func (d Dependencies) addDepsForDepth(depth int) { - for dep, depDepth := range d.deps { - if depDepth == depth { - d.addDepsForDep(dep, depth+1) - } - } -} - -func (d Dependencies) addDepsForDep(dep string, depth int) { - pkg, err := build.ImportDir(dep, 0) - if err != nil { - println(err.Error()) - return - } - d.resolveAndAdd(pkg.Imports, depth) -} - -func (d Dependencies) resolveAndAdd(deps []string, depth int) { - for _, dep := range deps { - pkg, err := build.Import(dep, ".", 0) - if err != nil { - continue - } - if pkg.Goroot == false && !ginkgoAndGomegaFilter.Match([]byte(pkg.Dir)) { - d.addDepIfNotPresent(pkg.Dir, depth) - } - } -} - -func (d Dependencies) addDepIfNotPresent(dep string, depth int) { - _, ok := d.deps[dep] - if !ok { - d.deps[dep] = depth - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hash.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hash.go deleted file mode 100644 index 7e1e4192d..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hash.go +++ /dev/null @@ -1,104 +0,0 @@ -package watch - -import ( - "fmt" - "io/ioutil" - "os" - "regexp" - "time" -) - -var goTestRegExp = regexp.MustCompile(`_test\.go$`) - -type PackageHash struct { - CodeModifiedTime time.Time - TestModifiedTime time.Time - Deleted bool - - path string - codeHash string - testHash string - watchRegExp *regexp.Regexp -} - -func NewPackageHash(path string, watchRegExp *regexp.Regexp) *PackageHash { - p := &PackageHash{ - path: path, - watchRegExp: watchRegExp, - } - - p.codeHash, _, p.testHash, _, p.Deleted = p.computeHashes() - - return p -} - -func (p *PackageHash) CheckForChanges() bool { - codeHash, codeModifiedTime, testHash, testModifiedTime, deleted := p.computeHashes() - - if deleted { - if p.Deleted == false { - t := time.Now() - p.CodeModifiedTime = t - p.TestModifiedTime = t - } - p.Deleted = true - return true - } - - modified := false - p.Deleted = false - - if p.codeHash != codeHash { - p.CodeModifiedTime = codeModifiedTime - modified = true - } - if p.testHash != testHash { - p.TestModifiedTime = testModifiedTime - modified = true - } - - p.codeHash = codeHash - p.testHash = testHash - return modified -} - -func (p *PackageHash) computeHashes() (codeHash string, codeModifiedTime time.Time, testHash string, testModifiedTime time.Time, deleted bool) { - infos, err := ioutil.ReadDir(p.path) - - if err != nil { - deleted = true - return - } - - for _, info := range infos { - if info.IsDir() { - continue - } - - if goTestRegExp.Match([]byte(info.Name())) { - testHash += p.hashForFileInfo(info) - if info.ModTime().After(testModifiedTime) { - testModifiedTime = info.ModTime() - } - continue - } - - if p.watchRegExp.Match([]byte(info.Name())) { - codeHash += p.hashForFileInfo(info) - if info.ModTime().After(codeModifiedTime) { - codeModifiedTime = info.ModTime() - } - } - } - - testHash += codeHash - if codeModifiedTime.After(testModifiedTime) { - testModifiedTime = codeModifiedTime - } - - return -} - -func (p *PackageHash) hashForFileInfo(info os.FileInfo) string { - return fmt.Sprintf("%s_%d_%d", info.Name(), info.Size(), info.ModTime().UnixNano()) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hashes.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hashes.go deleted file mode 100644 index b4892bebf..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/package_hashes.go +++ /dev/null @@ -1,85 +0,0 @@ -package watch - -import ( - "path/filepath" - "regexp" - "sync" -) - -type PackageHashes struct { - PackageHashes map[string]*PackageHash - usedPaths map[string]bool - watchRegExp *regexp.Regexp - lock *sync.Mutex -} - -func NewPackageHashes(watchRegExp *regexp.Regexp) *PackageHashes { - return &PackageHashes{ - PackageHashes: map[string]*PackageHash{}, - usedPaths: nil, - watchRegExp: watchRegExp, - lock: &sync.Mutex{}, - } -} - -func (p *PackageHashes) CheckForChanges() []string { - p.lock.Lock() - defer p.lock.Unlock() - - modified := []string{} - - for _, packageHash := range p.PackageHashes { - if packageHash.CheckForChanges() { - modified = append(modified, packageHash.path) - } - } - - return modified -} - -func (p *PackageHashes) Add(path string) *PackageHash { - p.lock.Lock() - defer p.lock.Unlock() - - path, _ = filepath.Abs(path) - _, ok := p.PackageHashes[path] - if !ok { - p.PackageHashes[path] = NewPackageHash(path, p.watchRegExp) - } - - if p.usedPaths != nil { - p.usedPaths[path] = true - } - return p.PackageHashes[path] -} - -func (p *PackageHashes) Get(path string) *PackageHash { - p.lock.Lock() - defer p.lock.Unlock() - - path, _ = filepath.Abs(path) - if p.usedPaths != nil { - p.usedPaths[path] = true - } - return p.PackageHashes[path] -} - -func (p *PackageHashes) StartTrackingUsage() { - p.lock.Lock() - defer p.lock.Unlock() - - p.usedPaths = map[string]bool{} -} - -func (p *PackageHashes) StopTrackingUsageAndPrune() { - p.lock.Lock() - defer p.lock.Unlock() - - for path := range p.PackageHashes { - if !p.usedPaths[path] { - delete(p.PackageHashes, path) - } - } - - p.usedPaths = nil -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch/suite.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch/suite.go deleted file mode 100644 index 5deaba7cb..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch/suite.go +++ /dev/null @@ -1,87 +0,0 @@ -package watch - -import ( - "fmt" - "math" - "time" - - "github.com/onsi/ginkgo/ginkgo/testsuite" -) - -type Suite struct { - Suite testsuite.TestSuite - RunTime time.Time - Dependencies Dependencies - - sharedPackageHashes *PackageHashes -} - -func NewSuite(suite testsuite.TestSuite, maxDepth int, sharedPackageHashes *PackageHashes) (*Suite, error) { - deps, err := NewDependencies(suite.Path, maxDepth) - if err != nil { - return nil, err - } - - sharedPackageHashes.Add(suite.Path) - for dep := range deps.Dependencies() { - sharedPackageHashes.Add(dep) - } - - return &Suite{ - Suite: suite, - Dependencies: deps, - - sharedPackageHashes: sharedPackageHashes, - }, nil -} - -func (s *Suite) Delta() float64 { - delta := s.delta(s.Suite.Path, true, 0) * 1000 - for dep, depth := range s.Dependencies.Dependencies() { - delta += s.delta(dep, false, depth) - } - return delta -} - -func (s *Suite) MarkAsRunAndRecomputedDependencies(maxDepth int) error { - s.RunTime = time.Now() - - deps, err := NewDependencies(s.Suite.Path, maxDepth) - if err != nil { - return err - } - - s.sharedPackageHashes.Add(s.Suite.Path) - for dep := range deps.Dependencies() { - s.sharedPackageHashes.Add(dep) - } - - s.Dependencies = deps - - return nil -} - -func (s *Suite) Description() string { - numDeps := len(s.Dependencies.Dependencies()) - pluralizer := "ies" - if numDeps == 1 { - pluralizer = "y" - } - return fmt.Sprintf("%s [%d dependenc%s]", s.Suite.Path, numDeps, pluralizer) -} - -func (s *Suite) delta(packagePath string, includeTests bool, depth int) float64 { - return math.Max(float64(s.dt(packagePath, includeTests)), 0) / float64(depth+1) -} - -func (s *Suite) dt(packagePath string, includeTests bool) time.Duration { - packageHash := s.sharedPackageHashes.Get(packagePath) - var modifiedTime time.Time - if includeTests { - modifiedTime = packageHash.TestModifiedTime - } else { - modifiedTime = packageHash.CodeModifiedTime - } - - return modifiedTime.Sub(s.RunTime) -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo/watch_command.go b/vendor/github.com/onsi/ginkgo/ginkgo/watch_command.go deleted file mode 100644 index a6ef053c8..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo/watch_command.go +++ /dev/null @@ -1,175 +0,0 @@ -package main - -import ( - "flag" - "fmt" - "regexp" - "time" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/ginkgo/interrupthandler" - "github.com/onsi/ginkgo/ginkgo/testrunner" - "github.com/onsi/ginkgo/ginkgo/testsuite" - "github.com/onsi/ginkgo/ginkgo/watch" - colorable "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable" -) - -func BuildWatchCommand() *Command { - commandFlags := NewWatchCommandFlags(flag.NewFlagSet("watch", flag.ExitOnError)) - interruptHandler := interrupthandler.NewInterruptHandler() - notifier := NewNotifier(commandFlags) - watcher := &SpecWatcher{ - commandFlags: commandFlags, - notifier: notifier, - interruptHandler: interruptHandler, - suiteRunner: NewSuiteRunner(notifier, interruptHandler), - } - - return &Command{ - Name: "watch", - FlagSet: commandFlags.FlagSet, - UsageCommand: "ginkgo watch -- ", - Usage: []string{ - "Watches the tests in the passed in and runs them when changes occur.", - "Any arguments after -- will be passed to the test.", - }, - Command: watcher.WatchSpecs, - SuppressFlagDocumentation: true, - FlagDocSubstitute: []string{ - "Accepts all the flags that the ginkgo command accepts except for --keepGoing and --untilItFails", - }, - } -} - -type SpecWatcher struct { - commandFlags *RunWatchAndBuildCommandFlags - notifier *Notifier - interruptHandler *interrupthandler.InterruptHandler - suiteRunner *SuiteRunner -} - -func (w *SpecWatcher) WatchSpecs(args []string, additionalArgs []string) { - w.commandFlags.computeNodes() - w.notifier.VerifyNotificationsAreAvailable() - - w.WatchSuites(args, additionalArgs) -} - -func (w *SpecWatcher) runnersForSuites(suites []testsuite.TestSuite, additionalArgs []string) []*testrunner.TestRunner { - runners := []*testrunner.TestRunner{} - - for _, suite := range suites { - runners = append(runners, testrunner.New(suite, w.commandFlags.NumCPU, w.commandFlags.ParallelStream, w.commandFlags.Timeout, w.commandFlags.GoOpts, additionalArgs)) - } - - return runners -} - -func (w *SpecWatcher) WatchSuites(args []string, additionalArgs []string) { - suites, _ := findSuites(args, w.commandFlags.Recurse, w.commandFlags.SkipPackage, false) - - if len(suites) == 0 { - complainAndQuit("Found no test suites") - } - - fmt.Printf("Identified %d test %s. Locating dependencies to a depth of %d (this may take a while)...\n", len(suites), pluralizedWord("suite", "suites", len(suites)), w.commandFlags.Depth) - deltaTracker := watch.NewDeltaTracker(w.commandFlags.Depth, regexp.MustCompile(w.commandFlags.WatchRegExp)) - delta, errors := deltaTracker.Delta(suites) - - fmt.Printf("Watching %d %s:\n", len(delta.NewSuites), pluralizedWord("suite", "suites", len(delta.NewSuites))) - for _, suite := range delta.NewSuites { - fmt.Println(" " + suite.Description()) - } - - for suite, err := range errors { - fmt.Printf("Failed to watch %s: %s\n", suite.PackageName, err) - } - - if len(suites) == 1 { - runners := w.runnersForSuites(suites, additionalArgs) - w.suiteRunner.RunSuites(runners, w.commandFlags.NumCompilers, true, nil) - runners[0].CleanUp() - } - - ticker := time.NewTicker(time.Second) - - for { - select { - case <-ticker.C: - suites, _ := findSuites(args, w.commandFlags.Recurse, w.commandFlags.SkipPackage, false) - delta, _ := deltaTracker.Delta(suites) - coloredStream := colorable.NewColorableStdout() - - suitesToRun := []testsuite.TestSuite{} - - if len(delta.NewSuites) > 0 { - fmt.Fprintf(coloredStream, greenColor+"Detected %d new %s:\n"+defaultStyle, len(delta.NewSuites), pluralizedWord("suite", "suites", len(delta.NewSuites))) - for _, suite := range delta.NewSuites { - suitesToRun = append(suitesToRun, suite.Suite) - fmt.Fprintln(coloredStream, " "+suite.Description()) - } - } - - modifiedSuites := delta.ModifiedSuites() - if len(modifiedSuites) > 0 { - fmt.Fprintln(coloredStream, greenColor+"\nDetected changes in:"+defaultStyle) - for _, pkg := range delta.ModifiedPackages { - fmt.Fprintln(coloredStream, " "+pkg) - } - fmt.Fprintf(coloredStream, greenColor+"Will run %d %s:\n"+defaultStyle, len(modifiedSuites), pluralizedWord("suite", "suites", len(modifiedSuites))) - for _, suite := range modifiedSuites { - suitesToRun = append(suitesToRun, suite.Suite) - fmt.Fprintln(coloredStream, " "+suite.Description()) - } - fmt.Fprintln(coloredStream, "") - } - - if len(suitesToRun) > 0 { - w.UpdateSeed() - w.ComputeSuccinctMode(len(suitesToRun)) - runners := w.runnersForSuites(suitesToRun, additionalArgs) - result, _ := w.suiteRunner.RunSuites(runners, w.commandFlags.NumCompilers, true, func(suite testsuite.TestSuite) { - deltaTracker.WillRun(suite) - }) - for _, runner := range runners { - runner.CleanUp() - } - if !w.interruptHandler.WasInterrupted() { - color := redColor - if result.Passed { - color = greenColor - } - fmt.Fprintln(coloredStream, color+"\nDone. Resuming watch..."+defaultStyle) - } - } - - case <-w.interruptHandler.C: - return - } - } -} - -func (w *SpecWatcher) ComputeSuccinctMode(numSuites int) { - if config.DefaultReporterConfig.Verbose { - config.DefaultReporterConfig.Succinct = false - return - } - - if w.commandFlags.wasSet("succinct") { - return - } - - if numSuites == 1 { - config.DefaultReporterConfig.Succinct = false - } - - if numSuites > 1 { - config.DefaultReporterConfig.Succinct = true - } -} - -func (w *SpecWatcher) UpdateSeed() { - if !w.commandFlags.wasSet("seed") { - config.GinkgoConfig.RandomSeed = time.Now().Unix() - } -} diff --git a/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go b/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go deleted file mode 100644 index 9ab1c9a94..000000000 --- a/vendor/github.com/onsi/ginkgo/ginkgo_dsl.go +++ /dev/null @@ -1,573 +0,0 @@ -/* -Ginkgo is a BDD-style testing framework for Golang - -The godoc documentation describes Ginkgo's API. More comprehensive documentation (with examples!) is available at http://onsi.github.io/ginkgo/ - -Ginkgo's preferred matcher library is [Gomega](http://github.com/onsi/gomega) - -Ginkgo on Github: http://github.com/onsi/ginkgo - -Ginkgo is MIT-Licensed -*/ -package ginkgo - -import ( - "flag" - "fmt" - "io" - "net/http" - "os" - "strings" - "time" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/internal/remote" - "github.com/onsi/ginkgo/internal/suite" - "github.com/onsi/ginkgo/internal/testingtproxy" - "github.com/onsi/ginkgo/internal/writer" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/reporters/stenographer" - "github.com/onsi/ginkgo/types" -) - -const GINKGO_VERSION = config.VERSION -const GINKGO_PANIC = ` -Your test failed. -Ginkgo panics to prevent subsequent assertions from running. -Normally Ginkgo rescues this panic so you shouldn't see it. - -But, if you make an assertion in a goroutine, Ginkgo can't capture the panic. -To circumvent this, you should call - - defer GinkgoRecover() - -at the top of the goroutine that caused this panic. -` -const defaultTimeout = 1 - -var globalSuite *suite.Suite -var globalFailer *failer.Failer - -func init() { - config.Flags(flag.CommandLine, "ginkgo", true) - GinkgoWriter = writer.New(os.Stdout) - globalFailer = failer.New() - globalSuite = suite.New(globalFailer) -} - -//GinkgoWriter implements an io.Writer -//When running in verbose mode any writes to GinkgoWriter will be immediately printed -//to stdout. Otherwise, GinkgoWriter will buffer any writes produced during the current test and flush them to screen -//only if the current test fails. -var GinkgoWriter io.Writer - -//The interface by which Ginkgo receives *testing.T -type GinkgoTestingT interface { - Fail() -} - -//GinkgoRandomSeed returns the seed used to randomize spec execution order. It is -//useful for seeding your own pseudorandom number generators (PRNGs) to ensure -//consistent executions from run to run, where your tests contain variability (for -//example, when selecting random test data). -func GinkgoRandomSeed() int64 { - return config.GinkgoConfig.RandomSeed -} - -//GinkgoParallelNode returns the parallel node number for the current ginkgo process -//The node number is 1-indexed -func GinkgoParallelNode() int { - return config.GinkgoConfig.ParallelNode -} - -//Some matcher libraries or legacy codebases require a *testing.T -//GinkgoT implements an interface analogous to *testing.T and can be used if -//the library in question accepts *testing.T through an interface -// -// For example, with testify: -// assert.Equal(GinkgoT(), 123, 123, "they should be equal") -// -// Or with gomock: -// gomock.NewController(GinkgoT()) -// -// GinkgoT() takes an optional offset argument that can be used to get the -// correct line number associated with the failure. -func GinkgoT(optionalOffset ...int) GinkgoTInterface { - offset := 3 - if len(optionalOffset) > 0 { - offset = optionalOffset[0] - } - return testingtproxy.New(GinkgoWriter, Fail, offset) -} - -//The interface returned by GinkgoT(). This covers most of the methods -//in the testing package's T. -type GinkgoTInterface interface { - Fail() - Error(args ...interface{}) - Errorf(format string, args ...interface{}) - FailNow() - Fatal(args ...interface{}) - Fatalf(format string, args ...interface{}) - Log(args ...interface{}) - Logf(format string, args ...interface{}) - Failed() bool - Parallel() - Skip(args ...interface{}) - Skipf(format string, args ...interface{}) - SkipNow() - Skipped() bool -} - -//Custom Ginkgo test reporters must implement the Reporter interface. -// -//The custom reporter is passed in a SuiteSummary when the suite begins and ends, -//and a SpecSummary just before a spec begins and just after a spec ends -type Reporter reporters.Reporter - -//Asynchronous specs are given a channel of the Done type. You must close or write to the channel -//to tell Ginkgo that your async test is done. -type Done chan<- interface{} - -//GinkgoTestDescription represents the information about the current running test returned by CurrentGinkgoTestDescription -// FullTestText: a concatenation of ComponentTexts and the TestText -// ComponentTexts: a list of all texts for the Describes & Contexts leading up to the current test -// TestText: the text in the actual It or Measure node -// IsMeasurement: true if the current test is a measurement -// FileName: the name of the file containing the current test -// LineNumber: the line number for the current test -// Failed: if the current test has failed, this will be true (useful in an AfterEach) -type GinkgoTestDescription struct { - FullTestText string - ComponentTexts []string - TestText string - - IsMeasurement bool - - FileName string - LineNumber int - - Failed bool -} - -//CurrentGinkgoTestDescripton returns information about the current running test. -func CurrentGinkgoTestDescription() GinkgoTestDescription { - summary, ok := globalSuite.CurrentRunningSpecSummary() - if !ok { - return GinkgoTestDescription{} - } - - subjectCodeLocation := summary.ComponentCodeLocations[len(summary.ComponentCodeLocations)-1] - - return GinkgoTestDescription{ - ComponentTexts: summary.ComponentTexts[1:], - FullTestText: strings.Join(summary.ComponentTexts[1:], " "), - TestText: summary.ComponentTexts[len(summary.ComponentTexts)-1], - IsMeasurement: summary.IsMeasurement, - FileName: subjectCodeLocation.FileName, - LineNumber: subjectCodeLocation.LineNumber, - Failed: summary.HasFailureState(), - } -} - -//Measurement tests receive a Benchmarker. -// -//You use the Time() function to time how long the passed in body function takes to run -//You use the RecordValue() function to track arbitrary numerical measurements. -//The RecordValueWithPrecision() function can be used alternatively to provide the unit -//and resolution of the numeric measurement. -//The optional info argument is passed to the test reporter and can be used to -// provide the measurement data to a custom reporter with context. -// -//See http://onsi.github.io/ginkgo/#benchmark_tests for more details -type Benchmarker interface { - Time(name string, body func(), info ...interface{}) (elapsedTime time.Duration) - RecordValue(name string, value float64, info ...interface{}) - RecordValueWithPrecision(name string, value float64, units string, precision int, info ...interface{}) -} - -//RunSpecs is the entry point for the Ginkgo test runner. -//You must call this within a Golang testing TestX(t *testing.T) function. -// -//To bootstrap a test suite you can use the Ginkgo CLI: -// -// ginkgo bootstrap -func RunSpecs(t GinkgoTestingT, description string) bool { - specReporters := []Reporter{buildDefaultReporter()} - return RunSpecsWithCustomReporters(t, description, specReporters) -} - -//To run your tests with Ginkgo's default reporter and your custom reporter(s), replace -//RunSpecs() with this method. -func RunSpecsWithDefaultAndCustomReporters(t GinkgoTestingT, description string, specReporters []Reporter) bool { - specReporters = append(specReporters, buildDefaultReporter()) - return RunSpecsWithCustomReporters(t, description, specReporters) -} - -//To run your tests with your custom reporter(s) (and *not* Ginkgo's default reporter), replace -//RunSpecs() with this method. Note that parallel tests will not work correctly without the default reporter -func RunSpecsWithCustomReporters(t GinkgoTestingT, description string, specReporters []Reporter) bool { - writer := GinkgoWriter.(*writer.Writer) - writer.SetStream(config.DefaultReporterConfig.Verbose) - reporters := make([]reporters.Reporter, len(specReporters)) - for i, reporter := range specReporters { - reporters[i] = reporter - } - passed, hasFocusedTests := globalSuite.Run(t, description, reporters, writer, config.GinkgoConfig) - if passed && hasFocusedTests && strings.TrimSpace(os.Getenv("GINKGO_EDITOR_INTEGRATION")) == "" { - fmt.Println("PASS | FOCUSED") - os.Exit(types.GINKGO_FOCUS_EXIT_CODE) - } - return passed -} - -func buildDefaultReporter() Reporter { - remoteReportingServer := config.GinkgoConfig.StreamHost - if remoteReportingServer == "" { - stenographer := stenographer.New(!config.DefaultReporterConfig.NoColor, config.GinkgoConfig.FlakeAttempts > 1) - return reporters.NewDefaultReporter(config.DefaultReporterConfig, stenographer) - } else { - return remote.NewForwardingReporter(remoteReportingServer, &http.Client{}, remote.NewOutputInterceptor()) - } -} - -//Skip notifies Ginkgo that the current spec was skipped. -func Skip(message string, callerSkip ...int) { - skip := 0 - if len(callerSkip) > 0 { - skip = callerSkip[0] - } - - globalFailer.Skip(message, codelocation.New(skip+1)) - panic(GINKGO_PANIC) -} - -//Fail notifies Ginkgo that the current spec has failed. (Gomega will call Fail for you automatically when an assertion fails.) -func Fail(message string, callerSkip ...int) { - skip := 0 - if len(callerSkip) > 0 { - skip = callerSkip[0] - } - - globalFailer.Fail(message, codelocation.New(skip+1)) - panic(GINKGO_PANIC) -} - -//GinkgoRecover should be deferred at the top of any spawned goroutine that (may) call `Fail` -//Since Gomega assertions call fail, you should throw a `defer GinkgoRecover()` at the top of any goroutine that -//calls out to Gomega -// -//Here's why: Ginkgo's `Fail` method records the failure and then panics to prevent -//further assertions from running. This panic must be recovered. Ginkgo does this for you -//if the panic originates in a Ginkgo node (an It, BeforeEach, etc...) -// -//Unfortunately, if a panic originates on a goroutine *launched* from one of these nodes there's no -//way for Ginkgo to rescue the panic. To do this, you must remember to `defer GinkgoRecover()` at the top of such a goroutine. -func GinkgoRecover() { - e := recover() - if e != nil { - globalFailer.Panic(codelocation.New(1), e) - } -} - -//Describe blocks allow you to organize your specs. A Describe block can contain any number of -//BeforeEach, AfterEach, JustBeforeEach, It, and Measurement blocks. -// -//In addition you can nest Describe and Context blocks. Describe and Context blocks are functionally -//equivalent. The difference is purely semantic -- you typical Describe the behavior of an object -//or method and, within that Describe, outline a number of Contexts. -func Describe(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypeNone, codelocation.New(1)) - return true -} - -//You can focus the tests within a describe block using FDescribe -func FDescribe(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypeFocused, codelocation.New(1)) - return true -} - -//You can mark the tests within a describe block as pending using PDescribe -func PDescribe(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypePending, codelocation.New(1)) - return true -} - -//You can mark the tests within a describe block as pending using XDescribe -func XDescribe(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypePending, codelocation.New(1)) - return true -} - -//Context blocks allow you to organize your specs. A Context block can contain any number of -//BeforeEach, AfterEach, JustBeforeEach, It, and Measurement blocks. -// -//In addition you can nest Describe and Context blocks. Describe and Context blocks are functionally -//equivalent. The difference is purely semantic -- you typical Describe the behavior of an object -//or method and, within that Describe, outline a number of Contexts. -func Context(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypeNone, codelocation.New(1)) - return true -} - -//You can focus the tests within a describe block using FContext -func FContext(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypeFocused, codelocation.New(1)) - return true -} - -//You can mark the tests within a describe block as pending using PContext -func PContext(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypePending, codelocation.New(1)) - return true -} - -//You can mark the tests within a describe block as pending using XContext -func XContext(text string, body func()) bool { - globalSuite.PushContainerNode(text, body, types.FlagTypePending, codelocation.New(1)) - return true -} - -//It blocks contain your test code and assertions. You cannot nest any other Ginkgo blocks -//within an It block. -// -//Ginkgo will normally run It blocks synchronously. To perform asynchronous tests, pass a -//function that accepts a Done channel. When you do this, you can also provide an optional timeout. -func It(text string, body interface{}, timeout ...float64) bool { - globalSuite.PushItNode(text, body, types.FlagTypeNone, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//You can focus individual Its using FIt -func FIt(text string, body interface{}, timeout ...float64) bool { - globalSuite.PushItNode(text, body, types.FlagTypeFocused, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//You can mark Its as pending using PIt -func PIt(text string, _ ...interface{}) bool { - globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) - return true -} - -//You can mark Its as pending using XIt -func XIt(text string, _ ...interface{}) bool { - globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) - return true -} - -//Specify blocks are aliases for It blocks and allow for more natural wording in situations -//which "It" does not fit into a natural sentence flow. All the same protocols apply for Specify blocks -//which apply to It blocks. -func Specify(text string, body interface{}, timeout ...float64) bool { - globalSuite.PushItNode(text, body, types.FlagTypeNone, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//You can focus individual Specifys using FSpecify -func FSpecify(text string, body interface{}, timeout ...float64) bool { - globalSuite.PushItNode(text, body, types.FlagTypeFocused, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//You can mark Specifys as pending using PSpecify -func PSpecify(text string, is ...interface{}) bool { - globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) - return true -} - -//You can mark Specifys as pending using XSpecify -func XSpecify(text string, is ...interface{}) bool { - globalSuite.PushItNode(text, func() {}, types.FlagTypePending, codelocation.New(1), 0) - return true -} - -//By allows you to better document large Its. -// -//Generally you should try to keep your Its short and to the point. This is not always possible, however, -//especially in the context of integration tests that capture a particular workflow. -// -//By allows you to document such flows. By must be called within a runnable node (It, BeforeEach, Measure, etc...) -//By will simply log the passed in text to the GinkgoWriter. If By is handed a function it will immediately run the function. -func By(text string, callbacks ...func()) { - preamble := "\x1b[1mSTEP\x1b[0m" - if config.DefaultReporterConfig.NoColor { - preamble = "STEP" - } - fmt.Fprintln(GinkgoWriter, preamble+": "+text) - if len(callbacks) == 1 { - callbacks[0]() - } - if len(callbacks) > 1 { - panic("just one callback per By, please") - } -} - -//Measure blocks run the passed in body function repeatedly (determined by the samples argument) -//and accumulate metrics provided to the Benchmarker by the body function. -// -//The body function must have the signature: -// func(b Benchmarker) -func Measure(text string, body interface{}, samples int) bool { - globalSuite.PushMeasureNode(text, body, types.FlagTypeNone, codelocation.New(1), samples) - return true -} - -//You can focus individual Measures using FMeasure -func FMeasure(text string, body interface{}, samples int) bool { - globalSuite.PushMeasureNode(text, body, types.FlagTypeFocused, codelocation.New(1), samples) - return true -} - -//You can mark Maeasurements as pending using PMeasure -func PMeasure(text string, _ ...interface{}) bool { - globalSuite.PushMeasureNode(text, func(b Benchmarker) {}, types.FlagTypePending, codelocation.New(1), 0) - return true -} - -//You can mark Maeasurements as pending using XMeasure -func XMeasure(text string, _ ...interface{}) bool { - globalSuite.PushMeasureNode(text, func(b Benchmarker) {}, types.FlagTypePending, codelocation.New(1), 0) - return true -} - -//BeforeSuite blocks are run just once before any specs are run. When running in parallel, each -//parallel node process will call BeforeSuite. -// -//BeforeSuite blocks can be made asynchronous by providing a body function that accepts a Done channel -// -//You may only register *one* BeforeSuite handler per test suite. You typically do so in your bootstrap file at the top level. -func BeforeSuite(body interface{}, timeout ...float64) bool { - globalSuite.SetBeforeSuiteNode(body, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//AfterSuite blocks are *always* run after all the specs regardless of whether specs have passed or failed. -//Moreover, if Ginkgo receives an interrupt signal (^C) it will attempt to run the AfterSuite before exiting. -// -//When running in parallel, each parallel node process will call AfterSuite. -// -//AfterSuite blocks can be made asynchronous by providing a body function that accepts a Done channel -// -//You may only register *one* AfterSuite handler per test suite. You typically do so in your bootstrap file at the top level. -func AfterSuite(body interface{}, timeout ...float64) bool { - globalSuite.SetAfterSuiteNode(body, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//SynchronizedBeforeSuite blocks are primarily meant to solve the problem of setting up singleton external resources shared across -//nodes when running tests in parallel. For example, say you have a shared database that you can only start one instance of that -//must be used in your tests. When running in parallel, only one node should set up the database and all other nodes should wait -//until that node is done before running. -// -//SynchronizedBeforeSuite accomplishes this by taking *two* function arguments. The first is only run on parallel node #1. The second is -//run on all nodes, but *only* after the first function completes succesfully. Ginkgo also makes it possible to send data from the first function (on Node 1) -//to the second function (on all the other nodes). -// -//The functions have the following signatures. The first function (which only runs on node 1) has the signature: -// -// func() []byte -// -//or, to run asynchronously: -// -// func(done Done) []byte -// -//The byte array returned by the first function is then passed to the second function, which has the signature: -// -// func(data []byte) -// -//or, to run asynchronously: -// -// func(data []byte, done Done) -// -//Here's a simple pseudo-code example that starts a shared database on Node 1 and shares the database's address with the other nodes: -// -// var dbClient db.Client -// var dbRunner db.Runner -// -// var _ = SynchronizedBeforeSuite(func() []byte { -// dbRunner = db.NewRunner() -// err := dbRunner.Start() -// Ω(err).ShouldNot(HaveOccurred()) -// return []byte(dbRunner.URL) -// }, func(data []byte) { -// dbClient = db.NewClient() -// err := dbClient.Connect(string(data)) -// Ω(err).ShouldNot(HaveOccurred()) -// }) -func SynchronizedBeforeSuite(node1Body interface{}, allNodesBody interface{}, timeout ...float64) bool { - globalSuite.SetSynchronizedBeforeSuiteNode( - node1Body, - allNodesBody, - codelocation.New(1), - parseTimeout(timeout...), - ) - return true -} - -//SynchronizedAfterSuite blocks complement the SynchronizedBeforeSuite blocks in solving the problem of setting up -//external singleton resources shared across nodes when running tests in parallel. -// -//SynchronizedAfterSuite accomplishes this by taking *two* function arguments. The first runs on all nodes. The second runs only on parallel node #1 -//and *only* after all other nodes have finished and exited. This ensures that node 1, and any resources it is running, remain alive until -//all other nodes are finished. -// -//Both functions have the same signature: either func() or func(done Done) to run asynchronously. -// -//Here's a pseudo-code example that complements that given in SynchronizedBeforeSuite. Here, SynchronizedAfterSuite is used to tear down the shared database -//only after all nodes have finished: -// -// var _ = SynchronizedAfterSuite(func() { -// dbClient.Cleanup() -// }, func() { -// dbRunner.Stop() -// }) -func SynchronizedAfterSuite(allNodesBody interface{}, node1Body interface{}, timeout ...float64) bool { - globalSuite.SetSynchronizedAfterSuiteNode( - allNodesBody, - node1Body, - codelocation.New(1), - parseTimeout(timeout...), - ) - return true -} - -//BeforeEach blocks are run before It blocks. When multiple BeforeEach blocks are defined in nested -//Describe and Context blocks the outermost BeforeEach blocks are run first. -// -//Like It blocks, BeforeEach blocks can be made asynchronous by providing a body function that accepts -//a Done channel -func BeforeEach(body interface{}, timeout ...float64) bool { - globalSuite.PushBeforeEachNode(body, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//JustBeforeEach blocks are run before It blocks but *after* all BeforeEach blocks. For more details, -//read the [documentation](http://onsi.github.io/ginkgo/#separating_creation_and_configuration_) -// -//Like It blocks, BeforeEach blocks can be made asynchronous by providing a body function that accepts -//a Done channel -func JustBeforeEach(body interface{}, timeout ...float64) bool { - globalSuite.PushJustBeforeEachNode(body, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -//AfterEach blocks are run after It blocks. When multiple AfterEach blocks are defined in nested -//Describe and Context blocks the innermost AfterEach blocks are run first. -// -//Like It blocks, AfterEach blocks can be made asynchronous by providing a body function that accepts -//a Done channel -func AfterEach(body interface{}, timeout ...float64) bool { - globalSuite.PushAfterEachNode(body, codelocation.New(1), parseTimeout(timeout...)) - return true -} - -func parseTimeout(timeout ...float64) time.Duration { - if len(timeout) == 0 { - return time.Duration(defaultTimeout * int64(time.Second)) - } else { - return time.Duration(timeout[0] * float64(time.Second)) - } -} diff --git a/vendor/github.com/onsi/ginkgo/integration/integration.go b/vendor/github.com/onsi/ginkgo/integration/integration.go deleted file mode 100644 index 76ab1b728..000000000 --- a/vendor/github.com/onsi/ginkgo/integration/integration.go +++ /dev/null @@ -1 +0,0 @@ -package integration diff --git a/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go b/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go deleted file mode 100644 index fa2f0bf73..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/codelocation/code_location.go +++ /dev/null @@ -1,32 +0,0 @@ -package codelocation - -import ( - "regexp" - "runtime" - "runtime/debug" - "strings" - - "github.com/onsi/ginkgo/types" -) - -func New(skip int) types.CodeLocation { - _, file, line, _ := runtime.Caller(skip + 1) - stackTrace := PruneStack(string(debug.Stack()), skip) - return types.CodeLocation{FileName: file, LineNumber: line, FullStackTrace: stackTrace} -} - -func PruneStack(fullStackTrace string, skip int) string { - stack := strings.Split(fullStackTrace, "\n") - if len(stack) > 2*(skip+1) { - stack = stack[2*(skip+1):] - } - prunedStack := []string{} - re := regexp.MustCompile(`\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`) - for i := 0; i < len(stack)/2; i++ { - if !re.Match([]byte(stack[i*2])) { - prunedStack = append(prunedStack, stack[i*2]) - prunedStack = append(prunedStack, stack[i*2+1]) - } - } - return strings.Join(prunedStack, "\n") -} diff --git a/vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go b/vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go deleted file mode 100644 index 0737746dc..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/containernode/container_node.go +++ /dev/null @@ -1,151 +0,0 @@ -package containernode - -import ( - "math/rand" - "sort" - - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/types" -) - -type subjectOrContainerNode struct { - containerNode *ContainerNode - subjectNode leafnodes.SubjectNode -} - -func (n subjectOrContainerNode) text() string { - if n.containerNode != nil { - return n.containerNode.Text() - } else { - return n.subjectNode.Text() - } -} - -type CollatedNodes struct { - Containers []*ContainerNode - Subject leafnodes.SubjectNode -} - -type ContainerNode struct { - text string - flag types.FlagType - codeLocation types.CodeLocation - - setupNodes []leafnodes.BasicNode - subjectAndContainerNodes []subjectOrContainerNode -} - -func New(text string, flag types.FlagType, codeLocation types.CodeLocation) *ContainerNode { - return &ContainerNode{ - text: text, - flag: flag, - codeLocation: codeLocation, - } -} - -func (container *ContainerNode) Shuffle(r *rand.Rand) { - sort.Sort(container) - permutation := r.Perm(len(container.subjectAndContainerNodes)) - shuffledNodes := make([]subjectOrContainerNode, len(container.subjectAndContainerNodes)) - for i, j := range permutation { - shuffledNodes[i] = container.subjectAndContainerNodes[j] - } - container.subjectAndContainerNodes = shuffledNodes -} - -func (node *ContainerNode) BackPropagateProgrammaticFocus() bool { - if node.flag == types.FlagTypePending { - return false - } - - shouldUnfocus := false - for _, subjectOrContainerNode := range node.subjectAndContainerNodes { - if subjectOrContainerNode.containerNode != nil { - shouldUnfocus = subjectOrContainerNode.containerNode.BackPropagateProgrammaticFocus() || shouldUnfocus - } else { - shouldUnfocus = (subjectOrContainerNode.subjectNode.Flag() == types.FlagTypeFocused) || shouldUnfocus - } - } - - if shouldUnfocus { - if node.flag == types.FlagTypeFocused { - node.flag = types.FlagTypeNone - } - return true - } - - return node.flag == types.FlagTypeFocused -} - -func (node *ContainerNode) Collate() []CollatedNodes { - return node.collate([]*ContainerNode{}) -} - -func (node *ContainerNode) collate(enclosingContainers []*ContainerNode) []CollatedNodes { - collated := make([]CollatedNodes, 0) - - containers := make([]*ContainerNode, len(enclosingContainers)) - copy(containers, enclosingContainers) - containers = append(containers, node) - - for _, subjectOrContainer := range node.subjectAndContainerNodes { - if subjectOrContainer.containerNode != nil { - collated = append(collated, subjectOrContainer.containerNode.collate(containers)...) - } else { - collated = append(collated, CollatedNodes{ - Containers: containers, - Subject: subjectOrContainer.subjectNode, - }) - } - } - - return collated -} - -func (node *ContainerNode) PushContainerNode(container *ContainerNode) { - node.subjectAndContainerNodes = append(node.subjectAndContainerNodes, subjectOrContainerNode{containerNode: container}) -} - -func (node *ContainerNode) PushSubjectNode(subject leafnodes.SubjectNode) { - node.subjectAndContainerNodes = append(node.subjectAndContainerNodes, subjectOrContainerNode{subjectNode: subject}) -} - -func (node *ContainerNode) PushSetupNode(setupNode leafnodes.BasicNode) { - node.setupNodes = append(node.setupNodes, setupNode) -} - -func (node *ContainerNode) SetupNodesOfType(nodeType types.SpecComponentType) []leafnodes.BasicNode { - nodes := []leafnodes.BasicNode{} - for _, setupNode := range node.setupNodes { - if setupNode.Type() == nodeType { - nodes = append(nodes, setupNode) - } - } - return nodes -} - -func (node *ContainerNode) Text() string { - return node.text -} - -func (node *ContainerNode) CodeLocation() types.CodeLocation { - return node.codeLocation -} - -func (node *ContainerNode) Flag() types.FlagType { - return node.flag -} - -//sort.Interface - -func (node *ContainerNode) Len() int { - return len(node.subjectAndContainerNodes) -} - -func (node *ContainerNode) Less(i, j int) bool { - return node.subjectAndContainerNodes[i].text() < node.subjectAndContainerNodes[j].text() -} - -func (node *ContainerNode) Swap(i, j int) { - node.subjectAndContainerNodes[i], node.subjectAndContainerNodes[j] = node.subjectAndContainerNodes[j], node.subjectAndContainerNodes[i] -} diff --git a/vendor/github.com/onsi/ginkgo/internal/failer/failer.go b/vendor/github.com/onsi/ginkgo/internal/failer/failer.go deleted file mode 100644 index 678ea2514..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/failer/failer.go +++ /dev/null @@ -1,92 +0,0 @@ -package failer - -import ( - "fmt" - "sync" - - "github.com/onsi/ginkgo/types" -) - -type Failer struct { - lock *sync.Mutex - failure types.SpecFailure - state types.SpecState -} - -func New() *Failer { - return &Failer{ - lock: &sync.Mutex{}, - state: types.SpecStatePassed, - } -} - -func (f *Failer) Panic(location types.CodeLocation, forwardedPanic interface{}) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.state == types.SpecStatePassed { - f.state = types.SpecStatePanicked - f.failure = types.SpecFailure{ - Message: "Test Panicked", - Location: location, - ForwardedPanic: fmt.Sprintf("%v", forwardedPanic), - } - } -} - -func (f *Failer) Timeout(location types.CodeLocation) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.state == types.SpecStatePassed { - f.state = types.SpecStateTimedOut - f.failure = types.SpecFailure{ - Message: "Timed out", - Location: location, - } - } -} - -func (f *Failer) Fail(message string, location types.CodeLocation) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.state == types.SpecStatePassed { - f.state = types.SpecStateFailed - f.failure = types.SpecFailure{ - Message: message, - Location: location, - } - } -} - -func (f *Failer) Drain(componentType types.SpecComponentType, componentIndex int, componentCodeLocation types.CodeLocation) (types.SpecFailure, types.SpecState) { - f.lock.Lock() - defer f.lock.Unlock() - - failure := f.failure - outcome := f.state - if outcome != types.SpecStatePassed { - failure.ComponentType = componentType - failure.ComponentIndex = componentIndex - failure.ComponentCodeLocation = componentCodeLocation - } - - f.state = types.SpecStatePassed - f.failure = types.SpecFailure{} - - return failure, outcome -} - -func (f *Failer) Skip(message string, location types.CodeLocation) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.state == types.SpecStatePassed { - f.state = types.SpecStateSkipped - f.failure = types.SpecFailure{ - Message: message, - Location: location, - } - } -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go deleted file mode 100644 index d6d54234c..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/benchmarker.go +++ /dev/null @@ -1,103 +0,0 @@ -package leafnodes - -import ( - "math" - "time" - - "sync" - - "github.com/onsi/ginkgo/types" -) - -type benchmarker struct { - mu sync.Mutex - measurements map[string]*types.SpecMeasurement - orderCounter int -} - -func newBenchmarker() *benchmarker { - return &benchmarker{ - measurements: make(map[string]*types.SpecMeasurement, 0), - } -} - -func (b *benchmarker) Time(name string, body func(), info ...interface{}) (elapsedTime time.Duration) { - t := time.Now() - body() - elapsedTime = time.Since(t) - - b.mu.Lock() - defer b.mu.Unlock() - measurement := b.getMeasurement(name, "Fastest Time", "Slowest Time", "Average Time", "s", 3, info...) - measurement.Results = append(measurement.Results, elapsedTime.Seconds()) - - return -} - -func (b *benchmarker) RecordValue(name string, value float64, info ...interface{}) { - b.mu.Lock() - measurement := b.getMeasurement(name, "Smallest", " Largest", " Average", "", 3, info...) - defer b.mu.Unlock() - measurement.Results = append(measurement.Results, value) -} - -func (b *benchmarker) RecordValueWithPrecision(name string, value float64, units string, precision int, info ...interface{}) { - b.mu.Lock() - measurement := b.getMeasurement(name, "Smallest", " Largest", " Average", units, precision, info...) - defer b.mu.Unlock() - measurement.Results = append(measurement.Results, value) -} - -func (b *benchmarker) getMeasurement(name string, smallestLabel string, largestLabel string, averageLabel string, units string, precision int, info ...interface{}) *types.SpecMeasurement { - measurement, ok := b.measurements[name] - if !ok { - var computedInfo interface{} - computedInfo = nil - if len(info) > 0 { - computedInfo = info[0] - } - measurement = &types.SpecMeasurement{ - Name: name, - Info: computedInfo, - Order: b.orderCounter, - SmallestLabel: smallestLabel, - LargestLabel: largestLabel, - AverageLabel: averageLabel, - Units: units, - Precision: precision, - Results: make([]float64, 0), - } - b.measurements[name] = measurement - b.orderCounter++ - } - - return measurement -} - -func (b *benchmarker) measurementsReport() map[string]*types.SpecMeasurement { - b.mu.Lock() - defer b.mu.Unlock() - for _, measurement := range b.measurements { - measurement.Smallest = math.MaxFloat64 - measurement.Largest = -math.MaxFloat64 - sum := float64(0) - sumOfSquares := float64(0) - - for _, result := range measurement.Results { - if result > measurement.Largest { - measurement.Largest = result - } - if result < measurement.Smallest { - measurement.Smallest = result - } - sum += result - sumOfSquares += result * result - } - - n := float64(len(measurement.Results)) - measurement.Average = sum / n - measurement.StdDeviation = math.Sqrt(sumOfSquares/n - (sum/n)*(sum/n)) - } - - return b.measurements -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go deleted file mode 100644 index 8c3902d60..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/interfaces.go +++ /dev/null @@ -1,19 +0,0 @@ -package leafnodes - -import ( - "github.com/onsi/ginkgo/types" -) - -type BasicNode interface { - Type() types.SpecComponentType - Run() (types.SpecState, types.SpecFailure) - CodeLocation() types.CodeLocation -} - -type SubjectNode interface { - BasicNode - - Text() string - Flag() types.FlagType - Samples() int -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go deleted file mode 100644 index 6eded7b76..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/it_node.go +++ /dev/null @@ -1,47 +0,0 @@ -package leafnodes - -import ( - "time" - - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type ItNode struct { - runner *runner - - flag types.FlagType - text string -} - -func NewItNode(text string, body interface{}, flag types.FlagType, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *ItNode { - return &ItNode{ - runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeIt, componentIndex), - flag: flag, - text: text, - } -} - -func (node *ItNode) Run() (outcome types.SpecState, failure types.SpecFailure) { - return node.runner.run() -} - -func (node *ItNode) Type() types.SpecComponentType { - return types.SpecComponentTypeIt -} - -func (node *ItNode) Text() string { - return node.text -} - -func (node *ItNode) Flag() types.FlagType { - return node.flag -} - -func (node *ItNode) CodeLocation() types.CodeLocation { - return node.runner.codeLocation -} - -func (node *ItNode) Samples() int { - return 1 -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go deleted file mode 100644 index 3ab9a6d55..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/measure_node.go +++ /dev/null @@ -1,62 +0,0 @@ -package leafnodes - -import ( - "reflect" - - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type MeasureNode struct { - runner *runner - - text string - flag types.FlagType - samples int - benchmarker *benchmarker -} - -func NewMeasureNode(text string, body interface{}, flag types.FlagType, codeLocation types.CodeLocation, samples int, failer *failer.Failer, componentIndex int) *MeasureNode { - benchmarker := newBenchmarker() - - wrappedBody := func() { - reflect.ValueOf(body).Call([]reflect.Value{reflect.ValueOf(benchmarker)}) - } - - return &MeasureNode{ - runner: newRunner(wrappedBody, codeLocation, 0, failer, types.SpecComponentTypeMeasure, componentIndex), - - text: text, - flag: flag, - samples: samples, - benchmarker: benchmarker, - } -} - -func (node *MeasureNode) Run() (outcome types.SpecState, failure types.SpecFailure) { - return node.runner.run() -} - -func (node *MeasureNode) MeasurementsReport() map[string]*types.SpecMeasurement { - return node.benchmarker.measurementsReport() -} - -func (node *MeasureNode) Type() types.SpecComponentType { - return types.SpecComponentTypeMeasure -} - -func (node *MeasureNode) Text() string { - return node.text -} - -func (node *MeasureNode) Flag() types.FlagType { - return node.flag -} - -func (node *MeasureNode) CodeLocation() types.CodeLocation { - return node.runner.codeLocation -} - -func (node *MeasureNode) Samples() int { - return node.samples -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go deleted file mode 100644 index 8b6518b5c..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/runner.go +++ /dev/null @@ -1,114 +0,0 @@ -package leafnodes - -import ( - "fmt" - "reflect" - "time" - - "github.com/onsi/ginkgo/internal/codelocation" - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type runner struct { - isAsync bool - asyncFunc func(chan<- interface{}) - syncFunc func() - codeLocation types.CodeLocation - timeoutThreshold time.Duration - nodeType types.SpecComponentType - componentIndex int - failer *failer.Failer -} - -func newRunner(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, nodeType types.SpecComponentType, componentIndex int) *runner { - bodyType := reflect.TypeOf(body) - if bodyType.Kind() != reflect.Func { - panic(fmt.Sprintf("Expected a function but got something else at %v", codeLocation)) - } - - runner := &runner{ - codeLocation: codeLocation, - timeoutThreshold: timeout, - failer: failer, - nodeType: nodeType, - componentIndex: componentIndex, - } - - switch bodyType.NumIn() { - case 0: - runner.syncFunc = body.(func()) - return runner - case 1: - if !(bodyType.In(0).Kind() == reflect.Chan && bodyType.In(0).Elem().Kind() == reflect.Interface) { - panic(fmt.Sprintf("Must pass a Done channel to function at %v", codeLocation)) - } - - wrappedBody := func(done chan<- interface{}) { - bodyValue := reflect.ValueOf(body) - bodyValue.Call([]reflect.Value{reflect.ValueOf(done)}) - } - - runner.isAsync = true - runner.asyncFunc = wrappedBody - return runner - } - - panic(fmt.Sprintf("Too many arguments to function at %v", codeLocation)) -} - -func (r *runner) run() (outcome types.SpecState, failure types.SpecFailure) { - if r.isAsync { - return r.runAsync() - } else { - return r.runSync() - } -} - -func (r *runner) runAsync() (outcome types.SpecState, failure types.SpecFailure) { - done := make(chan interface{}, 1) - - go func() { - finished := false - - defer func() { - if e := recover(); e != nil || !finished { - r.failer.Panic(codelocation.New(2), e) - select { - case <-done: - break - default: - close(done) - } - } - }() - - r.asyncFunc(done) - finished = true - }() - - select { - case <-done: - case <-time.After(r.timeoutThreshold): - r.failer.Timeout(r.codeLocation) - } - - failure, outcome = r.failer.Drain(r.nodeType, r.componentIndex, r.codeLocation) - return -} -func (r *runner) runSync() (outcome types.SpecState, failure types.SpecFailure) { - finished := false - - defer func() { - if e := recover(); e != nil || !finished { - r.failer.Panic(codelocation.New(2), e) - } - - failure, outcome = r.failer.Drain(r.nodeType, r.componentIndex, r.codeLocation) - }() - - r.syncFunc() - finished = true - - return -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go deleted file mode 100644 index b4654cd29..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/setup_nodes.go +++ /dev/null @@ -1,42 +0,0 @@ -package leafnodes - -import ( - "time" - - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type SetupNode struct { - runner *runner -} - -func (node *SetupNode) Run() (outcome types.SpecState, failure types.SpecFailure) { - return node.runner.run() -} - -func (node *SetupNode) Type() types.SpecComponentType { - return node.runner.nodeType -} - -func (node *SetupNode) CodeLocation() types.CodeLocation { - return node.runner.codeLocation -} - -func NewBeforeEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode { - return &SetupNode{ - runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeBeforeEach, componentIndex), - } -} - -func NewAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode { - return &SetupNode{ - runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeAfterEach, componentIndex), - } -} - -func NewJustBeforeEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer, componentIndex int) *SetupNode { - return &SetupNode{ - runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeJustBeforeEach, componentIndex), - } -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go deleted file mode 100644 index 80f16ed78..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/suite_nodes.go +++ /dev/null @@ -1,55 +0,0 @@ -package leafnodes - -import ( - "time" - - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type SuiteNode interface { - Run(parallelNode int, parallelTotal int, syncHost string) bool - Passed() bool - Summary() *types.SetupSummary -} - -type simpleSuiteNode struct { - runner *runner - outcome types.SpecState - failure types.SpecFailure - runTime time.Duration -} - -func (node *simpleSuiteNode) Run(parallelNode int, parallelTotal int, syncHost string) bool { - t := time.Now() - node.outcome, node.failure = node.runner.run() - node.runTime = time.Since(t) - - return node.outcome == types.SpecStatePassed -} - -func (node *simpleSuiteNode) Passed() bool { - return node.outcome == types.SpecStatePassed -} - -func (node *simpleSuiteNode) Summary() *types.SetupSummary { - return &types.SetupSummary{ - ComponentType: node.runner.nodeType, - CodeLocation: node.runner.codeLocation, - State: node.outcome, - RunTime: node.runTime, - Failure: node.failure, - } -} - -func NewBeforeSuiteNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer) SuiteNode { - return &simpleSuiteNode{ - runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeBeforeSuite, 0), - } -} - -func NewAfterSuiteNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer) SuiteNode { - return &simpleSuiteNode{ - runner: newRunner(body, codeLocation, timeout, failer, types.SpecComponentTypeAfterSuite, 0), - } -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go deleted file mode 100644 index a721d0cf7..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_after_suite_node.go +++ /dev/null @@ -1,90 +0,0 @@ -package leafnodes - -import ( - "encoding/json" - "io/ioutil" - "net/http" - "time" - - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type synchronizedAfterSuiteNode struct { - runnerA *runner - runnerB *runner - - outcome types.SpecState - failure types.SpecFailure - runTime time.Duration -} - -func NewSynchronizedAfterSuiteNode(bodyA interface{}, bodyB interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer) SuiteNode { - return &synchronizedAfterSuiteNode{ - runnerA: newRunner(bodyA, codeLocation, timeout, failer, types.SpecComponentTypeAfterSuite, 0), - runnerB: newRunner(bodyB, codeLocation, timeout, failer, types.SpecComponentTypeAfterSuite, 0), - } -} - -func (node *synchronizedAfterSuiteNode) Run(parallelNode int, parallelTotal int, syncHost string) bool { - node.outcome, node.failure = node.runnerA.run() - - if parallelNode == 1 { - if parallelTotal > 1 { - node.waitUntilOtherNodesAreDone(syncHost) - } - - outcome, failure := node.runnerB.run() - - if node.outcome == types.SpecStatePassed { - node.outcome, node.failure = outcome, failure - } - } - - return node.outcome == types.SpecStatePassed -} - -func (node *synchronizedAfterSuiteNode) Passed() bool { - return node.outcome == types.SpecStatePassed -} - -func (node *synchronizedAfterSuiteNode) Summary() *types.SetupSummary { - return &types.SetupSummary{ - ComponentType: node.runnerA.nodeType, - CodeLocation: node.runnerA.codeLocation, - State: node.outcome, - RunTime: node.runTime, - Failure: node.failure, - } -} - -func (node *synchronizedAfterSuiteNode) waitUntilOtherNodesAreDone(syncHost string) { - for { - if node.canRun(syncHost) { - return - } - - time.Sleep(50 * time.Millisecond) - } -} - -func (node *synchronizedAfterSuiteNode) canRun(syncHost string) bool { - resp, err := http.Get(syncHost + "/RemoteAfterSuiteData") - if err != nil || resp.StatusCode != http.StatusOK { - return false - } - - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return false - } - resp.Body.Close() - - afterSuiteData := types.RemoteAfterSuiteData{} - err = json.Unmarshal(body, &afterSuiteData) - if err != nil { - return false - } - - return afterSuiteData.CanRun -} diff --git a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go b/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go deleted file mode 100644 index d5c889319..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/leafnodes/synchronized_before_suite_node.go +++ /dev/null @@ -1,181 +0,0 @@ -package leafnodes - -import ( - "bytes" - "encoding/json" - "io/ioutil" - "net/http" - "reflect" - "time" - - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/types" -) - -type synchronizedBeforeSuiteNode struct { - runnerA *runner - runnerB *runner - - data []byte - - outcome types.SpecState - failure types.SpecFailure - runTime time.Duration -} - -func NewSynchronizedBeforeSuiteNode(bodyA interface{}, bodyB interface{}, codeLocation types.CodeLocation, timeout time.Duration, failer *failer.Failer) SuiteNode { - node := &synchronizedBeforeSuiteNode{} - - node.runnerA = newRunner(node.wrapA(bodyA), codeLocation, timeout, failer, types.SpecComponentTypeBeforeSuite, 0) - node.runnerB = newRunner(node.wrapB(bodyB), codeLocation, timeout, failer, types.SpecComponentTypeBeforeSuite, 0) - - return node -} - -func (node *synchronizedBeforeSuiteNode) Run(parallelNode int, parallelTotal int, syncHost string) bool { - t := time.Now() - defer func() { - node.runTime = time.Since(t) - }() - - if parallelNode == 1 { - node.outcome, node.failure = node.runA(parallelTotal, syncHost) - } else { - node.outcome, node.failure = node.waitForA(syncHost) - } - - if node.outcome != types.SpecStatePassed { - return false - } - node.outcome, node.failure = node.runnerB.run() - - return node.outcome == types.SpecStatePassed -} - -func (node *synchronizedBeforeSuiteNode) runA(parallelTotal int, syncHost string) (types.SpecState, types.SpecFailure) { - outcome, failure := node.runnerA.run() - - if parallelTotal > 1 { - state := types.RemoteBeforeSuiteStatePassed - if outcome != types.SpecStatePassed { - state = types.RemoteBeforeSuiteStateFailed - } - json := (types.RemoteBeforeSuiteData{ - Data: node.data, - State: state, - }).ToJSON() - http.Post(syncHost+"/BeforeSuiteState", "application/json", bytes.NewBuffer(json)) - } - - return outcome, failure -} - -func (node *synchronizedBeforeSuiteNode) waitForA(syncHost string) (types.SpecState, types.SpecFailure) { - failure := func(message string) types.SpecFailure { - return types.SpecFailure{ - Message: message, - Location: node.runnerA.codeLocation, - ComponentType: node.runnerA.nodeType, - ComponentIndex: node.runnerA.componentIndex, - ComponentCodeLocation: node.runnerA.codeLocation, - } - } - for { - resp, err := http.Get(syncHost + "/BeforeSuiteState") - if err != nil || resp.StatusCode != http.StatusOK { - return types.SpecStateFailed, failure("Failed to fetch BeforeSuite state") - } - - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return types.SpecStateFailed, failure("Failed to read BeforeSuite state") - } - resp.Body.Close() - - beforeSuiteData := types.RemoteBeforeSuiteData{} - err = json.Unmarshal(body, &beforeSuiteData) - if err != nil { - return types.SpecStateFailed, failure("Failed to decode BeforeSuite state") - } - - switch beforeSuiteData.State { - case types.RemoteBeforeSuiteStatePassed: - node.data = beforeSuiteData.Data - return types.SpecStatePassed, types.SpecFailure{} - case types.RemoteBeforeSuiteStateFailed: - return types.SpecStateFailed, failure("BeforeSuite on Node 1 failed") - case types.RemoteBeforeSuiteStateDisappeared: - return types.SpecStateFailed, failure("Node 1 disappeared before completing BeforeSuite") - } - - time.Sleep(50 * time.Millisecond) - } -} - -func (node *synchronizedBeforeSuiteNode) Passed() bool { - return node.outcome == types.SpecStatePassed -} - -func (node *synchronizedBeforeSuiteNode) Summary() *types.SetupSummary { - return &types.SetupSummary{ - ComponentType: node.runnerA.nodeType, - CodeLocation: node.runnerA.codeLocation, - State: node.outcome, - RunTime: node.runTime, - Failure: node.failure, - } -} - -func (node *synchronizedBeforeSuiteNode) wrapA(bodyA interface{}) interface{} { - typeA := reflect.TypeOf(bodyA) - if typeA.Kind() != reflect.Func { - panic("SynchronizedBeforeSuite expects a function as its first argument") - } - - takesNothing := typeA.NumIn() == 0 - takesADoneChannel := typeA.NumIn() == 1 && typeA.In(0).Kind() == reflect.Chan && typeA.In(0).Elem().Kind() == reflect.Interface - returnsBytes := typeA.NumOut() == 1 && typeA.Out(0).Kind() == reflect.Slice && typeA.Out(0).Elem().Kind() == reflect.Uint8 - - if !((takesNothing || takesADoneChannel) && returnsBytes) { - panic("SynchronizedBeforeSuite's first argument should be a function that returns []byte and either takes no arguments or takes a Done channel.") - } - - if takesADoneChannel { - return func(done chan<- interface{}) { - out := reflect.ValueOf(bodyA).Call([]reflect.Value{reflect.ValueOf(done)}) - node.data = out[0].Interface().([]byte) - } - } - - return func() { - out := reflect.ValueOf(bodyA).Call([]reflect.Value{}) - node.data = out[0].Interface().([]byte) - } -} - -func (node *synchronizedBeforeSuiteNode) wrapB(bodyB interface{}) interface{} { - typeB := reflect.TypeOf(bodyB) - if typeB.Kind() != reflect.Func { - panic("SynchronizedBeforeSuite expects a function as its second argument") - } - - returnsNothing := typeB.NumOut() == 0 - takesBytesOnly := typeB.NumIn() == 1 && typeB.In(0).Kind() == reflect.Slice && typeB.In(0).Elem().Kind() == reflect.Uint8 - takesBytesAndDone := typeB.NumIn() == 2 && - typeB.In(0).Kind() == reflect.Slice && typeB.In(0).Elem().Kind() == reflect.Uint8 && - typeB.In(1).Kind() == reflect.Chan && typeB.In(1).Elem().Kind() == reflect.Interface - - if !((takesBytesOnly || takesBytesAndDone) && returnsNothing) { - panic("SynchronizedBeforeSuite's second argument should be a function that returns nothing and either takes []byte or ([]byte, Done)") - } - - if takesBytesAndDone { - return func(done chan<- interface{}) { - reflect.ValueOf(bodyB).Call([]reflect.Value{reflect.ValueOf(node.data), reflect.ValueOf(done)}) - } - } - - return func() { - reflect.ValueOf(bodyB).Call([]reflect.Value{reflect.ValueOf(node.data)}) - } -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go b/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go deleted file mode 100644 index 6b54afe01..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/aggregator.go +++ /dev/null @@ -1,249 +0,0 @@ -/* - -Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output -coherently as tests complete. You shouldn't need to use this in your code. To run tests in parallel: - - ginkgo -nodes=N - -where N is the number of nodes you desire. -*/ -package remote - -import ( - "time" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters/stenographer" - "github.com/onsi/ginkgo/types" -) - -type configAndSuite struct { - config config.GinkgoConfigType - summary *types.SuiteSummary -} - -type Aggregator struct { - nodeCount int - config config.DefaultReporterConfigType - stenographer stenographer.Stenographer - result chan bool - - suiteBeginnings chan configAndSuite - aggregatedSuiteBeginnings []configAndSuite - - beforeSuites chan *types.SetupSummary - aggregatedBeforeSuites []*types.SetupSummary - - afterSuites chan *types.SetupSummary - aggregatedAfterSuites []*types.SetupSummary - - specCompletions chan *types.SpecSummary - completedSpecs []*types.SpecSummary - - suiteEndings chan *types.SuiteSummary - aggregatedSuiteEndings []*types.SuiteSummary - specs []*types.SpecSummary - - startTime time.Time -} - -func NewAggregator(nodeCount int, result chan bool, config config.DefaultReporterConfigType, stenographer stenographer.Stenographer) *Aggregator { - aggregator := &Aggregator{ - nodeCount: nodeCount, - result: result, - config: config, - stenographer: stenographer, - - suiteBeginnings: make(chan configAndSuite, 0), - beforeSuites: make(chan *types.SetupSummary, 0), - afterSuites: make(chan *types.SetupSummary, 0), - specCompletions: make(chan *types.SpecSummary, 0), - suiteEndings: make(chan *types.SuiteSummary, 0), - } - - go aggregator.mux() - - return aggregator -} - -func (aggregator *Aggregator) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { - aggregator.suiteBeginnings <- configAndSuite{config, summary} -} - -func (aggregator *Aggregator) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { - aggregator.beforeSuites <- setupSummary -} - -func (aggregator *Aggregator) AfterSuiteDidRun(setupSummary *types.SetupSummary) { - aggregator.afterSuites <- setupSummary -} - -func (aggregator *Aggregator) SpecWillRun(specSummary *types.SpecSummary) { - //noop -} - -func (aggregator *Aggregator) SpecDidComplete(specSummary *types.SpecSummary) { - aggregator.specCompletions <- specSummary -} - -func (aggregator *Aggregator) SpecSuiteDidEnd(summary *types.SuiteSummary) { - aggregator.suiteEndings <- summary -} - -func (aggregator *Aggregator) mux() { -loop: - for { - select { - case configAndSuite := <-aggregator.suiteBeginnings: - aggregator.registerSuiteBeginning(configAndSuite) - case setupSummary := <-aggregator.beforeSuites: - aggregator.registerBeforeSuite(setupSummary) - case setupSummary := <-aggregator.afterSuites: - aggregator.registerAfterSuite(setupSummary) - case specSummary := <-aggregator.specCompletions: - aggregator.registerSpecCompletion(specSummary) - case suite := <-aggregator.suiteEndings: - finished, passed := aggregator.registerSuiteEnding(suite) - if finished { - aggregator.result <- passed - break loop - } - } - } -} - -func (aggregator *Aggregator) registerSuiteBeginning(configAndSuite configAndSuite) { - aggregator.aggregatedSuiteBeginnings = append(aggregator.aggregatedSuiteBeginnings, configAndSuite) - - if len(aggregator.aggregatedSuiteBeginnings) == 1 { - aggregator.startTime = time.Now() - } - - if len(aggregator.aggregatedSuiteBeginnings) != aggregator.nodeCount { - return - } - - aggregator.stenographer.AnnounceSuite(configAndSuite.summary.SuiteDescription, configAndSuite.config.RandomSeed, configAndSuite.config.RandomizeAllSpecs, aggregator.config.Succinct) - - totalNumberOfSpecs := 0 - if len(aggregator.aggregatedSuiteBeginnings) > 0 { - totalNumberOfSpecs = configAndSuite.summary.NumberOfSpecsBeforeParallelization - } - - aggregator.stenographer.AnnounceTotalNumberOfSpecs(totalNumberOfSpecs, aggregator.config.Succinct) - aggregator.stenographer.AnnounceAggregatedParallelRun(aggregator.nodeCount, aggregator.config.Succinct) - aggregator.flushCompletedSpecs() -} - -func (aggregator *Aggregator) registerBeforeSuite(setupSummary *types.SetupSummary) { - aggregator.aggregatedBeforeSuites = append(aggregator.aggregatedBeforeSuites, setupSummary) - aggregator.flushCompletedSpecs() -} - -func (aggregator *Aggregator) registerAfterSuite(setupSummary *types.SetupSummary) { - aggregator.aggregatedAfterSuites = append(aggregator.aggregatedAfterSuites, setupSummary) - aggregator.flushCompletedSpecs() -} - -func (aggregator *Aggregator) registerSpecCompletion(specSummary *types.SpecSummary) { - aggregator.completedSpecs = append(aggregator.completedSpecs, specSummary) - aggregator.specs = append(aggregator.specs, specSummary) - aggregator.flushCompletedSpecs() -} - -func (aggregator *Aggregator) flushCompletedSpecs() { - if len(aggregator.aggregatedSuiteBeginnings) != aggregator.nodeCount { - return - } - - for _, setupSummary := range aggregator.aggregatedBeforeSuites { - aggregator.announceBeforeSuite(setupSummary) - } - - for _, specSummary := range aggregator.completedSpecs { - aggregator.announceSpec(specSummary) - } - - for _, setupSummary := range aggregator.aggregatedAfterSuites { - aggregator.announceAfterSuite(setupSummary) - } - - aggregator.aggregatedBeforeSuites = []*types.SetupSummary{} - aggregator.completedSpecs = []*types.SpecSummary{} - aggregator.aggregatedAfterSuites = []*types.SetupSummary{} -} - -func (aggregator *Aggregator) announceBeforeSuite(setupSummary *types.SetupSummary) { - aggregator.stenographer.AnnounceCapturedOutput(setupSummary.CapturedOutput) - if setupSummary.State != types.SpecStatePassed { - aggregator.stenographer.AnnounceBeforeSuiteFailure(setupSummary, aggregator.config.Succinct, aggregator.config.FullTrace) - } -} - -func (aggregator *Aggregator) announceAfterSuite(setupSummary *types.SetupSummary) { - aggregator.stenographer.AnnounceCapturedOutput(setupSummary.CapturedOutput) - if setupSummary.State != types.SpecStatePassed { - aggregator.stenographer.AnnounceAfterSuiteFailure(setupSummary, aggregator.config.Succinct, aggregator.config.FullTrace) - } -} - -func (aggregator *Aggregator) announceSpec(specSummary *types.SpecSummary) { - if aggregator.config.Verbose && specSummary.State != types.SpecStatePending && specSummary.State != types.SpecStateSkipped { - aggregator.stenographer.AnnounceSpecWillRun(specSummary) - } - - aggregator.stenographer.AnnounceCapturedOutput(specSummary.CapturedOutput) - - switch specSummary.State { - case types.SpecStatePassed: - if specSummary.IsMeasurement { - aggregator.stenographer.AnnounceSuccesfulMeasurement(specSummary, aggregator.config.Succinct) - } else if specSummary.RunTime.Seconds() >= aggregator.config.SlowSpecThreshold { - aggregator.stenographer.AnnounceSuccesfulSlowSpec(specSummary, aggregator.config.Succinct) - } else { - aggregator.stenographer.AnnounceSuccesfulSpec(specSummary) - } - - case types.SpecStatePending: - aggregator.stenographer.AnnouncePendingSpec(specSummary, aggregator.config.NoisyPendings && !aggregator.config.Succinct) - case types.SpecStateSkipped: - aggregator.stenographer.AnnounceSkippedSpec(specSummary, aggregator.config.Succinct || !aggregator.config.NoisySkippings, aggregator.config.FullTrace) - case types.SpecStateTimedOut: - aggregator.stenographer.AnnounceSpecTimedOut(specSummary, aggregator.config.Succinct, aggregator.config.FullTrace) - case types.SpecStatePanicked: - aggregator.stenographer.AnnounceSpecPanicked(specSummary, aggregator.config.Succinct, aggregator.config.FullTrace) - case types.SpecStateFailed: - aggregator.stenographer.AnnounceSpecFailed(specSummary, aggregator.config.Succinct, aggregator.config.FullTrace) - } -} - -func (aggregator *Aggregator) registerSuiteEnding(suite *types.SuiteSummary) (finished bool, passed bool) { - aggregator.aggregatedSuiteEndings = append(aggregator.aggregatedSuiteEndings, suite) - if len(aggregator.aggregatedSuiteEndings) < aggregator.nodeCount { - return false, false - } - - aggregatedSuiteSummary := &types.SuiteSummary{} - aggregatedSuiteSummary.SuiteSucceeded = true - - for _, suiteSummary := range aggregator.aggregatedSuiteEndings { - if suiteSummary.SuiteSucceeded == false { - aggregatedSuiteSummary.SuiteSucceeded = false - } - - aggregatedSuiteSummary.NumberOfSpecsThatWillBeRun += suiteSummary.NumberOfSpecsThatWillBeRun - aggregatedSuiteSummary.NumberOfTotalSpecs += suiteSummary.NumberOfTotalSpecs - aggregatedSuiteSummary.NumberOfPassedSpecs += suiteSummary.NumberOfPassedSpecs - aggregatedSuiteSummary.NumberOfFailedSpecs += suiteSummary.NumberOfFailedSpecs - aggregatedSuiteSummary.NumberOfPendingSpecs += suiteSummary.NumberOfPendingSpecs - aggregatedSuiteSummary.NumberOfSkippedSpecs += suiteSummary.NumberOfSkippedSpecs - aggregatedSuiteSummary.NumberOfFlakedSpecs += suiteSummary.NumberOfFlakedSpecs - } - - aggregatedSuiteSummary.RunTime = time.Since(aggregator.startTime) - - aggregator.stenographer.SummarizeFailures(aggregator.specs) - aggregator.stenographer.AnnounceSpecRunCompletion(aggregatedSuiteSummary, aggregator.config.Succinct) - - return true, aggregatedSuiteSummary.SuiteSucceeded -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go b/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go deleted file mode 100644 index 025eb5064..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/forwarding_reporter.go +++ /dev/null @@ -1,90 +0,0 @@ -package remote - -import ( - "bytes" - "encoding/json" - "io" - "net/http" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" -) - -//An interface to net/http's client to allow the injection of fakes under test -type Poster interface { - Post(url string, bodyType string, body io.Reader) (resp *http.Response, err error) -} - -/* -The ForwardingReporter is a Ginkgo reporter that forwards information to -a Ginkgo remote server. - -When streaming parallel test output, this repoter is automatically installed by Ginkgo. - -This is accomplished by passing in the GINKGO_REMOTE_REPORTING_SERVER environment variable to `go test`, the Ginkgo test runner -detects this environment variable (which should contain the host of the server) and automatically installs a ForwardingReporter -in place of Ginkgo's DefaultReporter. -*/ - -type ForwardingReporter struct { - serverHost string - poster Poster - outputInterceptor OutputInterceptor -} - -func NewForwardingReporter(serverHost string, poster Poster, outputInterceptor OutputInterceptor) *ForwardingReporter { - return &ForwardingReporter{ - serverHost: serverHost, - poster: poster, - outputInterceptor: outputInterceptor, - } -} - -func (reporter *ForwardingReporter) post(path string, data interface{}) { - encoded, _ := json.Marshal(data) - buffer := bytes.NewBuffer(encoded) - reporter.poster.Post(reporter.serverHost+path, "application/json", buffer) -} - -func (reporter *ForwardingReporter) SpecSuiteWillBegin(conf config.GinkgoConfigType, summary *types.SuiteSummary) { - data := struct { - Config config.GinkgoConfigType `json:"config"` - Summary *types.SuiteSummary `json:"suite-summary"` - }{ - conf, - summary, - } - - reporter.outputInterceptor.StartInterceptingOutput() - reporter.post("/SpecSuiteWillBegin", data) -} - -func (reporter *ForwardingReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { - output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() - reporter.outputInterceptor.StartInterceptingOutput() - setupSummary.CapturedOutput = output - reporter.post("/BeforeSuiteDidRun", setupSummary) -} - -func (reporter *ForwardingReporter) SpecWillRun(specSummary *types.SpecSummary) { - reporter.post("/SpecWillRun", specSummary) -} - -func (reporter *ForwardingReporter) SpecDidComplete(specSummary *types.SpecSummary) { - output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() - reporter.outputInterceptor.StartInterceptingOutput() - specSummary.CapturedOutput = output - reporter.post("/SpecDidComplete", specSummary) -} - -func (reporter *ForwardingReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { - output, _ := reporter.outputInterceptor.StopInterceptingAndReturnOutput() - reporter.outputInterceptor.StartInterceptingOutput() - setupSummary.CapturedOutput = output - reporter.post("/AfterSuiteDidRun", setupSummary) -} - -func (reporter *ForwardingReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { - reporter.outputInterceptor.StopInterceptingAndReturnOutput() - reporter.post("/SpecSuiteDidEnd", summary) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go deleted file mode 100644 index 093f4513c..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor.go +++ /dev/null @@ -1,10 +0,0 @@ -package remote - -/* -The OutputInterceptor is used by the ForwardingReporter to -intercept and capture all stdin and stderr output during a test run. -*/ -type OutputInterceptor interface { - StartInterceptingOutput() error - StopInterceptingAndReturnOutput() (string, error) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go deleted file mode 100644 index 980065da5..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_unix.go +++ /dev/null @@ -1,55 +0,0 @@ -// +build freebsd openbsd netbsd dragonfly darwin linux solaris - -package remote - -import ( - "errors" - "io/ioutil" - "os" -) - -func NewOutputInterceptor() OutputInterceptor { - return &outputInterceptor{} -} - -type outputInterceptor struct { - redirectFile *os.File - intercepting bool -} - -func (interceptor *outputInterceptor) StartInterceptingOutput() error { - if interceptor.intercepting { - return errors.New("Already intercepting output!") - } - interceptor.intercepting = true - - var err error - - interceptor.redirectFile, err = ioutil.TempFile("", "ginkgo-output") - if err != nil { - return err - } - - // Call a function in ./syscall_dup_*.go - // If building for everything other than linux_arm64, - // use a "normal" syscall.Dup2(oldfd, newfd) call. If building for linux_arm64 (which doesn't have syscall.Dup2) - // call syscall.Dup3(oldfd, newfd, 0). They are nearly identical, see: http://linux.die.net/man/2/dup3 - syscallDup(int(interceptor.redirectFile.Fd()), 1) - syscallDup(int(interceptor.redirectFile.Fd()), 2) - - return nil -} - -func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) { - if !interceptor.intercepting { - return "", errors.New("Not intercepting output!") - } - - interceptor.redirectFile.Close() - output, err := ioutil.ReadFile(interceptor.redirectFile.Name()) - os.Remove(interceptor.redirectFile.Name()) - - interceptor.intercepting = false - - return string(output), err -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go b/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go deleted file mode 100644 index c8f97d97f..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/output_interceptor_win.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build windows - -package remote - -import ( - "errors" -) - -func NewOutputInterceptor() OutputInterceptor { - return &outputInterceptor{} -} - -type outputInterceptor struct { - intercepting bool -} - -func (interceptor *outputInterceptor) StartInterceptingOutput() error { - if interceptor.intercepting { - return errors.New("Already intercepting output!") - } - interceptor.intercepting = true - - // not working on windows... - - return nil -} - -func (interceptor *outputInterceptor) StopInterceptingAndReturnOutput() (string, error) { - // not working on windows... - interceptor.intercepting = false - - return "", nil -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/server.go b/vendor/github.com/onsi/ginkgo/internal/remote/server.go deleted file mode 100644 index 367c54daf..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/server.go +++ /dev/null @@ -1,224 +0,0 @@ -/* - -The remote package provides the pieces to allow Ginkgo test suites to report to remote listeners. -This is used, primarily, to enable streaming parallel test output but has, in principal, broader applications (e.g. streaming test output to a browser). - -*/ - -package remote - -import ( - "encoding/json" - "io/ioutil" - "net" - "net/http" - "sync" - - "github.com/onsi/ginkgo/internal/spec_iterator" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" -) - -/* -Server spins up on an automatically selected port and listens for communication from the forwarding reporter. -It then forwards that communication to attached reporters. -*/ -type Server struct { - listener net.Listener - reporters []reporters.Reporter - alives []func() bool - lock *sync.Mutex - beforeSuiteData types.RemoteBeforeSuiteData - parallelTotal int - counter int -} - -//Create a new server, automatically selecting a port -func NewServer(parallelTotal int) (*Server, error) { - listener, err := net.Listen("tcp", "127.0.0.1:0") - if err != nil { - return nil, err - } - return &Server{ - listener: listener, - lock: &sync.Mutex{}, - alives: make([]func() bool, parallelTotal), - beforeSuiteData: types.RemoteBeforeSuiteData{Data: nil, State: types.RemoteBeforeSuiteStatePending}, - parallelTotal: parallelTotal, - }, nil -} - -//Start the server. You don't need to `go s.Start()`, just `s.Start()` -func (server *Server) Start() { - httpServer := &http.Server{} - mux := http.NewServeMux() - httpServer.Handler = mux - - //streaming endpoints - mux.HandleFunc("/SpecSuiteWillBegin", server.specSuiteWillBegin) - mux.HandleFunc("/BeforeSuiteDidRun", server.beforeSuiteDidRun) - mux.HandleFunc("/AfterSuiteDidRun", server.afterSuiteDidRun) - mux.HandleFunc("/SpecWillRun", server.specWillRun) - mux.HandleFunc("/SpecDidComplete", server.specDidComplete) - mux.HandleFunc("/SpecSuiteDidEnd", server.specSuiteDidEnd) - - //synchronization endpoints - mux.HandleFunc("/BeforeSuiteState", server.handleBeforeSuiteState) - mux.HandleFunc("/RemoteAfterSuiteData", server.handleRemoteAfterSuiteData) - mux.HandleFunc("/counter", server.handleCounter) - mux.HandleFunc("/has-counter", server.handleHasCounter) //for backward compatibility - - go httpServer.Serve(server.listener) -} - -//Stop the server -func (server *Server) Close() { - server.listener.Close() -} - -//The address the server can be reached it. Pass this into the `ForwardingReporter`. -func (server *Server) Address() string { - return "http://" + server.listener.Addr().String() -} - -// -// Streaming Endpoints -// - -//The server will forward all received messages to Ginkgo reporters registered with `RegisterReporters` -func (server *Server) readAll(request *http.Request) []byte { - defer request.Body.Close() - body, _ := ioutil.ReadAll(request.Body) - return body -} - -func (server *Server) RegisterReporters(reporters ...reporters.Reporter) { - server.reporters = reporters -} - -func (server *Server) specSuiteWillBegin(writer http.ResponseWriter, request *http.Request) { - body := server.readAll(request) - - var data struct { - Config config.GinkgoConfigType `json:"config"` - Summary *types.SuiteSummary `json:"suite-summary"` - } - - json.Unmarshal(body, &data) - - for _, reporter := range server.reporters { - reporter.SpecSuiteWillBegin(data.Config, data.Summary) - } -} - -func (server *Server) beforeSuiteDidRun(writer http.ResponseWriter, request *http.Request) { - body := server.readAll(request) - var setupSummary *types.SetupSummary - json.Unmarshal(body, &setupSummary) - - for _, reporter := range server.reporters { - reporter.BeforeSuiteDidRun(setupSummary) - } -} - -func (server *Server) afterSuiteDidRun(writer http.ResponseWriter, request *http.Request) { - body := server.readAll(request) - var setupSummary *types.SetupSummary - json.Unmarshal(body, &setupSummary) - - for _, reporter := range server.reporters { - reporter.AfterSuiteDidRun(setupSummary) - } -} - -func (server *Server) specWillRun(writer http.ResponseWriter, request *http.Request) { - body := server.readAll(request) - var specSummary *types.SpecSummary - json.Unmarshal(body, &specSummary) - - for _, reporter := range server.reporters { - reporter.SpecWillRun(specSummary) - } -} - -func (server *Server) specDidComplete(writer http.ResponseWriter, request *http.Request) { - body := server.readAll(request) - var specSummary *types.SpecSummary - json.Unmarshal(body, &specSummary) - - for _, reporter := range server.reporters { - reporter.SpecDidComplete(specSummary) - } -} - -func (server *Server) specSuiteDidEnd(writer http.ResponseWriter, request *http.Request) { - body := server.readAll(request) - var suiteSummary *types.SuiteSummary - json.Unmarshal(body, &suiteSummary) - - for _, reporter := range server.reporters { - reporter.SpecSuiteDidEnd(suiteSummary) - } -} - -// -// Synchronization Endpoints -// - -func (server *Server) RegisterAlive(node int, alive func() bool) { - server.lock.Lock() - defer server.lock.Unlock() - server.alives[node-1] = alive -} - -func (server *Server) nodeIsAlive(node int) bool { - server.lock.Lock() - defer server.lock.Unlock() - alive := server.alives[node-1] - if alive == nil { - return true - } - return alive() -} - -func (server *Server) handleBeforeSuiteState(writer http.ResponseWriter, request *http.Request) { - if request.Method == "POST" { - dec := json.NewDecoder(request.Body) - dec.Decode(&(server.beforeSuiteData)) - } else { - beforeSuiteData := server.beforeSuiteData - if beforeSuiteData.State == types.RemoteBeforeSuiteStatePending && !server.nodeIsAlive(1) { - beforeSuiteData.State = types.RemoteBeforeSuiteStateDisappeared - } - enc := json.NewEncoder(writer) - enc.Encode(beforeSuiteData) - } -} - -func (server *Server) handleRemoteAfterSuiteData(writer http.ResponseWriter, request *http.Request) { - afterSuiteData := types.RemoteAfterSuiteData{ - CanRun: true, - } - for i := 2; i <= server.parallelTotal; i++ { - afterSuiteData.CanRun = afterSuiteData.CanRun && !server.nodeIsAlive(i) - } - - enc := json.NewEncoder(writer) - enc.Encode(afterSuiteData) -} - -func (server *Server) handleCounter(writer http.ResponseWriter, request *http.Request) { - c := spec_iterator.Counter{} - server.lock.Lock() - c.Index = server.counter - server.counter = server.counter + 1 - server.lock.Unlock() - - json.NewEncoder(writer).Encode(c) -} - -func (server *Server) handleHasCounter(writer http.ResponseWriter, request *http.Request) { - writer.Write([]byte("")) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go deleted file mode 100644 index 9550d37b3..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_linux_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build linux,arm64 - -package remote - -import "syscall" - -// linux_arm64 doesn't have syscall.Dup2 which ginkgo uses, so -// use the nearly identical syscall.Dup3 instead -func syscallDup(oldfd int, newfd int) (err error) { - return syscall.Dup3(oldfd, newfd, 0) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go deleted file mode 100644 index 75ef7fb78..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_solaris.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build solaris - -package remote - -import "golang.org/x/sys/unix" - -func syscallDup(oldfd int, newfd int) (err error) { - return unix.Dup2(oldfd, newfd) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go b/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go deleted file mode 100644 index ef6255960..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/remote/syscall_dup_unix.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build !linux !arm64 -// +build !windows -// +build !solaris - -package remote - -import "syscall" - -func syscallDup(oldfd int, newfd int) (err error) { - return syscall.Dup2(oldfd, newfd) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/spec.go b/vendor/github.com/onsi/ginkgo/internal/spec/spec.go deleted file mode 100644 index d32dec699..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec/spec.go +++ /dev/null @@ -1,206 +0,0 @@ -package spec - -import ( - "fmt" - "io" - "time" - - "github.com/onsi/ginkgo/internal/containernode" - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/types" -) - -type Spec struct { - subject leafnodes.SubjectNode - focused bool - announceProgress bool - - containers []*containernode.ContainerNode - - state types.SpecState - runTime time.Duration - failure types.SpecFailure - previousFailures bool -} - -func New(subject leafnodes.SubjectNode, containers []*containernode.ContainerNode, announceProgress bool) *Spec { - spec := &Spec{ - subject: subject, - containers: containers, - focused: subject.Flag() == types.FlagTypeFocused, - announceProgress: announceProgress, - } - - spec.processFlag(subject.Flag()) - for i := len(containers) - 1; i >= 0; i-- { - spec.processFlag(containers[i].Flag()) - } - - return spec -} - -func (spec *Spec) processFlag(flag types.FlagType) { - if flag == types.FlagTypeFocused { - spec.focused = true - } else if flag == types.FlagTypePending { - spec.state = types.SpecStatePending - } -} - -func (spec *Spec) Skip() { - spec.state = types.SpecStateSkipped -} - -func (spec *Spec) Failed() bool { - return spec.state == types.SpecStateFailed || spec.state == types.SpecStatePanicked || spec.state == types.SpecStateTimedOut -} - -func (spec *Spec) Passed() bool { - return spec.state == types.SpecStatePassed -} - -func (spec *Spec) Flaked() bool { - return spec.state == types.SpecStatePassed && spec.previousFailures -} - -func (spec *Spec) Pending() bool { - return spec.state == types.SpecStatePending -} - -func (spec *Spec) Skipped() bool { - return spec.state == types.SpecStateSkipped -} - -func (spec *Spec) Focused() bool { - return spec.focused -} - -func (spec *Spec) IsMeasurement() bool { - return spec.subject.Type() == types.SpecComponentTypeMeasure -} - -func (spec *Spec) Summary(suiteID string) *types.SpecSummary { - componentTexts := make([]string, len(spec.containers)+1) - componentCodeLocations := make([]types.CodeLocation, len(spec.containers)+1) - - for i, container := range spec.containers { - componentTexts[i] = container.Text() - componentCodeLocations[i] = container.CodeLocation() - } - - componentTexts[len(spec.containers)] = spec.subject.Text() - componentCodeLocations[len(spec.containers)] = spec.subject.CodeLocation() - - return &types.SpecSummary{ - IsMeasurement: spec.IsMeasurement(), - NumberOfSamples: spec.subject.Samples(), - ComponentTexts: componentTexts, - ComponentCodeLocations: componentCodeLocations, - State: spec.state, - RunTime: spec.runTime, - Failure: spec.failure, - Measurements: spec.measurementsReport(), - SuiteID: suiteID, - } -} - -func (spec *Spec) ConcatenatedString() string { - s := "" - for _, container := range spec.containers { - s += container.Text() + " " - } - - return s + spec.subject.Text() -} - -func (spec *Spec) Run(writer io.Writer) { - if spec.state == types.SpecStateFailed { - spec.previousFailures = true - } - - startTime := time.Now() - defer func() { - spec.runTime = time.Since(startTime) - }() - - for sample := 0; sample < spec.subject.Samples(); sample++ { - spec.runSample(sample, writer) - - if spec.state != types.SpecStatePassed { - return - } - } -} - -func (spec *Spec) runSample(sample int, writer io.Writer) { - spec.state = types.SpecStatePassed - spec.failure = types.SpecFailure{} - innerMostContainerIndexToUnwind := -1 - - defer func() { - for i := innerMostContainerIndexToUnwind; i >= 0; i-- { - container := spec.containers[i] - for _, afterEach := range container.SetupNodesOfType(types.SpecComponentTypeAfterEach) { - spec.announceSetupNode(writer, "AfterEach", container, afterEach) - afterEachState, afterEachFailure := afterEach.Run() - if afterEachState != types.SpecStatePassed && spec.state == types.SpecStatePassed { - spec.state = afterEachState - spec.failure = afterEachFailure - } - } - } - }() - - for i, container := range spec.containers { - innerMostContainerIndexToUnwind = i - for _, beforeEach := range container.SetupNodesOfType(types.SpecComponentTypeBeforeEach) { - spec.announceSetupNode(writer, "BeforeEach", container, beforeEach) - spec.state, spec.failure = beforeEach.Run() - if spec.state != types.SpecStatePassed { - return - } - } - } - - for _, container := range spec.containers { - for _, justBeforeEach := range container.SetupNodesOfType(types.SpecComponentTypeJustBeforeEach) { - spec.announceSetupNode(writer, "JustBeforeEach", container, justBeforeEach) - spec.state, spec.failure = justBeforeEach.Run() - if spec.state != types.SpecStatePassed { - return - } - } - } - - spec.announceSubject(writer, spec.subject) - spec.state, spec.failure = spec.subject.Run() -} - -func (spec *Spec) announceSetupNode(writer io.Writer, nodeType string, container *containernode.ContainerNode, setupNode leafnodes.BasicNode) { - if spec.announceProgress { - s := fmt.Sprintf("[%s] %s\n %s\n", nodeType, container.Text(), setupNode.CodeLocation().String()) - writer.Write([]byte(s)) - } -} - -func (spec *Spec) announceSubject(writer io.Writer, subject leafnodes.SubjectNode) { - if spec.announceProgress { - nodeType := "" - switch subject.Type() { - case types.SpecComponentTypeIt: - nodeType = "It" - case types.SpecComponentTypeMeasure: - nodeType = "Measure" - } - s := fmt.Sprintf("[%s] %s\n %s\n", nodeType, subject.Text(), subject.CodeLocation().String()) - writer.Write([]byte(s)) - } -} - -func (spec *Spec) measurementsReport() map[string]*types.SpecMeasurement { - if !spec.IsMeasurement() || spec.Failed() { - return map[string]*types.SpecMeasurement{} - } - - return spec.subject.(*leafnodes.MeasureNode).MeasurementsReport() -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec/specs.go b/vendor/github.com/onsi/ginkgo/internal/spec/specs.go deleted file mode 100644 index 006185ab5..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec/specs.go +++ /dev/null @@ -1,123 +0,0 @@ -package spec - -import ( - "math/rand" - "regexp" - "sort" -) - -type Specs struct { - specs []*Spec - hasProgrammaticFocus bool - RegexScansFilePath bool -} - -func NewSpecs(specs []*Spec) *Specs { - return &Specs{ - specs: specs, - } -} - -func (e *Specs) Specs() []*Spec { - return e.specs -} - -func (e *Specs) HasProgrammaticFocus() bool { - return e.hasProgrammaticFocus -} - -func (e *Specs) Shuffle(r *rand.Rand) { - sort.Sort(e) - permutation := r.Perm(len(e.specs)) - shuffledSpecs := make([]*Spec, len(e.specs)) - for i, j := range permutation { - shuffledSpecs[i] = e.specs[j] - } - e.specs = shuffledSpecs -} - -func (e *Specs) ApplyFocus(description string, focusString string, skipString string) { - if focusString == "" && skipString == "" { - e.applyProgrammaticFocus() - } else { - e.applyRegExpFocusAndSkip(description, focusString, skipString) - } -} - -func (e *Specs) applyProgrammaticFocus() { - e.hasProgrammaticFocus = false - for _, spec := range e.specs { - if spec.Focused() && !spec.Pending() { - e.hasProgrammaticFocus = true - break - } - } - - if e.hasProgrammaticFocus { - for _, spec := range e.specs { - if !spec.Focused() { - spec.Skip() - } - } - } -} - -// toMatch returns a byte[] to be used by regex matchers. When adding new behaviours to the matching function, -// this is the place which we append to. -func (e *Specs) toMatch(description string, spec *Spec) []byte { - if e.RegexScansFilePath { - return []byte( - description + " " + - spec.ConcatenatedString() + " " + - spec.subject.CodeLocation().FileName) - } else { - return []byte( - description + " " + - spec.ConcatenatedString()) - } -} - -func (e *Specs) applyRegExpFocusAndSkip(description string, focusString string, skipString string) { - for _, spec := range e.specs { - matchesFocus := true - matchesSkip := false - - toMatch := e.toMatch(description, spec) - - if focusString != "" { - focusFilter := regexp.MustCompile(focusString) - matchesFocus = focusFilter.Match([]byte(toMatch)) - } - - if skipString != "" { - skipFilter := regexp.MustCompile(skipString) - matchesSkip = skipFilter.Match([]byte(toMatch)) - } - - if !matchesFocus || matchesSkip { - spec.Skip() - } - } -} - -func (e *Specs) SkipMeasurements() { - for _, spec := range e.specs { - if spec.IsMeasurement() { - spec.Skip() - } - } -} - -//sort.Interface - -func (e *Specs) Len() int { - return len(e.specs) -} - -func (e *Specs) Less(i, j int) bool { - return e.specs[i].ConcatenatedString() < e.specs[j].ConcatenatedString() -} - -func (e *Specs) Swap(i, j int) { - e.specs[i], e.specs[j] = e.specs[j], e.specs[i] -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go deleted file mode 100644 index 82272554a..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/index_computer.go +++ /dev/null @@ -1,55 +0,0 @@ -package spec_iterator - -func ParallelizedIndexRange(length int, parallelTotal int, parallelNode int) (startIndex int, count int) { - if length == 0 { - return 0, 0 - } - - // We have more nodes than tests. Trivial case. - if parallelTotal >= length { - if parallelNode > length { - return 0, 0 - } else { - return parallelNode - 1, 1 - } - } - - // This is the minimum amount of tests that a node will be required to run - minTestsPerNode := length / parallelTotal - - // This is the maximum amount of tests that a node will be required to run - // The algorithm guarantees that this would be equal to at least the minimum amount - // and at most one more - maxTestsPerNode := minTestsPerNode - if length%parallelTotal != 0 { - maxTestsPerNode++ - } - - // Number of nodes that will have to run the maximum amount of tests per node - numMaxLoadNodes := length % parallelTotal - - // Number of nodes that precede the current node and will have to run the maximum amount of tests per node - var numPrecedingMaxLoadNodes int - if parallelNode > numMaxLoadNodes { - numPrecedingMaxLoadNodes = numMaxLoadNodes - } else { - numPrecedingMaxLoadNodes = parallelNode - 1 - } - - // Number of nodes that precede the current node and will have to run the minimum amount of tests per node - var numPrecedingMinLoadNodes int - if parallelNode <= numMaxLoadNodes { - numPrecedingMinLoadNodes = 0 - } else { - numPrecedingMinLoadNodes = parallelNode - numMaxLoadNodes - 1 - } - - // Evaluate the test start index and number of tests to run - startIndex = numPrecedingMaxLoadNodes*maxTestsPerNode + numPrecedingMinLoadNodes*minTestsPerNode - if parallelNode > numMaxLoadNodes { - count = minTestsPerNode - } else { - count = maxTestsPerNode - } - return -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go deleted file mode 100644 index 99f548bca..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/parallel_spec_iterator.go +++ /dev/null @@ -1,59 +0,0 @@ -package spec_iterator - -import ( - "encoding/json" - "fmt" - "net/http" - - "github.com/onsi/ginkgo/internal/spec" -) - -type ParallelIterator struct { - specs []*spec.Spec - host string - client *http.Client -} - -func NewParallelIterator(specs []*spec.Spec, host string) *ParallelIterator { - return &ParallelIterator{ - specs: specs, - host: host, - client: &http.Client{}, - } -} - -func (s *ParallelIterator) Next() (*spec.Spec, error) { - resp, err := s.client.Get(s.host + "/counter") - if err != nil { - return nil, err - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("unexpected status code %d", resp.StatusCode) - } - - var counter Counter - err = json.NewDecoder(resp.Body).Decode(&counter) - if err != nil { - return nil, err - } - - if counter.Index >= len(s.specs) { - return nil, ErrClosed - } - - return s.specs[counter.Index], nil -} - -func (s *ParallelIterator) NumberOfSpecsPriorToIteration() int { - return len(s.specs) -} - -func (s *ParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool) { - return -1, false -} - -func (s *ParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool) { - return -1, false -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go deleted file mode 100644 index a51c93b8b..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/serial_spec_iterator.go +++ /dev/null @@ -1,45 +0,0 @@ -package spec_iterator - -import ( - "github.com/onsi/ginkgo/internal/spec" -) - -type SerialIterator struct { - specs []*spec.Spec - index int -} - -func NewSerialIterator(specs []*spec.Spec) *SerialIterator { - return &SerialIterator{ - specs: specs, - index: 0, - } -} - -func (s *SerialIterator) Next() (*spec.Spec, error) { - if s.index >= len(s.specs) { - return nil, ErrClosed - } - - spec := s.specs[s.index] - s.index += 1 - return spec, nil -} - -func (s *SerialIterator) NumberOfSpecsPriorToIteration() int { - return len(s.specs) -} - -func (s *SerialIterator) NumberOfSpecsToProcessIfKnown() (int, bool) { - return len(s.specs), true -} - -func (s *SerialIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool) { - count := 0 - for _, s := range s.specs { - if !s.Skipped() && !s.Pending() { - count += 1 - } - } - return count, true -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go deleted file mode 100644 index ad4a3ea3c..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/sharded_parallel_spec_iterator.go +++ /dev/null @@ -1,47 +0,0 @@ -package spec_iterator - -import "github.com/onsi/ginkgo/internal/spec" - -type ShardedParallelIterator struct { - specs []*spec.Spec - index int - maxIndex int -} - -func NewShardedParallelIterator(specs []*spec.Spec, total int, node int) *ShardedParallelIterator { - startIndex, count := ParallelizedIndexRange(len(specs), total, node) - - return &ShardedParallelIterator{ - specs: specs, - index: startIndex, - maxIndex: startIndex + count, - } -} - -func (s *ShardedParallelIterator) Next() (*spec.Spec, error) { - if s.index >= s.maxIndex { - return nil, ErrClosed - } - - spec := s.specs[s.index] - s.index += 1 - return spec, nil -} - -func (s *ShardedParallelIterator) NumberOfSpecsPriorToIteration() int { - return len(s.specs) -} - -func (s *ShardedParallelIterator) NumberOfSpecsToProcessIfKnown() (int, bool) { - return s.maxIndex - s.index, true -} - -func (s *ShardedParallelIterator) NumberOfSpecsThatWillBeRunIfKnown() (int, bool) { - count := 0 - for i := s.index; i < s.maxIndex; i += 1 { - if !s.specs[i].Skipped() && !s.specs[i].Pending() { - count += 1 - } - } - return count, true -} diff --git a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go b/vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go deleted file mode 100644 index 74bffad64..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/spec_iterator/spec_iterator.go +++ /dev/null @@ -1,20 +0,0 @@ -package spec_iterator - -import ( - "errors" - - "github.com/onsi/ginkgo/internal/spec" -) - -var ErrClosed = errors.New("no more specs to run") - -type SpecIterator interface { - Next() (*spec.Spec, error) - NumberOfSpecsPriorToIteration() int - NumberOfSpecsToProcessIfKnown() (int, bool) - NumberOfSpecsThatWillBeRunIfKnown() (int, bool) -} - -type Counter struct { - Index int `json:"index"` -} diff --git a/vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go b/vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go deleted file mode 100644 index a0b8b62d5..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/specrunner/random_id.go +++ /dev/null @@ -1,15 +0,0 @@ -package specrunner - -import ( - "crypto/rand" - "fmt" -) - -func randomID() string { - b := make([]byte, 8) - _, err := rand.Read(b) - if err != nil { - return "" - } - return fmt.Sprintf("%x-%x-%x-%x", b[0:2], b[2:4], b[4:6], b[6:8]) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go b/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go deleted file mode 100644 index d4dd909ec..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/specrunner/spec_runner.go +++ /dev/null @@ -1,408 +0,0 @@ -package specrunner - -import ( - "fmt" - "os" - "os/signal" - "sync" - "syscall" - - "github.com/onsi/ginkgo/internal/spec_iterator" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/internal/spec" - Writer "github.com/onsi/ginkgo/internal/writer" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" - - "time" -) - -type SpecRunner struct { - description string - beforeSuiteNode leafnodes.SuiteNode - iterator spec_iterator.SpecIterator - afterSuiteNode leafnodes.SuiteNode - reporters []reporters.Reporter - startTime time.Time - suiteID string - runningSpec *spec.Spec - writer Writer.WriterInterface - config config.GinkgoConfigType - interrupted bool - processedSpecs []*spec.Spec - lock *sync.Mutex -} - -func New(description string, beforeSuiteNode leafnodes.SuiteNode, iterator spec_iterator.SpecIterator, afterSuiteNode leafnodes.SuiteNode, reporters []reporters.Reporter, writer Writer.WriterInterface, config config.GinkgoConfigType) *SpecRunner { - return &SpecRunner{ - description: description, - beforeSuiteNode: beforeSuiteNode, - iterator: iterator, - afterSuiteNode: afterSuiteNode, - reporters: reporters, - writer: writer, - config: config, - suiteID: randomID(), - lock: &sync.Mutex{}, - } -} - -func (runner *SpecRunner) Run() bool { - if runner.config.DryRun { - runner.performDryRun() - return true - } - - runner.reportSuiteWillBegin() - go runner.registerForInterrupts() - - suitePassed := runner.runBeforeSuite() - - if suitePassed { - suitePassed = runner.runSpecs() - } - - runner.blockForeverIfInterrupted() - - suitePassed = runner.runAfterSuite() && suitePassed - - runner.reportSuiteDidEnd(suitePassed) - - return suitePassed -} - -func (runner *SpecRunner) performDryRun() { - runner.reportSuiteWillBegin() - - if runner.beforeSuiteNode != nil { - summary := runner.beforeSuiteNode.Summary() - summary.State = types.SpecStatePassed - runner.reportBeforeSuite(summary) - } - - for { - spec, err := runner.iterator.Next() - if err == spec_iterator.ErrClosed { - break - } - if err != nil { - fmt.Println("failed to iterate over tests:\n" + err.Error()) - break - } - - runner.processedSpecs = append(runner.processedSpecs, spec) - - summary := spec.Summary(runner.suiteID) - runner.reportSpecWillRun(summary) - if summary.State == types.SpecStateInvalid { - summary.State = types.SpecStatePassed - } - runner.reportSpecDidComplete(summary, false) - } - - if runner.afterSuiteNode != nil { - summary := runner.afterSuiteNode.Summary() - summary.State = types.SpecStatePassed - runner.reportAfterSuite(summary) - } - - runner.reportSuiteDidEnd(true) -} - -func (runner *SpecRunner) runBeforeSuite() bool { - if runner.beforeSuiteNode == nil || runner.wasInterrupted() { - return true - } - - runner.writer.Truncate() - conf := runner.config - passed := runner.beforeSuiteNode.Run(conf.ParallelNode, conf.ParallelTotal, conf.SyncHost) - if !passed { - runner.writer.DumpOut() - } - runner.reportBeforeSuite(runner.beforeSuiteNode.Summary()) - return passed -} - -func (runner *SpecRunner) runAfterSuite() bool { - if runner.afterSuiteNode == nil { - return true - } - - runner.writer.Truncate() - conf := runner.config - passed := runner.afterSuiteNode.Run(conf.ParallelNode, conf.ParallelTotal, conf.SyncHost) - if !passed { - runner.writer.DumpOut() - } - runner.reportAfterSuite(runner.afterSuiteNode.Summary()) - return passed -} - -func (runner *SpecRunner) runSpecs() bool { - suiteFailed := false - skipRemainingSpecs := false - for { - spec, err := runner.iterator.Next() - if err == spec_iterator.ErrClosed { - break - } - if err != nil { - fmt.Println("failed to iterate over tests:\n" + err.Error()) - suiteFailed = true - break - } - - runner.processedSpecs = append(runner.processedSpecs, spec) - - if runner.wasInterrupted() { - break - } - if skipRemainingSpecs { - spec.Skip() - } - - if !spec.Skipped() && !spec.Pending() { - if passed := runner.runSpec(spec); !passed { - suiteFailed = true - } - } else if spec.Pending() && runner.config.FailOnPending { - runner.reportSpecWillRun(spec.Summary(runner.suiteID)) - suiteFailed = true - runner.reportSpecDidComplete(spec.Summary(runner.suiteID), spec.Failed()) - } else { - runner.reportSpecWillRun(spec.Summary(runner.suiteID)) - runner.reportSpecDidComplete(spec.Summary(runner.suiteID), spec.Failed()) - } - - if spec.Failed() && runner.config.FailFast { - skipRemainingSpecs = true - } - } - - return !suiteFailed -} - -func (runner *SpecRunner) runSpec(spec *spec.Spec) (passed bool) { - maxAttempts := 1 - if runner.config.FlakeAttempts > 0 { - // uninitialized configs count as 1 - maxAttempts = runner.config.FlakeAttempts - } - - for i := 0; i < maxAttempts; i++ { - runner.reportSpecWillRun(spec.Summary(runner.suiteID)) - runner.runningSpec = spec - spec.Run(runner.writer) - runner.runningSpec = nil - runner.reportSpecDidComplete(spec.Summary(runner.suiteID), spec.Failed()) - if !spec.Failed() { - return true - } - } - return false -} - -func (runner *SpecRunner) CurrentSpecSummary() (*types.SpecSummary, bool) { - if runner.runningSpec == nil { - return nil, false - } - - return runner.runningSpec.Summary(runner.suiteID), true -} - -func (runner *SpecRunner) registerForInterrupts() { - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) - - <-c - signal.Stop(c) - runner.markInterrupted() - go runner.registerForHardInterrupts() - runner.writer.DumpOutWithHeader(` -Received interrupt. Emitting contents of GinkgoWriter... ---------------------------------------------------------- -`) - if runner.afterSuiteNode != nil { - fmt.Fprint(os.Stderr, ` ---------------------------------------------------------- -Received interrupt. Running AfterSuite... -^C again to terminate immediately -`) - runner.runAfterSuite() - } - runner.reportSuiteDidEnd(false) - os.Exit(1) -} - -func (runner *SpecRunner) registerForHardInterrupts() { - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) - - <-c - fmt.Fprintln(os.Stderr, "\nReceived second interrupt. Shutting down.") - os.Exit(1) -} - -func (runner *SpecRunner) blockForeverIfInterrupted() { - runner.lock.Lock() - interrupted := runner.interrupted - runner.lock.Unlock() - - if interrupted { - select {} - } -} - -func (runner *SpecRunner) markInterrupted() { - runner.lock.Lock() - defer runner.lock.Unlock() - runner.interrupted = true -} - -func (runner *SpecRunner) wasInterrupted() bool { - runner.lock.Lock() - defer runner.lock.Unlock() - return runner.interrupted -} - -func (runner *SpecRunner) reportSuiteWillBegin() { - runner.startTime = time.Now() - summary := runner.suiteWillBeginSummary() - for _, reporter := range runner.reporters { - reporter.SpecSuiteWillBegin(runner.config, summary) - } -} - -func (runner *SpecRunner) reportBeforeSuite(summary *types.SetupSummary) { - for _, reporter := range runner.reporters { - reporter.BeforeSuiteDidRun(summary) - } -} - -func (runner *SpecRunner) reportAfterSuite(summary *types.SetupSummary) { - for _, reporter := range runner.reporters { - reporter.AfterSuiteDidRun(summary) - } -} - -func (runner *SpecRunner) reportSpecWillRun(summary *types.SpecSummary) { - runner.writer.Truncate() - - for _, reporter := range runner.reporters { - reporter.SpecWillRun(summary) - } -} - -func (runner *SpecRunner) reportSpecDidComplete(summary *types.SpecSummary, failed bool) { - if failed && len(summary.CapturedOutput) == 0 { - summary.CapturedOutput = string(runner.writer.Bytes()) - } - for i := len(runner.reporters) - 1; i >= 1; i-- { - runner.reporters[i].SpecDidComplete(summary) - } - - if failed { - runner.writer.DumpOut() - } - - runner.reporters[0].SpecDidComplete(summary) -} - -func (runner *SpecRunner) reportSuiteDidEnd(success bool) { - summary := runner.suiteDidEndSummary(success) - summary.RunTime = time.Since(runner.startTime) - for _, reporter := range runner.reporters { - reporter.SpecSuiteDidEnd(summary) - } -} - -func (runner *SpecRunner) countSpecsThatRanSatisfying(filter func(ex *spec.Spec) bool) (count int) { - count = 0 - - for _, spec := range runner.processedSpecs { - if filter(spec) { - count++ - } - } - - return count -} - -func (runner *SpecRunner) suiteDidEndSummary(success bool) *types.SuiteSummary { - numberOfSpecsThatWillBeRun := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { - return !ex.Skipped() && !ex.Pending() - }) - - numberOfPendingSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { - return ex.Pending() - }) - - numberOfSkippedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { - return ex.Skipped() - }) - - numberOfPassedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { - return ex.Passed() - }) - - numberOfFlakedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { - return ex.Flaked() - }) - - numberOfFailedSpecs := runner.countSpecsThatRanSatisfying(func(ex *spec.Spec) bool { - return ex.Failed() - }) - - if runner.beforeSuiteNode != nil && !runner.beforeSuiteNode.Passed() && !runner.config.DryRun { - var known bool - numberOfSpecsThatWillBeRun, known = runner.iterator.NumberOfSpecsThatWillBeRunIfKnown() - if !known { - numberOfSpecsThatWillBeRun = runner.iterator.NumberOfSpecsPriorToIteration() - } - numberOfFailedSpecs = numberOfSpecsThatWillBeRun - } - - return &types.SuiteSummary{ - SuiteDescription: runner.description, - SuiteSucceeded: success, - SuiteID: runner.suiteID, - - NumberOfSpecsBeforeParallelization: runner.iterator.NumberOfSpecsPriorToIteration(), - NumberOfTotalSpecs: len(runner.processedSpecs), - NumberOfSpecsThatWillBeRun: numberOfSpecsThatWillBeRun, - NumberOfPendingSpecs: numberOfPendingSpecs, - NumberOfSkippedSpecs: numberOfSkippedSpecs, - NumberOfPassedSpecs: numberOfPassedSpecs, - NumberOfFailedSpecs: numberOfFailedSpecs, - NumberOfFlakedSpecs: numberOfFlakedSpecs, - } -} - -func (runner *SpecRunner) suiteWillBeginSummary() *types.SuiteSummary { - numTotal, known := runner.iterator.NumberOfSpecsToProcessIfKnown() - if !known { - numTotal = -1 - } - - numToRun, known := runner.iterator.NumberOfSpecsThatWillBeRunIfKnown() - if !known { - numToRun = -1 - } - - return &types.SuiteSummary{ - SuiteDescription: runner.description, - SuiteID: runner.suiteID, - - NumberOfSpecsBeforeParallelization: runner.iterator.NumberOfSpecsPriorToIteration(), - NumberOfTotalSpecs: numTotal, - NumberOfSpecsThatWillBeRun: numToRun, - NumberOfPendingSpecs: -1, - NumberOfSkippedSpecs: -1, - NumberOfPassedSpecs: -1, - NumberOfFailedSpecs: -1, - NumberOfFlakedSpecs: -1, - } -} diff --git a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go b/vendor/github.com/onsi/ginkgo/internal/suite/suite.go deleted file mode 100644 index 698a6e568..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/suite/suite.go +++ /dev/null @@ -1,183 +0,0 @@ -package suite - -import ( - "math/rand" - "net/http" - "time" - - "github.com/onsi/ginkgo/internal/spec_iterator" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/internal/containernode" - "github.com/onsi/ginkgo/internal/failer" - "github.com/onsi/ginkgo/internal/leafnodes" - "github.com/onsi/ginkgo/internal/spec" - "github.com/onsi/ginkgo/internal/specrunner" - "github.com/onsi/ginkgo/internal/writer" - "github.com/onsi/ginkgo/reporters" - "github.com/onsi/ginkgo/types" -) - -type ginkgoTestingT interface { - Fail() -} - -type Suite struct { - topLevelContainer *containernode.ContainerNode - currentContainer *containernode.ContainerNode - containerIndex int - beforeSuiteNode leafnodes.SuiteNode - afterSuiteNode leafnodes.SuiteNode - runner *specrunner.SpecRunner - failer *failer.Failer - running bool -} - -func New(failer *failer.Failer) *Suite { - topLevelContainer := containernode.New("[Top Level]", types.FlagTypeNone, types.CodeLocation{}) - - return &Suite{ - topLevelContainer: topLevelContainer, - currentContainer: topLevelContainer, - failer: failer, - containerIndex: 1, - } -} - -func (suite *Suite) Run(t ginkgoTestingT, description string, reporters []reporters.Reporter, writer writer.WriterInterface, config config.GinkgoConfigType) (bool, bool) { - if config.ParallelTotal < 1 { - panic("ginkgo.parallel.total must be >= 1") - } - - if config.ParallelNode > config.ParallelTotal || config.ParallelNode < 1 { - panic("ginkgo.parallel.node is one-indexed and must be <= ginkgo.parallel.total") - } - - r := rand.New(rand.NewSource(config.RandomSeed)) - suite.topLevelContainer.Shuffle(r) - iterator, hasProgrammaticFocus := suite.generateSpecsIterator(description, config) - suite.runner = specrunner.New(description, suite.beforeSuiteNode, iterator, suite.afterSuiteNode, reporters, writer, config) - - suite.running = true - success := suite.runner.Run() - if !success { - t.Fail() - } - return success, hasProgrammaticFocus -} - -func (suite *Suite) generateSpecsIterator(description string, config config.GinkgoConfigType) (spec_iterator.SpecIterator, bool) { - specsSlice := []*spec.Spec{} - suite.topLevelContainer.BackPropagateProgrammaticFocus() - for _, collatedNodes := range suite.topLevelContainer.Collate() { - specsSlice = append(specsSlice, spec.New(collatedNodes.Subject, collatedNodes.Containers, config.EmitSpecProgress)) - } - - specs := spec.NewSpecs(specsSlice) - specs.RegexScansFilePath = config.RegexScansFilePath - - if config.RandomizeAllSpecs { - specs.Shuffle(rand.New(rand.NewSource(config.RandomSeed))) - } - - specs.ApplyFocus(description, config.FocusString, config.SkipString) - - if config.SkipMeasurements { - specs.SkipMeasurements() - } - - var iterator spec_iterator.SpecIterator - - if config.ParallelTotal > 1 { - iterator = spec_iterator.NewParallelIterator(specs.Specs(), config.SyncHost) - resp, err := http.Get(config.SyncHost + "/has-counter") - if err != nil || resp.StatusCode != http.StatusOK { - iterator = spec_iterator.NewShardedParallelIterator(specs.Specs(), config.ParallelTotal, config.ParallelNode) - } - } else { - iterator = spec_iterator.NewSerialIterator(specs.Specs()) - } - - return iterator, specs.HasProgrammaticFocus() -} - -func (suite *Suite) CurrentRunningSpecSummary() (*types.SpecSummary, bool) { - return suite.runner.CurrentSpecSummary() -} - -func (suite *Suite) SetBeforeSuiteNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.beforeSuiteNode != nil { - panic("You may only call BeforeSuite once!") - } - suite.beforeSuiteNode = leafnodes.NewBeforeSuiteNode(body, codeLocation, timeout, suite.failer) -} - -func (suite *Suite) SetAfterSuiteNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.afterSuiteNode != nil { - panic("You may only call AfterSuite once!") - } - suite.afterSuiteNode = leafnodes.NewAfterSuiteNode(body, codeLocation, timeout, suite.failer) -} - -func (suite *Suite) SetSynchronizedBeforeSuiteNode(bodyA interface{}, bodyB interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.beforeSuiteNode != nil { - panic("You may only call BeforeSuite once!") - } - suite.beforeSuiteNode = leafnodes.NewSynchronizedBeforeSuiteNode(bodyA, bodyB, codeLocation, timeout, suite.failer) -} - -func (suite *Suite) SetSynchronizedAfterSuiteNode(bodyA interface{}, bodyB interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.afterSuiteNode != nil { - panic("You may only call AfterSuite once!") - } - suite.afterSuiteNode = leafnodes.NewSynchronizedAfterSuiteNode(bodyA, bodyB, codeLocation, timeout, suite.failer) -} - -func (suite *Suite) PushContainerNode(text string, body func(), flag types.FlagType, codeLocation types.CodeLocation) { - container := containernode.New(text, flag, codeLocation) - suite.currentContainer.PushContainerNode(container) - - previousContainer := suite.currentContainer - suite.currentContainer = container - suite.containerIndex++ - - body() - - suite.containerIndex-- - suite.currentContainer = previousContainer -} - -func (suite *Suite) PushItNode(text string, body interface{}, flag types.FlagType, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.running { - suite.failer.Fail("You may only call It from within a Describe or Context", codeLocation) - } - suite.currentContainer.PushSubjectNode(leafnodes.NewItNode(text, body, flag, codeLocation, timeout, suite.failer, suite.containerIndex)) -} - -func (suite *Suite) PushMeasureNode(text string, body interface{}, flag types.FlagType, codeLocation types.CodeLocation, samples int) { - if suite.running { - suite.failer.Fail("You may only call Measure from within a Describe or Context", codeLocation) - } - suite.currentContainer.PushSubjectNode(leafnodes.NewMeasureNode(text, body, flag, codeLocation, samples, suite.failer, suite.containerIndex)) -} - -func (suite *Suite) PushBeforeEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.running { - suite.failer.Fail("You may only call BeforeEach from within a Describe or Context", codeLocation) - } - suite.currentContainer.PushSetupNode(leafnodes.NewBeforeEachNode(body, codeLocation, timeout, suite.failer, suite.containerIndex)) -} - -func (suite *Suite) PushJustBeforeEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.running { - suite.failer.Fail("You may only call JustBeforeEach from within a Describe or Context", codeLocation) - } - suite.currentContainer.PushSetupNode(leafnodes.NewJustBeforeEachNode(body, codeLocation, timeout, suite.failer, suite.containerIndex)) -} - -func (suite *Suite) PushAfterEachNode(body interface{}, codeLocation types.CodeLocation, timeout time.Duration) { - if suite.running { - suite.failer.Fail("You may only call AfterEach from within a Describe or Context", codeLocation) - } - suite.currentContainer.PushSetupNode(leafnodes.NewAfterEachNode(body, codeLocation, timeout, suite.failer, suite.containerIndex)) -} diff --git a/vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go b/vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go deleted file mode 100644 index 090445d08..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/testingtproxy/testing_t_proxy.go +++ /dev/null @@ -1,76 +0,0 @@ -package testingtproxy - -import ( - "fmt" - "io" -) - -type failFunc func(message string, callerSkip ...int) - -func New(writer io.Writer, fail failFunc, offset int) *ginkgoTestingTProxy { - return &ginkgoTestingTProxy{ - fail: fail, - offset: offset, - writer: writer, - } -} - -type ginkgoTestingTProxy struct { - fail failFunc - offset int - writer io.Writer -} - -func (t *ginkgoTestingTProxy) Error(args ...interface{}) { - t.fail(fmt.Sprintln(args...), t.offset) -} - -func (t *ginkgoTestingTProxy) Errorf(format string, args ...interface{}) { - t.fail(fmt.Sprintf(format, args...), t.offset) -} - -func (t *ginkgoTestingTProxy) Fail() { - t.fail("failed", t.offset) -} - -func (t *ginkgoTestingTProxy) FailNow() { - t.fail("failed", t.offset) -} - -func (t *ginkgoTestingTProxy) Fatal(args ...interface{}) { - t.fail(fmt.Sprintln(args...), t.offset) -} - -func (t *ginkgoTestingTProxy) Fatalf(format string, args ...interface{}) { - t.fail(fmt.Sprintf(format, args...), t.offset) -} - -func (t *ginkgoTestingTProxy) Log(args ...interface{}) { - fmt.Fprintln(t.writer, args...) -} - -func (t *ginkgoTestingTProxy) Logf(format string, args ...interface{}) { - t.Log(fmt.Sprintf(format, args...)) -} - -func (t *ginkgoTestingTProxy) Failed() bool { - return false -} - -func (t *ginkgoTestingTProxy) Parallel() { -} - -func (t *ginkgoTestingTProxy) Skip(args ...interface{}) { - fmt.Println(args...) -} - -func (t *ginkgoTestingTProxy) Skipf(format string, args ...interface{}) { - t.Skip(fmt.Sprintf(format, args...)) -} - -func (t *ginkgoTestingTProxy) SkipNow() { -} - -func (t *ginkgoTestingTProxy) Skipped() bool { - return false -} diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go b/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go deleted file mode 100644 index 6739c3f60..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/writer/fake_writer.go +++ /dev/null @@ -1,36 +0,0 @@ -package writer - -type FakeGinkgoWriter struct { - EventStream []string -} - -func NewFake() *FakeGinkgoWriter { - return &FakeGinkgoWriter{ - EventStream: []string{}, - } -} - -func (writer *FakeGinkgoWriter) AddEvent(event string) { - writer.EventStream = append(writer.EventStream, event) -} - -func (writer *FakeGinkgoWriter) Truncate() { - writer.EventStream = append(writer.EventStream, "TRUNCATE") -} - -func (writer *FakeGinkgoWriter) DumpOut() { - writer.EventStream = append(writer.EventStream, "DUMP") -} - -func (writer *FakeGinkgoWriter) DumpOutWithHeader(header string) { - writer.EventStream = append(writer.EventStream, "DUMP_WITH_HEADER: "+header) -} - -func (writer *FakeGinkgoWriter) Bytes() []byte { - writer.EventStream = append(writer.EventStream, "BYTES") - return nil -} - -func (writer *FakeGinkgoWriter) Write(data []byte) (n int, err error) { - return 0, nil -} diff --git a/vendor/github.com/onsi/ginkgo/internal/writer/writer.go b/vendor/github.com/onsi/ginkgo/internal/writer/writer.go deleted file mode 100644 index 6b23b1a64..000000000 --- a/vendor/github.com/onsi/ginkgo/internal/writer/writer.go +++ /dev/null @@ -1,81 +0,0 @@ -package writer - -import ( - "bytes" - "io" - "sync" -) - -type WriterInterface interface { - io.Writer - - Truncate() - DumpOut() - DumpOutWithHeader(header string) - Bytes() []byte -} - -type Writer struct { - buffer *bytes.Buffer - outWriter io.Writer - lock *sync.Mutex - stream bool -} - -func New(outWriter io.Writer) *Writer { - return &Writer{ - buffer: &bytes.Buffer{}, - lock: &sync.Mutex{}, - outWriter: outWriter, - stream: true, - } -} - -func (w *Writer) SetStream(stream bool) { - w.lock.Lock() - defer w.lock.Unlock() - w.stream = stream -} - -func (w *Writer) Write(b []byte) (n int, err error) { - w.lock.Lock() - defer w.lock.Unlock() - - n, err = w.buffer.Write(b) - if w.stream { - return w.outWriter.Write(b) - } - return n, err -} - -func (w *Writer) Truncate() { - w.lock.Lock() - defer w.lock.Unlock() - w.buffer.Reset() -} - -func (w *Writer) DumpOut() { - w.lock.Lock() - defer w.lock.Unlock() - if !w.stream { - w.buffer.WriteTo(w.outWriter) - } -} - -func (w *Writer) Bytes() []byte { - w.lock.Lock() - defer w.lock.Unlock() - b := w.buffer.Bytes() - copied := make([]byte, len(b)) - copy(copied, b) - return copied -} - -func (w *Writer) DumpOutWithHeader(header string) { - w.lock.Lock() - defer w.lock.Unlock() - if !w.stream && w.buffer.Len() > 0 { - w.outWriter.Write([]byte(header)) - w.buffer.WriteTo(w.outWriter) - } -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go deleted file mode 100644 index ac58dd5f7..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/default_reporter.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Ginkgo's Default Reporter - -A number of command line flags are available to tweak Ginkgo's default output. - -These are documented [here](http://onsi.github.io/ginkgo/#running_tests) -*/ -package reporters - -import ( - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/reporters/stenographer" - "github.com/onsi/ginkgo/types" -) - -type DefaultReporter struct { - config config.DefaultReporterConfigType - stenographer stenographer.Stenographer - specSummaries []*types.SpecSummary -} - -func NewDefaultReporter(config config.DefaultReporterConfigType, stenographer stenographer.Stenographer) *DefaultReporter { - return &DefaultReporter{ - config: config, - stenographer: stenographer, - } -} - -func (reporter *DefaultReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { - reporter.stenographer.AnnounceSuite(summary.SuiteDescription, config.RandomSeed, config.RandomizeAllSpecs, reporter.config.Succinct) - if config.ParallelTotal > 1 { - reporter.stenographer.AnnounceParallelRun(config.ParallelNode, config.ParallelTotal, reporter.config.Succinct) - } else { - reporter.stenographer.AnnounceNumberOfSpecs(summary.NumberOfSpecsThatWillBeRun, summary.NumberOfTotalSpecs, reporter.config.Succinct) - } -} - -func (reporter *DefaultReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { - if setupSummary.State != types.SpecStatePassed { - reporter.stenographer.AnnounceBeforeSuiteFailure(setupSummary, reporter.config.Succinct, reporter.config.FullTrace) - } -} - -func (reporter *DefaultReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { - if setupSummary.State != types.SpecStatePassed { - reporter.stenographer.AnnounceAfterSuiteFailure(setupSummary, reporter.config.Succinct, reporter.config.FullTrace) - } -} - -func (reporter *DefaultReporter) SpecWillRun(specSummary *types.SpecSummary) { - if reporter.config.Verbose && !reporter.config.Succinct && specSummary.State != types.SpecStatePending && specSummary.State != types.SpecStateSkipped { - reporter.stenographer.AnnounceSpecWillRun(specSummary) - } -} - -func (reporter *DefaultReporter) SpecDidComplete(specSummary *types.SpecSummary) { - switch specSummary.State { - case types.SpecStatePassed: - if specSummary.IsMeasurement { - reporter.stenographer.AnnounceSuccesfulMeasurement(specSummary, reporter.config.Succinct) - } else if specSummary.RunTime.Seconds() >= reporter.config.SlowSpecThreshold { - reporter.stenographer.AnnounceSuccesfulSlowSpec(specSummary, reporter.config.Succinct) - } else { - reporter.stenographer.AnnounceSuccesfulSpec(specSummary) - } - case types.SpecStatePending: - reporter.stenographer.AnnouncePendingSpec(specSummary, reporter.config.NoisyPendings && !reporter.config.Succinct) - case types.SpecStateSkipped: - reporter.stenographer.AnnounceSkippedSpec(specSummary, reporter.config.Succinct || !reporter.config.NoisySkippings, reporter.config.FullTrace) - case types.SpecStateTimedOut: - reporter.stenographer.AnnounceSpecTimedOut(specSummary, reporter.config.Succinct, reporter.config.FullTrace) - case types.SpecStatePanicked: - reporter.stenographer.AnnounceSpecPanicked(specSummary, reporter.config.Succinct, reporter.config.FullTrace) - case types.SpecStateFailed: - reporter.stenographer.AnnounceSpecFailed(specSummary, reporter.config.Succinct, reporter.config.FullTrace) - } - - reporter.specSummaries = append(reporter.specSummaries, specSummary) -} - -func (reporter *DefaultReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { - reporter.stenographer.SummarizeFailures(reporter.specSummaries) - reporter.stenographer.AnnounceSpecRunCompletion(summary, reporter.config.Succinct) -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go deleted file mode 100644 index 27db47949..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/fake_reporter.go +++ /dev/null @@ -1,59 +0,0 @@ -package reporters - -import ( - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" -) - -//FakeReporter is useful for testing purposes -type FakeReporter struct { - Config config.GinkgoConfigType - - BeginSummary *types.SuiteSummary - BeforeSuiteSummary *types.SetupSummary - SpecWillRunSummaries []*types.SpecSummary - SpecSummaries []*types.SpecSummary - AfterSuiteSummary *types.SetupSummary - EndSummary *types.SuiteSummary - - SpecWillRunStub func(specSummary *types.SpecSummary) - SpecDidCompleteStub func(specSummary *types.SpecSummary) -} - -func NewFakeReporter() *FakeReporter { - return &FakeReporter{ - SpecWillRunSummaries: make([]*types.SpecSummary, 0), - SpecSummaries: make([]*types.SpecSummary, 0), - } -} - -func (fakeR *FakeReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { - fakeR.Config = config - fakeR.BeginSummary = summary -} - -func (fakeR *FakeReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { - fakeR.BeforeSuiteSummary = setupSummary -} - -func (fakeR *FakeReporter) SpecWillRun(specSummary *types.SpecSummary) { - if fakeR.SpecWillRunStub != nil { - fakeR.SpecWillRunStub(specSummary) - } - fakeR.SpecWillRunSummaries = append(fakeR.SpecWillRunSummaries, specSummary) -} - -func (fakeR *FakeReporter) SpecDidComplete(specSummary *types.SpecSummary) { - if fakeR.SpecDidCompleteStub != nil { - fakeR.SpecDidCompleteStub(specSummary) - } - fakeR.SpecSummaries = append(fakeR.SpecSummaries, specSummary) -} - -func (fakeR *FakeReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { - fakeR.AfterSuiteSummary = setupSummary -} - -func (fakeR *FakeReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { - fakeR.EndSummary = summary -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go deleted file mode 100644 index 89b03513f..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/junit_reporter.go +++ /dev/null @@ -1,147 +0,0 @@ -/* - -JUnit XML Reporter for Ginkgo - -For usage instructions: http://onsi.github.io/ginkgo/#generating_junit_xml_output - -*/ - -package reporters - -import ( - "encoding/xml" - "fmt" - "os" - "strings" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" -) - -type JUnitTestSuite struct { - XMLName xml.Name `xml:"testsuite"` - TestCases []JUnitTestCase `xml:"testcase"` - Tests int `xml:"tests,attr"` - Failures int `xml:"failures,attr"` - Time float64 `xml:"time,attr"` -} - -type JUnitTestCase struct { - Name string `xml:"name,attr"` - ClassName string `xml:"classname,attr"` - FailureMessage *JUnitFailureMessage `xml:"failure,omitempty"` - Skipped *JUnitSkipped `xml:"skipped,omitempty"` - Time float64 `xml:"time,attr"` - SystemOut string `xml:"system-out,omitempty"` -} - -type JUnitFailureMessage struct { - Type string `xml:"type,attr"` - Message string `xml:",chardata"` -} - -type JUnitSkipped struct { - XMLName xml.Name `xml:"skipped"` -} - -type JUnitReporter struct { - suite JUnitTestSuite - filename string - testSuiteName string -} - -//NewJUnitReporter creates a new JUnit XML reporter. The XML will be stored in the passed in filename. -func NewJUnitReporter(filename string) *JUnitReporter { - return &JUnitReporter{ - filename: filename, - } -} - -func (reporter *JUnitReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { - reporter.suite = JUnitTestSuite{ - TestCases: []JUnitTestCase{}, - } - reporter.testSuiteName = summary.SuiteDescription -} - -func (reporter *JUnitReporter) SpecWillRun(specSummary *types.SpecSummary) { -} - -func (reporter *JUnitReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { - reporter.handleSetupSummary("BeforeSuite", setupSummary) -} - -func (reporter *JUnitReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { - reporter.handleSetupSummary("AfterSuite", setupSummary) -} - -func failureMessage(failure types.SpecFailure) string { - return fmt.Sprintf("%s\n%s\n%s", failure.ComponentCodeLocation.String(), failure.Message, failure.Location.String()) -} - -func (reporter *JUnitReporter) handleSetupSummary(name string, setupSummary *types.SetupSummary) { - if setupSummary.State != types.SpecStatePassed { - testCase := JUnitTestCase{ - Name: name, - ClassName: reporter.testSuiteName, - } - - testCase.FailureMessage = &JUnitFailureMessage{ - Type: reporter.failureTypeForState(setupSummary.State), - Message: failureMessage(setupSummary.Failure), - } - testCase.SystemOut = setupSummary.CapturedOutput - testCase.Time = setupSummary.RunTime.Seconds() - reporter.suite.TestCases = append(reporter.suite.TestCases, testCase) - } -} - -func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) { - testCase := JUnitTestCase{ - Name: strings.Join(specSummary.ComponentTexts[1:], " "), - ClassName: reporter.testSuiteName, - } - if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateTimedOut || specSummary.State == types.SpecStatePanicked { - testCase.FailureMessage = &JUnitFailureMessage{ - Type: reporter.failureTypeForState(specSummary.State), - Message: failureMessage(specSummary.Failure), - } - testCase.SystemOut = specSummary.CapturedOutput - } - if specSummary.State == types.SpecStateSkipped || specSummary.State == types.SpecStatePending { - testCase.Skipped = &JUnitSkipped{} - } - testCase.Time = specSummary.RunTime.Seconds() - reporter.suite.TestCases = append(reporter.suite.TestCases, testCase) -} - -func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { - reporter.suite.Tests = summary.NumberOfSpecsThatWillBeRun - reporter.suite.Time = summary.RunTime.Seconds() - reporter.suite.Failures = summary.NumberOfFailedSpecs - file, err := os.Create(reporter.filename) - if err != nil { - fmt.Printf("Failed to create JUnit report file: %s\n\t%s", reporter.filename, err.Error()) - } - defer file.Close() - file.WriteString(xml.Header) - encoder := xml.NewEncoder(file) - encoder.Indent(" ", " ") - err = encoder.Encode(reporter.suite) - if err != nil { - fmt.Printf("Failed to generate JUnit report\n\t%s", err.Error()) - } -} - -func (reporter *JUnitReporter) failureTypeForState(state types.SpecState) string { - switch state { - case types.SpecStateFailed: - return "Failure" - case types.SpecStateTimedOut: - return "Timeout" - case types.SpecStatePanicked: - return "Panic" - default: - return "" - } -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/reporter.go b/vendor/github.com/onsi/ginkgo/reporters/reporter.go deleted file mode 100644 index 348b9dfce..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/reporter.go +++ /dev/null @@ -1,15 +0,0 @@ -package reporters - -import ( - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" -) - -type Reporter interface { - SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) - BeforeSuiteDidRun(setupSummary *types.SetupSummary) - SpecWillRun(specSummary *types.SpecSummary) - SpecDidComplete(specSummary *types.SpecSummary) - AfterSuiteDidRun(setupSummary *types.SetupSummary) - SpecSuiteDidEnd(summary *types.SuiteSummary) -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go deleted file mode 100644 index 45b8f8869..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/console_logging.go +++ /dev/null @@ -1,64 +0,0 @@ -package stenographer - -import ( - "fmt" - "strings" -) - -func (s *consoleStenographer) colorize(colorCode string, format string, args ...interface{}) string { - var out string - - if len(args) > 0 { - out = fmt.Sprintf(format, args...) - } else { - out = format - } - - if s.color { - return fmt.Sprintf("%s%s%s", colorCode, out, defaultStyle) - } else { - return out - } -} - -func (s *consoleStenographer) printBanner(text string, bannerCharacter string) { - fmt.Fprintln(s.w, text) - fmt.Fprintln(s.w, strings.Repeat(bannerCharacter, len(text))) -} - -func (s *consoleStenographer) printNewLine() { - fmt.Fprintln(s.w, "") -} - -func (s *consoleStenographer) printDelimiter() { - fmt.Fprintln(s.w, s.colorize(grayColor, "%s", strings.Repeat("-", 30))) -} - -func (s *consoleStenographer) print(indentation int, format string, args ...interface{}) { - fmt.Fprint(s.w, s.indent(indentation, format, args...)) -} - -func (s *consoleStenographer) println(indentation int, format string, args ...interface{}) { - fmt.Fprintln(s.w, s.indent(indentation, format, args...)) -} - -func (s *consoleStenographer) indent(indentation int, format string, args ...interface{}) string { - var text string - - if len(args) > 0 { - text = fmt.Sprintf(format, args...) - } else { - text = format - } - - stringArray := strings.Split(text, "\n") - padding := "" - if indentation >= 0 { - padding = strings.Repeat(" ", indentation) - } - for i, s := range stringArray { - stringArray[i] = fmt.Sprintf("%s%s", padding, s) - } - - return strings.Join(stringArray, "\n") -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go deleted file mode 100644 index 98854e7d9..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/fake_stenographer.go +++ /dev/null @@ -1,142 +0,0 @@ -package stenographer - -import ( - "sync" - - "github.com/onsi/ginkgo/types" -) - -func NewFakeStenographerCall(method string, args ...interface{}) FakeStenographerCall { - return FakeStenographerCall{ - Method: method, - Args: args, - } -} - -type FakeStenographer struct { - calls []FakeStenographerCall - lock *sync.Mutex -} - -type FakeStenographerCall struct { - Method string - Args []interface{} -} - -func NewFakeStenographer() *FakeStenographer { - stenographer := &FakeStenographer{ - lock: &sync.Mutex{}, - } - stenographer.Reset() - return stenographer -} - -func (stenographer *FakeStenographer) Calls() []FakeStenographerCall { - stenographer.lock.Lock() - defer stenographer.lock.Unlock() - - return stenographer.calls -} - -func (stenographer *FakeStenographer) Reset() { - stenographer.lock.Lock() - defer stenographer.lock.Unlock() - - stenographer.calls = make([]FakeStenographerCall, 0) -} - -func (stenographer *FakeStenographer) CallsTo(method string) []FakeStenographerCall { - stenographer.lock.Lock() - defer stenographer.lock.Unlock() - - results := make([]FakeStenographerCall, 0) - for _, call := range stenographer.calls { - if call.Method == method { - results = append(results, call) - } - } - - return results -} - -func (stenographer *FakeStenographer) registerCall(method string, args ...interface{}) { - stenographer.lock.Lock() - defer stenographer.lock.Unlock() - - stenographer.calls = append(stenographer.calls, NewFakeStenographerCall(method, args...)) -} - -func (stenographer *FakeStenographer) AnnounceSuite(description string, randomSeed int64, randomizingAll bool, succinct bool) { - stenographer.registerCall("AnnounceSuite", description, randomSeed, randomizingAll, succinct) -} - -func (stenographer *FakeStenographer) AnnounceAggregatedParallelRun(nodes int, succinct bool) { - stenographer.registerCall("AnnounceAggregatedParallelRun", nodes, succinct) -} - -func (stenographer *FakeStenographer) AnnounceParallelRun(node int, nodes int, succinct bool) { - stenographer.registerCall("AnnounceParallelRun", node, nodes, succinct) -} - -func (stenographer *FakeStenographer) AnnounceNumberOfSpecs(specsToRun int, total int, succinct bool) { - stenographer.registerCall("AnnounceNumberOfSpecs", specsToRun, total, succinct) -} - -func (stenographer *FakeStenographer) AnnounceTotalNumberOfSpecs(total int, succinct bool) { - stenographer.registerCall("AnnounceTotalNumberOfSpecs", total, succinct) -} - -func (stenographer *FakeStenographer) AnnounceSpecRunCompletion(summary *types.SuiteSummary, succinct bool) { - stenographer.registerCall("AnnounceSpecRunCompletion", summary, succinct) -} - -func (stenographer *FakeStenographer) AnnounceSpecWillRun(spec *types.SpecSummary) { - stenographer.registerCall("AnnounceSpecWillRun", spec) -} - -func (stenographer *FakeStenographer) AnnounceBeforeSuiteFailure(summary *types.SetupSummary, succinct bool, fullTrace bool) { - stenographer.registerCall("AnnounceBeforeSuiteFailure", summary, succinct, fullTrace) -} - -func (stenographer *FakeStenographer) AnnounceAfterSuiteFailure(summary *types.SetupSummary, succinct bool, fullTrace bool) { - stenographer.registerCall("AnnounceAfterSuiteFailure", summary, succinct, fullTrace) -} -func (stenographer *FakeStenographer) AnnounceCapturedOutput(output string) { - stenographer.registerCall("AnnounceCapturedOutput", output) -} - -func (stenographer *FakeStenographer) AnnounceSuccesfulSpec(spec *types.SpecSummary) { - stenographer.registerCall("AnnounceSuccesfulSpec", spec) -} - -func (stenographer *FakeStenographer) AnnounceSuccesfulSlowSpec(spec *types.SpecSummary, succinct bool) { - stenographer.registerCall("AnnounceSuccesfulSlowSpec", spec, succinct) -} - -func (stenographer *FakeStenographer) AnnounceSuccesfulMeasurement(spec *types.SpecSummary, succinct bool) { - stenographer.registerCall("AnnounceSuccesfulMeasurement", spec, succinct) -} - -func (stenographer *FakeStenographer) AnnouncePendingSpec(spec *types.SpecSummary, noisy bool) { - stenographer.registerCall("AnnouncePendingSpec", spec, noisy) -} - -func (stenographer *FakeStenographer) AnnounceSkippedSpec(spec *types.SpecSummary, succinct bool, fullTrace bool) { - stenographer.registerCall("AnnounceSkippedSpec", spec, succinct, fullTrace) -} - -func (stenographer *FakeStenographer) AnnounceSpecTimedOut(spec *types.SpecSummary, succinct bool, fullTrace bool) { - stenographer.registerCall("AnnounceSpecTimedOut", spec, succinct, fullTrace) -} - -func (stenographer *FakeStenographer) AnnounceSpecPanicked(spec *types.SpecSummary, succinct bool, fullTrace bool) { - stenographer.registerCall("AnnounceSpecPanicked", spec, succinct, fullTrace) -} - -func (stenographer *FakeStenographer) AnnounceSpecFailed(spec *types.SpecSummary, succinct bool, fullTrace bool) { - stenographer.registerCall("AnnounceSpecFailed", spec, succinct, fullTrace) -} - -func (stenographer *FakeStenographer) SummarizeFailures(summaries []*types.SpecSummary) { - stenographer.registerCall("SummarizeFailures", summaries) -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go deleted file mode 100644 index fefd3e182..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/stenographer.go +++ /dev/null @@ -1,573 +0,0 @@ -/* -The stenographer is used by Ginkgo's reporters to generate output. - -Move along, nothing to see here. -*/ - -package stenographer - -import ( - "fmt" - "io" - "runtime" - "strings" - - "github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable" - "github.com/onsi/ginkgo/types" -) - -const defaultStyle = "\x1b[0m" -const boldStyle = "\x1b[1m" -const redColor = "\x1b[91m" -const greenColor = "\x1b[32m" -const yellowColor = "\x1b[33m" -const cyanColor = "\x1b[36m" -const grayColor = "\x1b[90m" -const lightGrayColor = "\x1b[37m" - -type cursorStateType int - -const ( - cursorStateTop cursorStateType = iota - cursorStateStreaming - cursorStateMidBlock - cursorStateEndBlock -) - -type Stenographer interface { - AnnounceSuite(description string, randomSeed int64, randomizingAll bool, succinct bool) - AnnounceAggregatedParallelRun(nodes int, succinct bool) - AnnounceParallelRun(node int, nodes int, succinct bool) - AnnounceTotalNumberOfSpecs(total int, succinct bool) - AnnounceNumberOfSpecs(specsToRun int, total int, succinct bool) - AnnounceSpecRunCompletion(summary *types.SuiteSummary, succinct bool) - - AnnounceSpecWillRun(spec *types.SpecSummary) - AnnounceBeforeSuiteFailure(summary *types.SetupSummary, succinct bool, fullTrace bool) - AnnounceAfterSuiteFailure(summary *types.SetupSummary, succinct bool, fullTrace bool) - - AnnounceCapturedOutput(output string) - - AnnounceSuccesfulSpec(spec *types.SpecSummary) - AnnounceSuccesfulSlowSpec(spec *types.SpecSummary, succinct bool) - AnnounceSuccesfulMeasurement(spec *types.SpecSummary, succinct bool) - - AnnouncePendingSpec(spec *types.SpecSummary, noisy bool) - AnnounceSkippedSpec(spec *types.SpecSummary, succinct bool, fullTrace bool) - - AnnounceSpecTimedOut(spec *types.SpecSummary, succinct bool, fullTrace bool) - AnnounceSpecPanicked(spec *types.SpecSummary, succinct bool, fullTrace bool) - AnnounceSpecFailed(spec *types.SpecSummary, succinct bool, fullTrace bool) - - SummarizeFailures(summaries []*types.SpecSummary) -} - -func New(color bool, enableFlakes bool) Stenographer { - denoter := "•" - if runtime.GOOS == "windows" { - denoter = "+" - } - return &consoleStenographer{ - color: color, - denoter: denoter, - cursorState: cursorStateTop, - enableFlakes: enableFlakes, - w: colorable.NewColorableStdout(), - } -} - -type consoleStenographer struct { - color bool - denoter string - cursorState cursorStateType - enableFlakes bool - w io.Writer -} - -var alternatingColors = []string{defaultStyle, grayColor} - -func (s *consoleStenographer) AnnounceSuite(description string, randomSeed int64, randomizingAll bool, succinct bool) { - if succinct { - s.print(0, "[%d] %s ", randomSeed, s.colorize(boldStyle, description)) - return - } - s.printBanner(fmt.Sprintf("Running Suite: %s", description), "=") - s.print(0, "Random Seed: %s", s.colorize(boldStyle, "%d", randomSeed)) - if randomizingAll { - s.print(0, " - Will randomize all specs") - } - s.printNewLine() -} - -func (s *consoleStenographer) AnnounceParallelRun(node int, nodes int, succinct bool) { - if succinct { - s.print(0, "- node #%d ", node) - return - } - s.println(0, - "Parallel test node %s/%s.", - s.colorize(boldStyle, "%d", node), - s.colorize(boldStyle, "%d", nodes), - ) - s.printNewLine() -} - -func (s *consoleStenographer) AnnounceAggregatedParallelRun(nodes int, succinct bool) { - if succinct { - s.print(0, "- %d nodes ", nodes) - return - } - s.println(0, - "Running in parallel across %s nodes", - s.colorize(boldStyle, "%d", nodes), - ) - s.printNewLine() -} - -func (s *consoleStenographer) AnnounceNumberOfSpecs(specsToRun int, total int, succinct bool) { - if succinct { - s.print(0, "- %d/%d specs ", specsToRun, total) - s.stream() - return - } - s.println(0, - "Will run %s of %s specs", - s.colorize(boldStyle, "%d", specsToRun), - s.colorize(boldStyle, "%d", total), - ) - - s.printNewLine() -} - -func (s *consoleStenographer) AnnounceTotalNumberOfSpecs(total int, succinct bool) { - if succinct { - s.print(0, "- %d specs ", total) - s.stream() - return - } - s.println(0, - "Will run %s specs", - s.colorize(boldStyle, "%d", total), - ) - - s.printNewLine() -} - -func (s *consoleStenographer) AnnounceSpecRunCompletion(summary *types.SuiteSummary, succinct bool) { - if succinct && summary.SuiteSucceeded { - s.print(0, " %s %s ", s.colorize(greenColor, "SUCCESS!"), summary.RunTime) - return - } - s.printNewLine() - color := greenColor - if !summary.SuiteSucceeded { - color = redColor - } - s.println(0, s.colorize(boldStyle+color, "Ran %d of %d Specs in %.3f seconds", summary.NumberOfSpecsThatWillBeRun, summary.NumberOfTotalSpecs, summary.RunTime.Seconds())) - - status := "" - if summary.SuiteSucceeded { - status = s.colorize(boldStyle+greenColor, "SUCCESS!") - } else { - status = s.colorize(boldStyle+redColor, "FAIL!") - } - - flakes := "" - if s.enableFlakes { - flakes = " | " + s.colorize(yellowColor+boldStyle, "%d Flaked", summary.NumberOfFlakedSpecs) - } - - s.print(0, - "%s -- %s | %s | %s | %s ", - status, - s.colorize(greenColor+boldStyle, "%d Passed", summary.NumberOfPassedSpecs), - s.colorize(redColor+boldStyle, "%d Failed", summary.NumberOfFailedSpecs)+flakes, - s.colorize(yellowColor+boldStyle, "%d Pending", summary.NumberOfPendingSpecs), - s.colorize(cyanColor+boldStyle, "%d Skipped", summary.NumberOfSkippedSpecs), - ) -} - -func (s *consoleStenographer) AnnounceSpecWillRun(spec *types.SpecSummary) { - s.startBlock() - for i, text := range spec.ComponentTexts[1 : len(spec.ComponentTexts)-1] { - s.print(0, s.colorize(alternatingColors[i%2], text)+" ") - } - - indentation := 0 - if len(spec.ComponentTexts) > 2 { - indentation = 1 - s.printNewLine() - } - index := len(spec.ComponentTexts) - 1 - s.print(indentation, s.colorize(boldStyle, spec.ComponentTexts[index])) - s.printNewLine() - s.print(indentation, s.colorize(lightGrayColor, spec.ComponentCodeLocations[index].String())) - s.printNewLine() - s.midBlock() -} - -func (s *consoleStenographer) AnnounceBeforeSuiteFailure(summary *types.SetupSummary, succinct bool, fullTrace bool) { - s.announceSetupFailure("BeforeSuite", summary, succinct, fullTrace) -} - -func (s *consoleStenographer) AnnounceAfterSuiteFailure(summary *types.SetupSummary, succinct bool, fullTrace bool) { - s.announceSetupFailure("AfterSuite", summary, succinct, fullTrace) -} - -func (s *consoleStenographer) announceSetupFailure(name string, summary *types.SetupSummary, succinct bool, fullTrace bool) { - s.startBlock() - var message string - switch summary.State { - case types.SpecStateFailed: - message = "Failure" - case types.SpecStatePanicked: - message = "Panic" - case types.SpecStateTimedOut: - message = "Timeout" - } - - s.println(0, s.colorize(redColor+boldStyle, "%s [%.3f seconds]", message, summary.RunTime.Seconds())) - - indentation := s.printCodeLocationBlock([]string{name}, []types.CodeLocation{summary.CodeLocation}, summary.ComponentType, 0, summary.State, true) - - s.printNewLine() - s.printFailure(indentation, summary.State, summary.Failure, fullTrace) - - s.endBlock() -} - -func (s *consoleStenographer) AnnounceCapturedOutput(output string) { - if output == "" { - return - } - - s.startBlock() - s.println(0, output) - s.midBlock() -} - -func (s *consoleStenographer) AnnounceSuccesfulSpec(spec *types.SpecSummary) { - s.print(0, s.colorize(greenColor, s.denoter)) - s.stream() -} - -func (s *consoleStenographer) AnnounceSuccesfulSlowSpec(spec *types.SpecSummary, succinct bool) { - s.printBlockWithMessage( - s.colorize(greenColor, "%s [SLOW TEST:%.3f seconds]", s.denoter, spec.RunTime.Seconds()), - "", - spec, - succinct, - ) -} - -func (s *consoleStenographer) AnnounceSuccesfulMeasurement(spec *types.SpecSummary, succinct bool) { - s.printBlockWithMessage( - s.colorize(greenColor, "%s [MEASUREMENT]", s.denoter), - s.measurementReport(spec, succinct), - spec, - succinct, - ) -} - -func (s *consoleStenographer) AnnouncePendingSpec(spec *types.SpecSummary, noisy bool) { - if noisy { - s.printBlockWithMessage( - s.colorize(yellowColor, "P [PENDING]"), - "", - spec, - false, - ) - } else { - s.print(0, s.colorize(yellowColor, "P")) - s.stream() - } -} - -func (s *consoleStenographer) AnnounceSkippedSpec(spec *types.SpecSummary, succinct bool, fullTrace bool) { - // Skips at runtime will have a non-empty spec.Failure. All others should be succinct. - if succinct || spec.Failure == (types.SpecFailure{}) { - s.print(0, s.colorize(cyanColor, "S")) - s.stream() - } else { - s.startBlock() - s.println(0, s.colorize(cyanColor+boldStyle, "S [SKIPPING]%s [%.3f seconds]", s.failureContext(spec.Failure.ComponentType), spec.RunTime.Seconds())) - - indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, spec.Failure.ComponentType, spec.Failure.ComponentIndex, spec.State, succinct) - - s.printNewLine() - s.printSkip(indentation, spec.Failure) - s.endBlock() - } -} - -func (s *consoleStenographer) AnnounceSpecTimedOut(spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.printSpecFailure(fmt.Sprintf("%s... Timeout", s.denoter), spec, succinct, fullTrace) -} - -func (s *consoleStenographer) AnnounceSpecPanicked(spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.printSpecFailure(fmt.Sprintf("%s! Panic", s.denoter), spec, succinct, fullTrace) -} - -func (s *consoleStenographer) AnnounceSpecFailed(spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.printSpecFailure(fmt.Sprintf("%s Failure", s.denoter), spec, succinct, fullTrace) -} - -func (s *consoleStenographer) SummarizeFailures(summaries []*types.SpecSummary) { - failingSpecs := []*types.SpecSummary{} - - for _, summary := range summaries { - if summary.HasFailureState() { - failingSpecs = append(failingSpecs, summary) - } - } - - if len(failingSpecs) == 0 { - return - } - - s.printNewLine() - s.printNewLine() - plural := "s" - if len(failingSpecs) == 1 { - plural = "" - } - s.println(0, s.colorize(redColor+boldStyle, "Summarizing %d Failure%s:", len(failingSpecs), plural)) - for _, summary := range failingSpecs { - s.printNewLine() - if summary.HasFailureState() { - if summary.TimedOut() { - s.print(0, s.colorize(redColor+boldStyle, "[Timeout...] ")) - } else if summary.Panicked() { - s.print(0, s.colorize(redColor+boldStyle, "[Panic!] ")) - } else if summary.Failed() { - s.print(0, s.colorize(redColor+boldStyle, "[Fail] ")) - } - s.printSpecContext(summary.ComponentTexts, summary.ComponentCodeLocations, summary.Failure.ComponentType, summary.Failure.ComponentIndex, summary.State, true) - s.printNewLine() - s.println(0, s.colorize(lightGrayColor, summary.Failure.Location.String())) - } - } -} - -func (s *consoleStenographer) startBlock() { - if s.cursorState == cursorStateStreaming { - s.printNewLine() - s.printDelimiter() - } else if s.cursorState == cursorStateMidBlock { - s.printNewLine() - } -} - -func (s *consoleStenographer) midBlock() { - s.cursorState = cursorStateMidBlock -} - -func (s *consoleStenographer) endBlock() { - s.printDelimiter() - s.cursorState = cursorStateEndBlock -} - -func (s *consoleStenographer) stream() { - s.cursorState = cursorStateStreaming -} - -func (s *consoleStenographer) printBlockWithMessage(header string, message string, spec *types.SpecSummary, succinct bool) { - s.startBlock() - s.println(0, header) - - indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, types.SpecComponentTypeInvalid, 0, spec.State, succinct) - - if message != "" { - s.printNewLine() - s.println(indentation, message) - } - - s.endBlock() -} - -func (s *consoleStenographer) printSpecFailure(message string, spec *types.SpecSummary, succinct bool, fullTrace bool) { - s.startBlock() - s.println(0, s.colorize(redColor+boldStyle, "%s%s [%.3f seconds]", message, s.failureContext(spec.Failure.ComponentType), spec.RunTime.Seconds())) - - indentation := s.printCodeLocationBlock(spec.ComponentTexts, spec.ComponentCodeLocations, spec.Failure.ComponentType, spec.Failure.ComponentIndex, spec.State, succinct) - - s.printNewLine() - s.printFailure(indentation, spec.State, spec.Failure, fullTrace) - s.endBlock() -} - -func (s *consoleStenographer) failureContext(failedComponentType types.SpecComponentType) string { - switch failedComponentType { - case types.SpecComponentTypeBeforeSuite: - return " in Suite Setup (BeforeSuite)" - case types.SpecComponentTypeAfterSuite: - return " in Suite Teardown (AfterSuite)" - case types.SpecComponentTypeBeforeEach: - return " in Spec Setup (BeforeEach)" - case types.SpecComponentTypeJustBeforeEach: - return " in Spec Setup (JustBeforeEach)" - case types.SpecComponentTypeAfterEach: - return " in Spec Teardown (AfterEach)" - } - - return "" -} - -func (s *consoleStenographer) printSkip(indentation int, spec types.SpecFailure) { - s.println(indentation, s.colorize(cyanColor, spec.Message)) - s.printNewLine() - s.println(indentation, spec.Location.String()) -} - -func (s *consoleStenographer) printFailure(indentation int, state types.SpecState, failure types.SpecFailure, fullTrace bool) { - if state == types.SpecStatePanicked { - s.println(indentation, s.colorize(redColor+boldStyle, failure.Message)) - s.println(indentation, s.colorize(redColor, failure.ForwardedPanic)) - s.println(indentation, failure.Location.String()) - s.printNewLine() - s.println(indentation, s.colorize(redColor, "Full Stack Trace")) - s.println(indentation, failure.Location.FullStackTrace) - } else { - s.println(indentation, s.colorize(redColor, failure.Message)) - s.printNewLine() - s.println(indentation, failure.Location.String()) - if fullTrace { - s.printNewLine() - s.println(indentation, s.colorize(redColor, "Full Stack Trace")) - s.println(indentation, failure.Location.FullStackTrace) - } - } -} - -func (s *consoleStenographer) printSpecContext(componentTexts []string, componentCodeLocations []types.CodeLocation, failedComponentType types.SpecComponentType, failedComponentIndex int, state types.SpecState, succinct bool) int { - startIndex := 1 - indentation := 0 - - if len(componentTexts) == 1 { - startIndex = 0 - } - - for i := startIndex; i < len(componentTexts); i++ { - if (state.IsFailure() || state == types.SpecStateSkipped) && i == failedComponentIndex { - color := redColor - if state == types.SpecStateSkipped { - color = cyanColor - } - blockType := "" - switch failedComponentType { - case types.SpecComponentTypeBeforeSuite: - blockType = "BeforeSuite" - case types.SpecComponentTypeAfterSuite: - blockType = "AfterSuite" - case types.SpecComponentTypeBeforeEach: - blockType = "BeforeEach" - case types.SpecComponentTypeJustBeforeEach: - blockType = "JustBeforeEach" - case types.SpecComponentTypeAfterEach: - blockType = "AfterEach" - case types.SpecComponentTypeIt: - blockType = "It" - case types.SpecComponentTypeMeasure: - blockType = "Measurement" - } - if succinct { - s.print(0, s.colorize(color+boldStyle, "[%s] %s ", blockType, componentTexts[i])) - } else { - s.println(indentation, s.colorize(color+boldStyle, "%s [%s]", componentTexts[i], blockType)) - s.println(indentation, s.colorize(grayColor, "%s", componentCodeLocations[i])) - } - } else { - if succinct { - s.print(0, s.colorize(alternatingColors[i%2], "%s ", componentTexts[i])) - } else { - s.println(indentation, componentTexts[i]) - s.println(indentation, s.colorize(grayColor, "%s", componentCodeLocations[i])) - } - } - indentation++ - } - - return indentation -} - -func (s *consoleStenographer) printCodeLocationBlock(componentTexts []string, componentCodeLocations []types.CodeLocation, failedComponentType types.SpecComponentType, failedComponentIndex int, state types.SpecState, succinct bool) int { - indentation := s.printSpecContext(componentTexts, componentCodeLocations, failedComponentType, failedComponentIndex, state, succinct) - - if succinct { - if len(componentTexts) > 0 { - s.printNewLine() - s.print(0, s.colorize(lightGrayColor, "%s", componentCodeLocations[len(componentCodeLocations)-1])) - } - s.printNewLine() - indentation = 1 - } else { - indentation-- - } - - return indentation -} - -func (s *consoleStenographer) orderedMeasurementKeys(measurements map[string]*types.SpecMeasurement) []string { - orderedKeys := make([]string, len(measurements)) - for key, measurement := range measurements { - orderedKeys[measurement.Order] = key - } - return orderedKeys -} - -func (s *consoleStenographer) measurementReport(spec *types.SpecSummary, succinct bool) string { - if len(spec.Measurements) == 0 { - return "Found no measurements" - } - - message := []string{} - orderedKeys := s.orderedMeasurementKeys(spec.Measurements) - - if succinct { - message = append(message, fmt.Sprintf("%s samples:", s.colorize(boldStyle, "%d", spec.NumberOfSamples))) - for _, key := range orderedKeys { - measurement := spec.Measurements[key] - message = append(message, fmt.Sprintf(" %s - %s: %s%s, %s: %s%s ± %s%s, %s: %s%s", - s.colorize(boldStyle, "%s", measurement.Name), - measurement.SmallestLabel, - s.colorize(greenColor, measurement.PrecisionFmt(), measurement.Smallest), - measurement.Units, - measurement.AverageLabel, - s.colorize(cyanColor, measurement.PrecisionFmt(), measurement.Average), - measurement.Units, - s.colorize(cyanColor, measurement.PrecisionFmt(), measurement.StdDeviation), - measurement.Units, - measurement.LargestLabel, - s.colorize(redColor, measurement.PrecisionFmt(), measurement.Largest), - measurement.Units, - )) - } - } else { - message = append(message, fmt.Sprintf("Ran %s samples:", s.colorize(boldStyle, "%d", spec.NumberOfSamples))) - for _, key := range orderedKeys { - measurement := spec.Measurements[key] - info := "" - if measurement.Info != nil { - message = append(message, fmt.Sprintf("%v", measurement.Info)) - } - - message = append(message, fmt.Sprintf("%s:\n%s %s: %s%s\n %s: %s%s\n %s: %s%s ± %s%s", - s.colorize(boldStyle, "%s", measurement.Name), - info, - measurement.SmallestLabel, - s.colorize(greenColor, measurement.PrecisionFmt(), measurement.Smallest), - measurement.Units, - measurement.LargestLabel, - s.colorize(redColor, measurement.PrecisionFmt(), measurement.Largest), - measurement.Units, - measurement.AverageLabel, - s.colorize(cyanColor, measurement.PrecisionFmt(), measurement.Average), - measurement.Units, - s.colorize(cyanColor, measurement.PrecisionFmt(), measurement.StdDeviation), - measurement.Units, - )) - } - } - - return strings.Join(message, "\n") -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_others.go deleted file mode 100644 index 52d6653b3..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/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/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_windows.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_windows.go deleted file mode 100644 index 108800923..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/colorable_windows.go +++ /dev/null @@ -1,783 +0,0 @@ -package colorable - -import ( - "bytes" - "fmt" - "io" - "math" - "os" - "strconv" - "strings" - "syscall" - "unsafe" - - "github.com/onsi/ginkgo/reporters/stenographer/support/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 -} - -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") -) - -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.x = short(n1) - procSetConsoleCursorPosition.Call(uintptr(w.handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition))) - case 'J': - n, err := strconv.Atoi(buf.String()) - if err != nil { - continue - } - 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 - } - 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': - 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) - 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 & foregroundMask) - 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)) - } - } - } - } - 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/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-colorable/noncolorable.go deleted file mode 100644 index fb976dbd8..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/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/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go deleted file mode 100644 index 17d4f90eb..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package isatty implements interface to isatty -package isatty diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go deleted file mode 100644 index 83c588773..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_appengine.go +++ /dev/null @@ -1,9 +0,0 @@ -// +build appengine - -package isatty - -// IsTerminal returns true if the file descriptor is terminal which -// is always false on on appengine classic which is a sandboxed PaaS. -func IsTerminal(fd uintptr) bool { - return false -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go deleted file mode 100644 index 98ffe86a4..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_bsd.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build darwin freebsd openbsd netbsd -// +build !appengine - -package isatty - -import ( - "syscall" - "unsafe" -) - -const ioctlReadTermios = syscall.TIOCGETA - -// IsTerminal return true if the file descriptor is terminal. -func IsTerminal(fd uintptr) bool { - var termios syscall.Termios - _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) - return err == 0 -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go deleted file mode 100644 index 9d24bac1d..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_linux.go +++ /dev/null @@ -1,18 +0,0 @@ -// +build linux -// +build !appengine - -package isatty - -import ( - "syscall" - "unsafe" -) - -const ioctlReadTermios = syscall.TCGETS - -// IsTerminal return true if the file descriptor is terminal. -func IsTerminal(fd uintptr) bool { - var termios syscall.Termios - _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) - return err == 0 -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go deleted file mode 100644 index 1f0c6bf53..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_solaris.go +++ /dev/null @@ -1,16 +0,0 @@ -// +build solaris -// +build !appengine - -package isatty - -import ( - "golang.org/x/sys/unix" -) - -// IsTerminal returns true if the given file descriptor is a terminal. -// see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c -func IsTerminal(fd uintptr) bool { - var termio unix.Termio - err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) - return err == nil -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go b/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go deleted file mode 100644 index 83c398b16..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/stenographer/support/go-isatty/isatty_windows.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build windows -// +build !appengine - -package isatty - -import ( - "syscall" - "unsafe" -) - -var kernel32 = syscall.NewLazyDLL("kernel32.dll") -var procGetConsoleMode = kernel32.NewProc("GetConsoleMode") - -// IsTerminal return true if the file descriptor is terminal. -func IsTerminal(fd uintptr) bool { - var st uint32 - r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0) - return r != 0 && e == 0 -} diff --git a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go b/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go deleted file mode 100644 index 36ee2a600..000000000 --- a/vendor/github.com/onsi/ginkgo/reporters/teamcity_reporter.go +++ /dev/null @@ -1,93 +0,0 @@ -/* - -TeamCity Reporter for Ginkgo - -Makes use of TeamCity's support for Service Messages -http://confluence.jetbrains.com/display/TCD7/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests -*/ - -package reporters - -import ( - "fmt" - "io" - "strings" - - "github.com/onsi/ginkgo/config" - "github.com/onsi/ginkgo/types" -) - -const ( - messageId = "##teamcity" -) - -type TeamCityReporter struct { - writer io.Writer - testSuiteName string -} - -func NewTeamCityReporter(writer io.Writer) *TeamCityReporter { - return &TeamCityReporter{ - writer: writer, - } -} - -func (reporter *TeamCityReporter) SpecSuiteWillBegin(config config.GinkgoConfigType, summary *types.SuiteSummary) { - reporter.testSuiteName = escape(summary.SuiteDescription) - fmt.Fprintf(reporter.writer, "%s[testSuiteStarted name='%s']", messageId, reporter.testSuiteName) -} - -func (reporter *TeamCityReporter) BeforeSuiteDidRun(setupSummary *types.SetupSummary) { - reporter.handleSetupSummary("BeforeSuite", setupSummary) -} - -func (reporter *TeamCityReporter) AfterSuiteDidRun(setupSummary *types.SetupSummary) { - reporter.handleSetupSummary("AfterSuite", setupSummary) -} - -func (reporter *TeamCityReporter) handleSetupSummary(name string, setupSummary *types.SetupSummary) { - if setupSummary.State != types.SpecStatePassed { - testName := escape(name) - fmt.Fprintf(reporter.writer, "%s[testStarted name='%s']", messageId, testName) - message := escape(setupSummary.Failure.ComponentCodeLocation.String()) - details := escape(setupSummary.Failure.Message) - fmt.Fprintf(reporter.writer, "%s[testFailed name='%s' message='%s' details='%s']", messageId, testName, message, details) - durationInMilliseconds := setupSummary.RunTime.Seconds() * 1000 - fmt.Fprintf(reporter.writer, "%s[testFinished name='%s' duration='%v']", messageId, testName, durationInMilliseconds) - } -} - -func (reporter *TeamCityReporter) SpecWillRun(specSummary *types.SpecSummary) { - testName := escape(strings.Join(specSummary.ComponentTexts[1:], " ")) - fmt.Fprintf(reporter.writer, "%s[testStarted name='%s']", messageId, testName) -} - -func (reporter *TeamCityReporter) SpecDidComplete(specSummary *types.SpecSummary) { - testName := escape(strings.Join(specSummary.ComponentTexts[1:], " ")) - - if specSummary.State == types.SpecStateFailed || specSummary.State == types.SpecStateTimedOut || specSummary.State == types.SpecStatePanicked { - message := escape(specSummary.Failure.ComponentCodeLocation.String()) - details := escape(specSummary.Failure.Message) - fmt.Fprintf(reporter.writer, "%s[testFailed name='%s' message='%s' details='%s']", messageId, testName, message, details) - } - if specSummary.State == types.SpecStateSkipped || specSummary.State == types.SpecStatePending { - fmt.Fprintf(reporter.writer, "%s[testIgnored name='%s']", messageId, testName) - } - - durationInMilliseconds := specSummary.RunTime.Seconds() * 1000 - fmt.Fprintf(reporter.writer, "%s[testFinished name='%s' duration='%v']", messageId, testName, durationInMilliseconds) -} - -func (reporter *TeamCityReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) { - fmt.Fprintf(reporter.writer, "%s[testSuiteFinished name='%s']", messageId, reporter.testSuiteName) -} - -func escape(output string) string { - output = strings.Replace(output, "|", "||", -1) - output = strings.Replace(output, "'", "|'", -1) - output = strings.Replace(output, "\n", "|n", -1) - output = strings.Replace(output, "\r", "|r", -1) - output = strings.Replace(output, "[", "|[", -1) - output = strings.Replace(output, "]", "|]", -1) - return output -} diff --git a/vendor/github.com/onsi/ginkgo/types/code_location.go b/vendor/github.com/onsi/ginkgo/types/code_location.go deleted file mode 100644 index 935a89e13..000000000 --- a/vendor/github.com/onsi/ginkgo/types/code_location.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -import ( - "fmt" -) - -type CodeLocation struct { - FileName string - LineNumber int - FullStackTrace string -} - -func (codeLocation CodeLocation) String() string { - return fmt.Sprintf("%s:%d", codeLocation.FileName, codeLocation.LineNumber) -} diff --git a/vendor/github.com/onsi/ginkgo/types/synchronization.go b/vendor/github.com/onsi/ginkgo/types/synchronization.go deleted file mode 100644 index fdd6ed5bd..000000000 --- a/vendor/github.com/onsi/ginkgo/types/synchronization.go +++ /dev/null @@ -1,30 +0,0 @@ -package types - -import ( - "encoding/json" -) - -type RemoteBeforeSuiteState int - -const ( - RemoteBeforeSuiteStateInvalid RemoteBeforeSuiteState = iota - - RemoteBeforeSuiteStatePending - RemoteBeforeSuiteStatePassed - RemoteBeforeSuiteStateFailed - RemoteBeforeSuiteStateDisappeared -) - -type RemoteBeforeSuiteData struct { - Data []byte - State RemoteBeforeSuiteState -} - -func (r RemoteBeforeSuiteData) ToJSON() []byte { - data, _ := json.Marshal(r) - return data -} - -type RemoteAfterSuiteData struct { - CanRun bool -} diff --git a/vendor/github.com/onsi/ginkgo/types/types.go b/vendor/github.com/onsi/ginkgo/types/types.go deleted file mode 100644 index baf1bd1c4..000000000 --- a/vendor/github.com/onsi/ginkgo/types/types.go +++ /dev/null @@ -1,173 +0,0 @@ -package types - -import ( - "strconv" - "time" -) - -const GINKGO_FOCUS_EXIT_CODE = 197 - -/* -SuiteSummary represents the a summary of the test suite and is passed to both -Reporter.SpecSuiteWillBegin -Reporter.SpecSuiteDidEnd - -this is unfortunate as these two methods should receive different objects. When running in parallel -each node does not deterministically know how many specs it will end up running. - -Unfortunately making such a change would break backward compatibility. - -Until Ginkgo 2.0 comes out we will continue to reuse this struct but populate unkown fields -with -1. -*/ -type SuiteSummary struct { - SuiteDescription string - SuiteSucceeded bool - SuiteID string - - NumberOfSpecsBeforeParallelization int - NumberOfTotalSpecs int - NumberOfSpecsThatWillBeRun int - NumberOfPendingSpecs int - NumberOfSkippedSpecs int - NumberOfPassedSpecs int - NumberOfFailedSpecs int - // Flaked specs are those that failed initially, but then passed on a - // subsequent try. - NumberOfFlakedSpecs int - RunTime time.Duration -} - -type SpecSummary struct { - ComponentTexts []string - ComponentCodeLocations []CodeLocation - - State SpecState - RunTime time.Duration - Failure SpecFailure - IsMeasurement bool - NumberOfSamples int - Measurements map[string]*SpecMeasurement - - CapturedOutput string - SuiteID string -} - -func (s SpecSummary) HasFailureState() bool { - return s.State.IsFailure() -} - -func (s SpecSummary) TimedOut() bool { - return s.State == SpecStateTimedOut -} - -func (s SpecSummary) Panicked() bool { - return s.State == SpecStatePanicked -} - -func (s SpecSummary) Failed() bool { - return s.State == SpecStateFailed -} - -func (s SpecSummary) Passed() bool { - return s.State == SpecStatePassed -} - -func (s SpecSummary) Skipped() bool { - return s.State == SpecStateSkipped -} - -func (s SpecSummary) Pending() bool { - return s.State == SpecStatePending -} - -type SetupSummary struct { - ComponentType SpecComponentType - CodeLocation CodeLocation - - State SpecState - RunTime time.Duration - Failure SpecFailure - - CapturedOutput string - SuiteID string -} - -type SpecFailure struct { - Message string - Location CodeLocation - ForwardedPanic string - - ComponentIndex int - ComponentType SpecComponentType - ComponentCodeLocation CodeLocation -} - -type SpecMeasurement struct { - Name string - Info interface{} - Order int - - Results []float64 - - Smallest float64 - Largest float64 - Average float64 - StdDeviation float64 - - SmallestLabel string - LargestLabel string - AverageLabel string - Units string - Precision int -} - -func (s SpecMeasurement) PrecisionFmt() string { - if s.Precision == 0 { - return "%f" - } - - str := strconv.Itoa(s.Precision) - - return "%." + str + "f" -} - -type SpecState uint - -const ( - SpecStateInvalid SpecState = iota - - SpecStatePending - SpecStateSkipped - SpecStatePassed - SpecStateFailed - SpecStatePanicked - SpecStateTimedOut -) - -func (state SpecState) IsFailure() bool { - return state == SpecStateTimedOut || state == SpecStatePanicked || state == SpecStateFailed -} - -type SpecComponentType uint - -const ( - SpecComponentTypeInvalid SpecComponentType = iota - - SpecComponentTypeContainer - SpecComponentTypeBeforeSuite - SpecComponentTypeAfterSuite - SpecComponentTypeBeforeEach - SpecComponentTypeJustBeforeEach - SpecComponentTypeAfterEach - SpecComponentTypeIt - SpecComponentTypeMeasure -) - -type FlagType uint - -const ( - FlagTypeNone FlagType = iota - FlagTypeFocused - FlagTypePending -) diff --git a/vendor/github.com/onsi/gomega/LICENSE b/vendor/github.com/onsi/gomega/LICENSE deleted file mode 100644 index 9415ee72c..000000000 --- a/vendor/github.com/onsi/gomega/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2013-2014 Onsi Fakhouri - -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/onsi/gomega/format/format.go b/vendor/github.com/onsi/gomega/format/format.go deleted file mode 100644 index 22c8751a3..000000000 --- a/vendor/github.com/onsi/gomega/format/format.go +++ /dev/null @@ -1,379 +0,0 @@ -/* -Gomega's format package pretty-prints objects. It explores input objects recursively and generates formatted, indented output with type information. -*/ -package format - -import ( - "fmt" - "reflect" - "strconv" - "strings" - "time" -) - -// Use MaxDepth to set the maximum recursion depth when printing deeply nested objects -var MaxDepth = uint(10) - -/* -By default, all objects (even those that implement fmt.Stringer and fmt.GoStringer) are recursively inspected to generate output. - -Set UseStringerRepresentation = true to use GoString (for fmt.GoStringers) or String (for fmt.Stringer) instead. - -Note that GoString and String don't always have all the information you need to understand why a test failed! -*/ -var UseStringerRepresentation = false - -/* -Print the content of context objects. By default it will be suppressed. - -Set PrintContextObjects = true to enable printing of the context internals. -*/ -var PrintContextObjects = false - -// Ctx interface defined here to keep backwards compatability with go < 1.7 -// It matches the context.Context interface -type Ctx interface { - Deadline() (deadline time.Time, ok bool) - Done() <-chan struct{} - Err() error - Value(key interface{}) interface{} -} - -var contextType = reflect.TypeOf((*Ctx)(nil)).Elem() -var timeType = reflect.TypeOf(time.Time{}) - -//The default indentation string emitted by the format package -var Indent = " " - -var longFormThreshold = 20 - -/* -Generates a formatted matcher success/failure message of the form: - - Expected - - - - -If expected is omited, then the message looks like: - - Expected - - -*/ -func Message(actual interface{}, message string, expected ...interface{}) string { - if len(expected) == 0 { - return fmt.Sprintf("Expected\n%s\n%s", Object(actual, 1), message) - } - return fmt.Sprintf("Expected\n%s\n%s\n%s", Object(actual, 1), message, Object(expected[0], 1)) -} - -/* - -Generates a nicely formatted matcher success / failure message - -Much like Message(...), but it attempts to pretty print diffs in strings - -Expected - : "...aaaaabaaaaa..." -to equal | - : "...aaaaazaaaaa..." - -*/ - -func MessageWithDiff(actual, message, expected string) string { - if len(actual) >= truncateThreshold && len(expected) >= truncateThreshold { - diffPoint := findFirstMismatch(actual, expected) - formattedActual := truncateAndFormat(actual, diffPoint) - formattedExpected := truncateAndFormat(expected, diffPoint) - - spacesBeforeFormattedMismatch := findFirstMismatch(formattedActual, formattedExpected) - - tabLength := 4 - spaceFromMessageToActual := tabLength + len(": ") - len(message) - padding := strings.Repeat(" ", spaceFromMessageToActual+spacesBeforeFormattedMismatch) + "|" - return Message(formattedActual, message+padding, formattedExpected) - } - return Message(actual, message, expected) -} - -func truncateAndFormat(str string, index int) string { - leftPadding := `...` - rightPadding := `...` - - start := index - charactersAroundMismatchToInclude - if start < 0 { - start = 0 - leftPadding = "" - } - - // slice index must include the mis-matched character - lengthOfMismatchedCharacter := 1 - end := index + charactersAroundMismatchToInclude + lengthOfMismatchedCharacter - if end > len(str) { - end = len(str) - rightPadding = "" - - } - return fmt.Sprintf("\"%s\"", leftPadding+str[start:end]+rightPadding) -} - -func findFirstMismatch(a, b string) int { - aSlice := strings.Split(a, "") - bSlice := strings.Split(b, "") - - for index, str := range aSlice { - if index > len(bSlice)-1 { - return index - } - if str != bSlice[index] { - return index - } - } - - if len(b) > len(a) { - return len(a) + 1 - } - - return 0 -} - -const ( - truncateThreshold = 50 - charactersAroundMismatchToInclude = 5 -) - -/* -Pretty prints the passed in object at the passed in indentation level. - -Object recurses into deeply nested objects emitting pretty-printed representations of their components. - -Modify format.MaxDepth to control how deep the recursion is allowed to go -Set format.UseStringerRepresentation to true to return object.GoString() or object.String() when available instead of -recursing into the object. - -Set PrintContextObjects to true to print the content of objects implementing context.Context -*/ -func Object(object interface{}, indentation uint) string { - indent := strings.Repeat(Indent, int(indentation)) - value := reflect.ValueOf(object) - return fmt.Sprintf("%s<%s>: %s", indent, formatType(object), formatValue(value, indentation)) -} - -/* -IndentString takes a string and indents each line by the specified amount. -*/ -func IndentString(s string, indentation uint) string { - components := strings.Split(s, "\n") - result := "" - indent := strings.Repeat(Indent, int(indentation)) - for i, component := range components { - result += indent + component - if i < len(components)-1 { - result += "\n" - } - } - - return result -} - -func formatType(object interface{}) string { - t := reflect.TypeOf(object) - if t == nil { - return "nil" - } - switch t.Kind() { - case reflect.Chan: - v := reflect.ValueOf(object) - return fmt.Sprintf("%T | len:%d, cap:%d", object, v.Len(), v.Cap()) - case reflect.Ptr: - return fmt.Sprintf("%T | %p", object, object) - case reflect.Slice: - v := reflect.ValueOf(object) - return fmt.Sprintf("%T | len:%d, cap:%d", object, v.Len(), v.Cap()) - case reflect.Map: - v := reflect.ValueOf(object) - return fmt.Sprintf("%T | len:%d", object, v.Len()) - default: - return fmt.Sprintf("%T", object) - } -} - -func formatValue(value reflect.Value, indentation uint) string { - if indentation > MaxDepth { - return "..." - } - - if isNilValue(value) { - return "nil" - } - - if UseStringerRepresentation { - if value.CanInterface() { - obj := value.Interface() - switch x := obj.(type) { - case fmt.GoStringer: - return x.GoString() - case fmt.Stringer: - return x.String() - } - } - } - - if !PrintContextObjects { - if value.Type().Implements(contextType) && indentation > 1 { - return "" - } - } - - switch value.Kind() { - case reflect.Bool: - return fmt.Sprintf("%v", value.Bool()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return fmt.Sprintf("%v", value.Int()) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return fmt.Sprintf("%v", value.Uint()) - case reflect.Uintptr: - return fmt.Sprintf("0x%x", value.Uint()) - case reflect.Float32, reflect.Float64: - return fmt.Sprintf("%v", value.Float()) - case reflect.Complex64, reflect.Complex128: - return fmt.Sprintf("%v", value.Complex()) - case reflect.Chan: - return fmt.Sprintf("0x%x", value.Pointer()) - case reflect.Func: - return fmt.Sprintf("0x%x", value.Pointer()) - case reflect.Ptr: - return formatValue(value.Elem(), indentation) - case reflect.Slice: - return formatSlice(value, indentation) - case reflect.String: - return formatString(value.String(), indentation) - case reflect.Array: - return formatSlice(value, indentation) - case reflect.Map: - return formatMap(value, indentation) - case reflect.Struct: - if value.Type() == timeType && value.CanInterface() { - t, _ := value.Interface().(time.Time) - return t.Format(time.RFC3339Nano) - } - return formatStruct(value, indentation) - case reflect.Interface: - return formatValue(value.Elem(), indentation) - default: - if value.CanInterface() { - return fmt.Sprintf("%#v", value.Interface()) - } - return fmt.Sprintf("%#v", value) - } -} - -func formatString(object interface{}, indentation uint) string { - if indentation == 1 { - s := fmt.Sprintf("%s", object) - components := strings.Split(s, "\n") - result := "" - for i, component := range components { - if i == 0 { - result += component - } else { - result += Indent + component - } - if i < len(components)-1 { - result += "\n" - } - } - - return fmt.Sprintf("%s", result) - } else { - return fmt.Sprintf("%q", object) - } -} - -func formatSlice(v reflect.Value, indentation uint) string { - if v.Kind() == reflect.Slice && v.Type().Elem().Kind() == reflect.Uint8 && isPrintableString(string(v.Bytes())) { - return formatString(v.Bytes(), indentation) - } - - l := v.Len() - result := make([]string, l) - longest := 0 - for i := 0; i < l; i++ { - result[i] = formatValue(v.Index(i), indentation+1) - if len(result[i]) > longest { - longest = len(result[i]) - } - } - - if longest > longFormThreshold { - indenter := strings.Repeat(Indent, int(indentation)) - return fmt.Sprintf("[\n%s%s,\n%s]", indenter+Indent, strings.Join(result, ",\n"+indenter+Indent), indenter) - } - return fmt.Sprintf("[%s]", strings.Join(result, ", ")) -} - -func formatMap(v reflect.Value, indentation uint) string { - l := v.Len() - result := make([]string, l) - - longest := 0 - for i, key := range v.MapKeys() { - value := v.MapIndex(key) - result[i] = fmt.Sprintf("%s: %s", formatValue(key, indentation+1), formatValue(value, indentation+1)) - if len(result[i]) > longest { - longest = len(result[i]) - } - } - - if longest > longFormThreshold { - indenter := strings.Repeat(Indent, int(indentation)) - return fmt.Sprintf("{\n%s%s,\n%s}", indenter+Indent, strings.Join(result, ",\n"+indenter+Indent), indenter) - } - return fmt.Sprintf("{%s}", strings.Join(result, ", ")) -} - -func formatStruct(v reflect.Value, indentation uint) string { - t := v.Type() - - l := v.NumField() - result := []string{} - longest := 0 - for i := 0; i < l; i++ { - structField := t.Field(i) - fieldEntry := v.Field(i) - representation := fmt.Sprintf("%s: %s", structField.Name, formatValue(fieldEntry, indentation+1)) - result = append(result, representation) - if len(representation) > longest { - longest = len(representation) - } - } - if longest > longFormThreshold { - indenter := strings.Repeat(Indent, int(indentation)) - return fmt.Sprintf("{\n%s%s,\n%s}", indenter+Indent, strings.Join(result, ",\n"+indenter+Indent), indenter) - } - return fmt.Sprintf("{%s}", strings.Join(result, ", ")) -} - -func isNilValue(a reflect.Value) bool { - switch a.Kind() { - case reflect.Invalid: - return true - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return a.IsNil() - } - - return false -} - -/* -Returns true when the string is entirely made of printable runes, false otherwise. -*/ -func isPrintableString(str string) bool { - for _, runeValue := range str { - if !strconv.IsPrint(runeValue) { - return false - } - } - return true -} diff --git a/vendor/github.com/onsi/gomega/gbytes/buffer.go b/vendor/github.com/onsi/gomega/gbytes/buffer.go deleted file mode 100644 index 336086f4a..000000000 --- a/vendor/github.com/onsi/gomega/gbytes/buffer.go +++ /dev/null @@ -1,245 +0,0 @@ -/* -Package gbytes provides a buffer that supports incrementally detecting input. - -You use gbytes.Buffer with the gbytes.Say matcher. When Say finds a match, it fastforwards the buffer's read cursor to the end of that match. - -Subsequent matches against the buffer will only operate against data that appears *after* the read cursor. - -The read cursor is an opaque implementation detail that you cannot access. You should use the Say matcher to sift through the buffer. You can always -access the entire buffer's contents with Contents(). - -*/ -package gbytes - -import ( - "errors" - "fmt" - "io" - "regexp" - "sync" - "time" -) - -/* -gbytes.Buffer implements an io.Writer and can be used with the gbytes.Say matcher. - -You should only use a gbytes.Buffer in test code. It stores all writes in an in-memory buffer - behavior that is inappropriate for production code! -*/ -type Buffer struct { - contents []byte - readCursor uint64 - lock *sync.Mutex - detectCloser chan interface{} - closed bool -} - -/* -NewBuffer returns a new gbytes.Buffer -*/ -func NewBuffer() *Buffer { - return &Buffer{ - lock: &sync.Mutex{}, - } -} - -/* -BufferWithBytes returns a new gbytes.Buffer seeded with the passed in bytes -*/ -func BufferWithBytes(bytes []byte) *Buffer { - return &Buffer{ - lock: &sync.Mutex{}, - contents: bytes, - } -} - -/* -BufferReader returns a new gbytes.Buffer that wraps a reader. The reader's contents are read into -the Buffer via io.Copy -*/ -func BufferReader(reader io.Reader) *Buffer { - b := &Buffer{ - lock: &sync.Mutex{}, - } - - go func() { - io.Copy(b, reader) - b.Close() - }() - - return b -} - -/* -Write implements the io.Writer interface -*/ -func (b *Buffer) Write(p []byte) (n int, err error) { - b.lock.Lock() - defer b.lock.Unlock() - - if b.closed { - return 0, errors.New("attempt to write to closed buffer") - } - - b.contents = append(b.contents, p...) - return len(p), nil -} - -/* -Read implements the io.Reader interface. It advances the -cursor as it reads. - -Returns an error if called after Close. -*/ -func (b *Buffer) Read(d []byte) (int, error) { - b.lock.Lock() - defer b.lock.Unlock() - - if b.closed { - return 0, errors.New("attempt to read from closed buffer") - } - - if uint64(len(b.contents)) <= b.readCursor { - return 0, io.EOF - } - - n := copy(d, b.contents[b.readCursor:]) - b.readCursor += uint64(n) - - return n, nil -} - -/* -Close signifies that the buffer will no longer be written to -*/ -func (b *Buffer) Close() error { - b.lock.Lock() - defer b.lock.Unlock() - - b.closed = true - - return nil -} - -/* -Closed returns true if the buffer has been closed -*/ -func (b *Buffer) Closed() bool { - b.lock.Lock() - defer b.lock.Unlock() - - return b.closed -} - -/* -Contents returns all data ever written to the buffer. -*/ -func (b *Buffer) Contents() []byte { - b.lock.Lock() - defer b.lock.Unlock() - - contents := make([]byte, len(b.contents)) - copy(contents, b.contents) - return contents -} - -/* -Detect takes a regular expression and returns a channel. - -The channel will receive true the first time data matching the regular expression is written to the buffer. -The channel is subsequently closed and the buffer's read-cursor is fast-forwarded to just after the matching region. - -You typically don't need to use Detect and should use the ghttp.Say matcher instead. Detect is useful, however, in cases where your code must -be branch and handle different outputs written to the buffer. - -For example, consider a buffer hooked up to the stdout of a client library. You may (or may not, depending on state outside of your control) need to authenticate the client library. - -You could do something like: - -select { -case <-buffer.Detect("You are not logged in"): - //log in -case <-buffer.Detect("Success"): - //carry on -case <-time.After(time.Second): - //welp -} -buffer.CancelDetects() - -You should always call CancelDetects after using Detect. This will close any channels that have not detected and clean up the goroutines that were spawned to support them. - -Finally, you can pass detect a format string followed by variadic arguments. This will construct the regexp using fmt.Sprintf. -*/ -func (b *Buffer) Detect(desired string, args ...interface{}) chan bool { - formattedRegexp := desired - if len(args) > 0 { - formattedRegexp = fmt.Sprintf(desired, args...) - } - re := regexp.MustCompile(formattedRegexp) - - b.lock.Lock() - defer b.lock.Unlock() - - if b.detectCloser == nil { - b.detectCloser = make(chan interface{}) - } - - closer := b.detectCloser - response := make(chan bool) - go func() { - ticker := time.NewTicker(10 * time.Millisecond) - defer ticker.Stop() - defer close(response) - for { - select { - case <-ticker.C: - b.lock.Lock() - data, cursor := b.contents[b.readCursor:], b.readCursor - loc := re.FindIndex(data) - b.lock.Unlock() - - if loc != nil { - response <- true - b.lock.Lock() - newCursorPosition := cursor + uint64(loc[1]) - if newCursorPosition >= b.readCursor { - b.readCursor = newCursorPosition - } - b.lock.Unlock() - return - } - case <-closer: - return - } - } - }() - - return response -} - -/* -CancelDetects cancels any pending detects and cleans up their goroutines. You should always call this when you're done with a set of Detect channels. -*/ -func (b *Buffer) CancelDetects() { - b.lock.Lock() - defer b.lock.Unlock() - - close(b.detectCloser) - b.detectCloser = nil -} - -func (b *Buffer) didSay(re *regexp.Regexp) (bool, []byte) { - b.lock.Lock() - defer b.lock.Unlock() - - unreadBytes := b.contents[b.readCursor:] - copyOfUnreadBytes := make([]byte, len(unreadBytes)) - copy(copyOfUnreadBytes, unreadBytes) - - loc := re.FindIndex(unreadBytes) - - if loc != nil { - b.readCursor += uint64(loc[1]) - return true, copyOfUnreadBytes - } - return false, copyOfUnreadBytes -} diff --git a/vendor/github.com/onsi/gomega/gbytes/io_wrappers.go b/vendor/github.com/onsi/gomega/gbytes/io_wrappers.go deleted file mode 100644 index 3caed8769..000000000 --- a/vendor/github.com/onsi/gomega/gbytes/io_wrappers.go +++ /dev/null @@ -1,85 +0,0 @@ -package gbytes - -import ( - "errors" - "io" - "time" -) - -// ErrTimeout is returned by TimeoutCloser, TimeoutReader, and TimeoutWriter when the underlying Closer/Reader/Writer does not return within the specified timeout -var ErrTimeout = errors.New("timeout occurred") - -// TimeoutCloser returns an io.Closer that wraps the passed-in io.Closer. If the underlying Closer fails to close within the alloted timeout ErrTimeout is returned. -func TimeoutCloser(c io.Closer, timeout time.Duration) io.Closer { - return timeoutReaderWriterCloser{c: c, d: timeout} -} - -// TimeoutReader returns an io.Reader that wraps the passed-in io.Reader. If the underlying Reader fails to read within the alloted timeout ErrTimeout is returned. -func TimeoutReader(r io.Reader, timeout time.Duration) io.Reader { - return timeoutReaderWriterCloser{r: r, d: timeout} -} - -// TimeoutWriter returns an io.Writer that wraps the passed-in io.Writer. If the underlying Writer fails to write within the alloted timeout ErrTimeout is returned. -func TimeoutWriter(w io.Writer, timeout time.Duration) io.Writer { - return timeoutReaderWriterCloser{w: w, d: timeout} -} - -type timeoutReaderWriterCloser struct { - c io.Closer - w io.Writer - r io.Reader - d time.Duration -} - -func (t timeoutReaderWriterCloser) Close() error { - done := make(chan struct{}) - var err error - - go func() { - err = t.c.Close() - close(done) - }() - - select { - case <-done: - return err - case <-time.After(t.d): - return ErrTimeout - } -} - -func (t timeoutReaderWriterCloser) Read(p []byte) (int, error) { - done := make(chan struct{}) - var n int - var err error - - go func() { - n, err = t.r.Read(p) - close(done) - }() - - select { - case <-done: - return n, err - case <-time.After(t.d): - return 0, ErrTimeout - } -} - -func (t timeoutReaderWriterCloser) Write(p []byte) (int, error) { - done := make(chan struct{}) - var n int - var err error - - go func() { - n, err = t.w.Write(p) - close(done) - }() - - select { - case <-done: - return n, err - case <-time.After(t.d): - return 0, ErrTimeout - } -} diff --git a/vendor/github.com/onsi/gomega/gbytes/say_matcher.go b/vendor/github.com/onsi/gomega/gbytes/say_matcher.go deleted file mode 100644 index cbc266c56..000000000 --- a/vendor/github.com/onsi/gomega/gbytes/say_matcher.go +++ /dev/null @@ -1,105 +0,0 @@ -package gbytes - -import ( - "fmt" - "regexp" - - "github.com/onsi/gomega/format" -) - -//Objects satisfying the BufferProvider can be used with the Say matcher. -type BufferProvider interface { - Buffer() *Buffer -} - -/* -Say is a Gomega matcher that operates on gbytes.Buffers: - - Ω(buffer).Should(Say("something")) - -will succeed if the unread portion of the buffer matches the regular expression "something". - -When Say succeeds, it fast forwards the gbytes.Buffer's read cursor to just after the succesful match. -Thus, subsequent calls to Say will only match against the unread portion of the buffer - -Say pairs very well with Eventually. To assert that a buffer eventually receives data matching "[123]-star" within 3 seconds you can: - - Eventually(buffer, 3).Should(Say("[123]-star")) - -Ditto with consistently. To assert that a buffer does not receive data matching "never-see-this" for 1 second you can: - - Consistently(buffer, 1).ShouldNot(Say("never-see-this")) - -In addition to bytes.Buffers, Say can operate on objects that implement the gbytes.BufferProvider interface. -In such cases, Say simply operates on the *gbytes.Buffer returned by Buffer() - -If the buffer is closed, the Say matcher will tell Eventually to abort. -*/ -func Say(expected string, args ...interface{}) *sayMatcher { - formattedRegexp := expected - if len(args) > 0 { - formattedRegexp = fmt.Sprintf(expected, args...) - } - return &sayMatcher{ - re: regexp.MustCompile(formattedRegexp), - } -} - -type sayMatcher struct { - re *regexp.Regexp - receivedSayings []byte -} - -func (m *sayMatcher) buffer(actual interface{}) (*Buffer, bool) { - var buffer *Buffer - - switch x := actual.(type) { - case *Buffer: - buffer = x - case BufferProvider: - buffer = x.Buffer() - default: - return nil, false - } - - return buffer, true -} - -func (m *sayMatcher) Match(actual interface{}) (success bool, err error) { - buffer, ok := m.buffer(actual) - if !ok { - return false, fmt.Errorf("Say must be passed a *gbytes.Buffer or BufferProvider. Got:\n%s", format.Object(actual, 1)) - } - - didSay, sayings := buffer.didSay(m.re) - m.receivedSayings = sayings - - return didSay, nil -} - -func (m *sayMatcher) FailureMessage(actual interface{}) (message string) { - return fmt.Sprintf( - "Got stuck at:\n%s\nWaiting for:\n%s", - format.IndentString(string(m.receivedSayings), 1), - format.IndentString(m.re.String(), 1), - ) -} - -func (m *sayMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return fmt.Sprintf( - "Saw:\n%s\nWhich matches the unexpected:\n%s", - format.IndentString(string(m.receivedSayings), 1), - format.IndentString(m.re.String(), 1), - ) -} - -func (m *sayMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - switch x := actual.(type) { - case *Buffer: - return !x.Closed() - case BufferProvider: - return !x.Buffer().Closed() - default: - return true - } -} diff --git a/vendor/github.com/onsi/gomega/gexec/build.go b/vendor/github.com/onsi/gomega/gexec/build.go deleted file mode 100644 index 869c1ead8..000000000 --- a/vendor/github.com/onsi/gomega/gexec/build.go +++ /dev/null @@ -1,112 +0,0 @@ -package gexec - -import ( - "errors" - "fmt" - "go/build" - "io/ioutil" - "os" - "os/exec" - "path" - "path/filepath" - "runtime" - "strings" - "sync" -) - -var ( - mu sync.Mutex - tmpDir string -) - -/* -Build uses go build to compile the package at packagePath. The resulting binary is saved off in a temporary directory. -A path pointing to this binary is returned. - -Build uses the $GOPATH set in your environment. If $GOPATH is not set and you are using Go 1.8+, -it will use the default GOPATH instead. It passes the variadic args on to `go build`. -*/ -func Build(packagePath string, args ...string) (compiledPath string, err error) { - return doBuild(build.Default.GOPATH, packagePath, nil, args...) -} - -/* -BuildWithEnvironment is identical to Build but allows you to specify env vars to be set at build time. -*/ -func BuildWithEnvironment(packagePath string, env []string, args ...string) (compiledPath string, err error) { - return doBuild(build.Default.GOPATH, packagePath, env, args...) -} - -/* -BuildIn is identical to Build but allows you to specify a custom $GOPATH (the first argument). -*/ -func BuildIn(gopath string, packagePath string, args ...string) (compiledPath string, err error) { - return doBuild(gopath, packagePath, nil, args...) -} - -func replaceGoPath(environ []string, newGoPath string) []string { - newEnviron := []string{} - for _, v := range environ { - if !strings.HasPrefix(v, "GOPATH=") { - newEnviron = append(newEnviron, v) - } - } - return append(newEnviron, "GOPATH="+newGoPath) -} - -func doBuild(gopath, packagePath string, env []string, args ...string) (compiledPath string, err error) { - tmpDir, err := temporaryDirectory() - if err != nil { - return "", err - } - - if len(gopath) == 0 { - return "", errors.New("$GOPATH not provided when building " + packagePath) - } - - executable := filepath.Join(tmpDir, path.Base(packagePath)) - if runtime.GOOS == "windows" { - executable = executable + ".exe" - } - - cmdArgs := append([]string{"build"}, args...) - cmdArgs = append(cmdArgs, "-o", executable, packagePath) - - build := exec.Command("go", cmdArgs...) - build.Env = replaceGoPath(os.Environ(), gopath) - build.Env = append(build.Env, env...) - - output, err := build.CombinedOutput() - if err != nil { - return "", fmt.Errorf("Failed to build %s:\n\nError:\n%s\n\nOutput:\n%s", packagePath, err, string(output)) - } - - return executable, nil -} - -/* -You should call CleanupBuildArtifacts before your test ends to clean up any temporary artifacts generated by -gexec. In Ginkgo this is typically done in an AfterSuite callback. -*/ -func CleanupBuildArtifacts() { - mu.Lock() - defer mu.Unlock() - if tmpDir != "" { - os.RemoveAll(tmpDir) - tmpDir = "" - } -} - -func temporaryDirectory() (string, error) { - var err error - mu.Lock() - defer mu.Unlock() - if tmpDir == "" { - tmpDir, err = ioutil.TempDir("", "gexec_artifacts") - if err != nil { - return "", err - } - } - - return ioutil.TempDir(tmpDir, "g") -} diff --git a/vendor/github.com/onsi/gomega/gexec/exit_matcher.go b/vendor/github.com/onsi/gomega/gexec/exit_matcher.go deleted file mode 100644 index d872ec8fd..000000000 --- a/vendor/github.com/onsi/gomega/gexec/exit_matcher.go +++ /dev/null @@ -1,86 +0,0 @@ -package gexec - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -/* -The Exit matcher operates on a session: - - Ω(session).Should(Exit()) - -Exit passes if the session has already exited. - -If no status code is provided, then Exit will succeed if the session has exited regardless of exit code. -Otherwise, Exit will only succeed if the process has exited with the provided status code. - -Note that the process must have already exited. To wait for a process to exit, use Eventually: - - Eventually(session, 3).Should(Exit(0)) -*/ -func Exit(optionalExitCode ...int) *exitMatcher { - exitCode := -1 - if len(optionalExitCode) > 0 { - exitCode = optionalExitCode[0] - } - - return &exitMatcher{ - exitCode: exitCode, - } -} - -type exitMatcher struct { - exitCode int - didExit bool - actualExitCode int -} - -type Exiter interface { - ExitCode() int -} - -func (m *exitMatcher) Match(actual interface{}) (success bool, err error) { - exiter, ok := actual.(Exiter) - if !ok { - return false, fmt.Errorf("Exit must be passed a gexec.Exiter (Missing method ExitCode() int) Got:\n%s", format.Object(actual, 1)) - } - - m.actualExitCode = exiter.ExitCode() - - if m.actualExitCode == -1 { - return false, nil - } - - if m.exitCode == -1 { - return true, nil - } - return m.exitCode == m.actualExitCode, nil -} - -func (m *exitMatcher) FailureMessage(actual interface{}) (message string) { - if m.actualExitCode == -1 { - return "Expected process to exit. It did not." - } - return format.Message(m.actualExitCode, "to match exit code:", m.exitCode) -} - -func (m *exitMatcher) NegatedFailureMessage(actual interface{}) (message string) { - if m.actualExitCode == -1 { - return "you really shouldn't be able to see this!" - } else { - if m.exitCode == -1 { - return "Expected process not to exit. It did." - } - return format.Message(m.actualExitCode, "not to match exit code:", m.exitCode) - } -} - -func (m *exitMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - session, ok := actual.(*Session) - if ok { - return session.ExitCode() == -1 - } - return true -} diff --git a/vendor/github.com/onsi/gomega/gexec/prefixed_writer.go b/vendor/github.com/onsi/gomega/gexec/prefixed_writer.go deleted file mode 100644 index 05e695abc..000000000 --- a/vendor/github.com/onsi/gomega/gexec/prefixed_writer.go +++ /dev/null @@ -1,53 +0,0 @@ -package gexec - -import ( - "io" - "sync" -) - -/* -PrefixedWriter wraps an io.Writer, emiting the passed in prefix at the beginning of each new line. -This can be useful when running multiple gexec.Sessions concurrently - you can prefix the log output of each -session by passing in a PrefixedWriter: - -gexec.Start(cmd, NewPrefixedWriter("[my-cmd] ", GinkgoWriter), NewPrefixedWriter("[my-cmd] ", GinkgoWriter)) -*/ -type PrefixedWriter struct { - prefix []byte - writer io.Writer - lock *sync.Mutex - atStartOfLine bool -} - -func NewPrefixedWriter(prefix string, writer io.Writer) *PrefixedWriter { - return &PrefixedWriter{ - prefix: []byte(prefix), - writer: writer, - lock: &sync.Mutex{}, - atStartOfLine: true, - } -} - -func (w *PrefixedWriter) Write(b []byte) (int, error) { - w.lock.Lock() - defer w.lock.Unlock() - - toWrite := []byte{} - - for _, c := range b { - if w.atStartOfLine { - toWrite = append(toWrite, w.prefix...) - } - - toWrite = append(toWrite, c) - - w.atStartOfLine = c == '\n' - } - - _, err := w.writer.Write(toWrite) - if err != nil { - return 0, err - } - - return len(b), nil -} diff --git a/vendor/github.com/onsi/gomega/gexec/session.go b/vendor/github.com/onsi/gomega/gexec/session.go deleted file mode 100644 index b1ae2f403..000000000 --- a/vendor/github.com/onsi/gomega/gexec/session.go +++ /dev/null @@ -1,304 +0,0 @@ -/* -Package gexec provides support for testing external processes. -*/ -package gexec - -import ( - "io" - "os" - "os/exec" - "sync" - "syscall" - - . "github.com/onsi/gomega" - "github.com/onsi/gomega/gbytes" -) - -const INVALID_EXIT_CODE = 254 - -type Session struct { - //The wrapped command - Command *exec.Cmd - - //A *gbytes.Buffer connected to the command's stdout - Out *gbytes.Buffer - - //A *gbytes.Buffer connected to the command's stderr - Err *gbytes.Buffer - - //A channel that will close when the command exits - Exited <-chan struct{} - - lock *sync.Mutex - exitCode int -} - -/* -Start starts the passed-in *exec.Cmd command. It wraps the command in a *gexec.Session. - -The session pipes the command's stdout and stderr to two *gbytes.Buffers available as properties on the session: session.Out and session.Err. -These buffers can be used with the gbytes.Say matcher to match against unread output: - - Ω(session.Out).Should(gbytes.Say("foo-out")) - Ω(session.Err).Should(gbytes.Say("foo-err")) - -In addition, Session satisfies the gbytes.BufferProvider interface and provides the stdout *gbytes.Buffer. This allows you to replace the first line, above, with: - - Ω(session).Should(gbytes.Say("foo-out")) - -When outWriter and/or errWriter are non-nil, the session will pipe stdout and/or stderr output both into the session *gybtes.Buffers and to the passed-in outWriter/errWriter. -This is useful for capturing the process's output or logging it to screen. In particular, when using Ginkgo it can be convenient to direct output to the GinkgoWriter: - - session, err := Start(command, GinkgoWriter, GinkgoWriter) - -This will log output when running tests in verbose mode, but - otherwise - will only log output when a test fails. - -The session wrapper is responsible for waiting on the *exec.Cmd command. You *should not* call command.Wait() yourself. -Instead, to assert that the command has exited you can use the gexec.Exit matcher: - - Ω(session).Should(gexec.Exit()) - -When the session exits it closes the stdout and stderr gbytes buffers. This will short circuit any -Eventuallys waiting for the buffers to Say something. -*/ -func Start(command *exec.Cmd, outWriter io.Writer, errWriter io.Writer) (*Session, error) { - exited := make(chan struct{}) - - session := &Session{ - Command: command, - Out: gbytes.NewBuffer(), - Err: gbytes.NewBuffer(), - Exited: exited, - lock: &sync.Mutex{}, - exitCode: -1, - } - - var commandOut, commandErr io.Writer - - commandOut, commandErr = session.Out, session.Err - - if outWriter != nil { - commandOut = io.MultiWriter(commandOut, outWriter) - } - - if errWriter != nil { - commandErr = io.MultiWriter(commandErr, errWriter) - } - - command.Stdout = commandOut - command.Stderr = commandErr - - err := command.Start() - if err == nil { - go session.monitorForExit(exited) - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - trackedSessions = append(trackedSessions, session) - } - - return session, err -} - -/* -Buffer implements the gbytes.BufferProvider interface and returns s.Out -This allows you to make gbytes.Say matcher assertions against stdout without having to reference .Out: - - Eventually(session).Should(gbytes.Say("foo")) -*/ -func (s *Session) Buffer() *gbytes.Buffer { - return s.Out -} - -/* -ExitCode returns the wrapped command's exit code. If the command hasn't exited yet, ExitCode returns -1. - -To assert that the command has exited it is more convenient to use the Exit matcher: - - Eventually(s).Should(gexec.Exit()) - -When the process exits because it has received a particular signal, the exit code will be 128+signal-value -(See http://www.tldp.org/LDP/abs/html/exitcodes.html and http://man7.org/linux/man-pages/man7/signal.7.html) - -*/ -func (s *Session) ExitCode() int { - s.lock.Lock() - defer s.lock.Unlock() - return s.exitCode -} - -/* -Wait waits until the wrapped command exits. It can be passed an optional timeout. -If the command does not exit within the timeout, Wait will trigger a test failure. - -Wait returns the session, making it possible to chain: - - session.Wait().Out.Contents() - -will wait for the command to exit then return the entirety of Out's contents. - -Wait uses eventually under the hood and accepts the same timeout/polling intervals that eventually does. -*/ -func (s *Session) Wait(timeout ...interface{}) *Session { - EventuallyWithOffset(1, s, timeout...).Should(Exit()) - return s -} - -/* -Kill sends the running command a SIGKILL signal. It does not wait for the process to exit. - -If the command has already exited, Kill returns silently. - -The session is returned to enable chaining. -*/ -func (s *Session) Kill() *Session { - if s.ExitCode() != -1 { - return s - } - s.Command.Process.Kill() - return s -} - -/* -Interrupt sends the running command a SIGINT signal. It does not wait for the process to exit. - -If the command has already exited, Interrupt returns silently. - -The session is returned to enable chaining. -*/ -func (s *Session) Interrupt() *Session { - return s.Signal(syscall.SIGINT) -} - -/* -Terminate sends the running command a SIGTERM signal. It does not wait for the process to exit. - -If the command has already exited, Terminate returns silently. - -The session is returned to enable chaining. -*/ -func (s *Session) Terminate() *Session { - return s.Signal(syscall.SIGTERM) -} - -/* -Signal sends the running command the passed in signal. It does not wait for the process to exit. - -If the command has already exited, Signal returns silently. - -The session is returned to enable chaining. -*/ -func (s *Session) Signal(signal os.Signal) *Session { - if s.ExitCode() != -1 { - return s - } - s.Command.Process.Signal(signal) - return s -} - -func (s *Session) monitorForExit(exited chan<- struct{}) { - err := s.Command.Wait() - s.lock.Lock() - s.Out.Close() - s.Err.Close() - status := s.Command.ProcessState.Sys().(syscall.WaitStatus) - if status.Signaled() { - s.exitCode = 128 + int(status.Signal()) - } else { - exitStatus := status.ExitStatus() - if exitStatus == -1 && err != nil { - s.exitCode = INVALID_EXIT_CODE - } - s.exitCode = exitStatus - } - s.lock.Unlock() - - close(exited) -} - -var trackedSessions = []*Session{} -var trackedSessionsMutex = &sync.Mutex{} - -/* -Kill sends a SIGKILL signal to all the processes started by Run, and waits for them to exit. -The timeout specified is applied to each process killed. - -If any of the processes already exited, KillAndWait returns silently. -*/ -func KillAndWait(timeout ...interface{}) { - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - for _, session := range trackedSessions { - session.Kill().Wait(timeout...) - } - trackedSessions = []*Session{} -} - -/* -Kill sends a SIGTERM signal to all the processes started by Run, and waits for them to exit. -The timeout specified is applied to each process killed. - -If any of the processes already exited, TerminateAndWait returns silently. -*/ -func TerminateAndWait(timeout ...interface{}) { - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - for _, session := range trackedSessions { - session.Terminate().Wait(timeout...) - } -} - -/* -Kill sends a SIGKILL signal to all the processes started by Run. -It does not wait for the processes to exit. - -If any of the processes already exited, Kill returns silently. -*/ -func Kill() { - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - for _, session := range trackedSessions { - session.Kill() - } -} - -/* -Terminate sends a SIGTERM signal to all the processes started by Run. -It does not wait for the processes to exit. - -If any of the processes already exited, Terminate returns silently. -*/ -func Terminate() { - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - for _, session := range trackedSessions { - session.Terminate() - } -} - -/* -Signal sends the passed in signal to all the processes started by Run. -It does not wait for the processes to exit. - -If any of the processes already exited, Signal returns silently. -*/ -func Signal(signal os.Signal) { - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - for _, session := range trackedSessions { - session.Signal(signal) - } -} - -/* -Interrupt sends the SIGINT signal to all the processes started by Run. -It does not wait for the processes to exit. - -If any of the processes already exited, Interrupt returns silently. -*/ -func Interrupt() { - trackedSessionsMutex.Lock() - defer trackedSessionsMutex.Unlock() - for _, session := range trackedSessions { - session.Interrupt() - } -} diff --git a/vendor/github.com/onsi/gomega/ghttp/handlers.go b/vendor/github.com/onsi/gomega/ghttp/handlers.go deleted file mode 100644 index 63ff6919a..000000000 --- a/vendor/github.com/onsi/gomega/ghttp/handlers.go +++ /dev/null @@ -1,313 +0,0 @@ -package ghttp - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "reflect" - - "github.com/golang/protobuf/proto" - . "github.com/onsi/gomega" - "github.com/onsi/gomega/types" -) - -//CombineHandler takes variadic list of handlers and produces one handler -//that calls each handler in order. -func CombineHandlers(handlers ...http.HandlerFunc) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - for _, handler := range handlers { - handler(w, req) - } - } -} - -//VerifyRequest returns a handler that verifies that a request uses the specified method to connect to the specified path -//You may also pass in an optional rawQuery string which is tested against the request's `req.URL.RawQuery` -// -//For path, you may pass in a string, in which case strict equality will be applied -//Alternatively you can pass in a matcher (ContainSubstring("/foo") and MatchRegexp("/foo/[a-f0-9]+") for example) -func VerifyRequest(method string, path interface{}, rawQuery ...string) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - Ω(req.Method).Should(Equal(method), "Method mismatch") - switch p := path.(type) { - case types.GomegaMatcher: - Ω(req.URL.Path).Should(p, "Path mismatch") - default: - Ω(req.URL.Path).Should(Equal(path), "Path mismatch") - } - if len(rawQuery) > 0 { - values, err := url.ParseQuery(rawQuery[0]) - Ω(err).ShouldNot(HaveOccurred(), "Expected RawQuery is malformed") - - Ω(req.URL.Query()).Should(Equal(values), "RawQuery mismatch") - } - } -} - -//VerifyContentType returns a handler that verifies that a request has a Content-Type header set to the -//specified value -func VerifyContentType(contentType string) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - Ω(req.Header.Get("Content-Type")).Should(Equal(contentType)) - } -} - -//VerifyBasicAuth returns a handler that verifies the request contains a BasicAuth Authorization header -//matching the passed in username and password -func VerifyBasicAuth(username string, password string) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - auth := req.Header.Get("Authorization") - Ω(auth).ShouldNot(Equal(""), "Authorization header must be specified") - - decoded, err := base64.StdEncoding.DecodeString(auth[6:]) - Ω(err).ShouldNot(HaveOccurred()) - - Ω(string(decoded)).Should(Equal(fmt.Sprintf("%s:%s", username, password)), "Authorization mismatch") - } -} - -//VerifyHeader returns a handler that verifies the request contains the passed in headers. -//The passed in header keys are first canonicalized via http.CanonicalHeaderKey. -// -//The request must contain *all* the passed in headers, but it is allowed to have additional headers -//beyond the passed in set. -func VerifyHeader(header http.Header) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - for key, values := range header { - key = http.CanonicalHeaderKey(key) - Ω(req.Header[key]).Should(Equal(values), "Header mismatch for key: %s", key) - } - } -} - -//VerifyHeaderKV returns a handler that verifies the request contains a header matching the passed in key and values -//(recall that a `http.Header` is a mapping from string (key) to []string (values)) -//It is a convenience wrapper around `VerifyHeader` that allows you to avoid having to create an `http.Header` object. -func VerifyHeaderKV(key string, values ...string) http.HandlerFunc { - return VerifyHeader(http.Header{key: values}) -} - -//VerifyBody returns a handler that verifies that the body of the request matches the passed in byte array. -//It does this using Equal(). -func VerifyBody(expectedBody []byte) http.HandlerFunc { - return CombineHandlers( - func(w http.ResponseWriter, req *http.Request) { - body, err := ioutil.ReadAll(req.Body) - req.Body.Close() - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(Equal(expectedBody), "Body Mismatch") - }, - ) -} - -//VerifyJSON returns a handler that verifies that the body of the request is a valid JSON representation -//matching the passed in JSON string. It does this using Gomega's MatchJSON method -// -//VerifyJSON also verifies that the request's content type is application/json -func VerifyJSON(expectedJSON string) http.HandlerFunc { - return CombineHandlers( - VerifyContentType("application/json"), - func(w http.ResponseWriter, req *http.Request) { - body, err := ioutil.ReadAll(req.Body) - req.Body.Close() - Ω(err).ShouldNot(HaveOccurred()) - Ω(body).Should(MatchJSON(expectedJSON), "JSON Mismatch") - }, - ) -} - -//VerifyJSONRepresenting is similar to VerifyJSON. Instead of taking a JSON string, however, it -//takes an arbitrary JSON-encodable object and verifies that the requests's body is a JSON representation -//that matches the object -func VerifyJSONRepresenting(object interface{}) http.HandlerFunc { - data, err := json.Marshal(object) - Ω(err).ShouldNot(HaveOccurred()) - return CombineHandlers( - VerifyContentType("application/json"), - VerifyJSON(string(data)), - ) -} - -//VerifyForm returns a handler that verifies a request contains the specified form values. -// -//The request must contain *all* of the specified values, but it is allowed to have additional -//form values beyond the passed in set. -func VerifyForm(values url.Values) http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - err := r.ParseForm() - Ω(err).ShouldNot(HaveOccurred()) - for key, vals := range values { - Ω(r.Form[key]).Should(Equal(vals), "Form mismatch for key: %s", key) - } - } -} - -//VerifyFormKV returns a handler that verifies a request contains a form key with the specified values. -// -//It is a convenience wrapper around `VerifyForm` that lets you avoid having to create a `url.Values` object. -func VerifyFormKV(key string, values ...string) http.HandlerFunc { - return VerifyForm(url.Values{key: values}) -} - -//VerifyProtoRepresenting returns a handler that verifies that the body of the request is a valid protobuf -//representation of the passed message. -// -//VerifyProtoRepresenting also verifies that the request's content type is application/x-protobuf -func VerifyProtoRepresenting(expected proto.Message) http.HandlerFunc { - return CombineHandlers( - VerifyContentType("application/x-protobuf"), - func(w http.ResponseWriter, req *http.Request) { - body, err := ioutil.ReadAll(req.Body) - Ω(err).ShouldNot(HaveOccurred()) - req.Body.Close() - - expectedType := reflect.TypeOf(expected) - actualValuePtr := reflect.New(expectedType.Elem()) - - actual, ok := actualValuePtr.Interface().(proto.Message) - Ω(ok).Should(BeTrue(), "Message value is not a proto.Message") - - err = proto.Unmarshal(body, actual) - Ω(err).ShouldNot(HaveOccurred(), "Failed to unmarshal protobuf") - - Ω(actual).Should(Equal(expected), "ProtoBuf Mismatch") - }, - ) -} - -func copyHeader(src http.Header, dst http.Header) { - for key, value := range src { - dst[key] = value - } -} - -/* -RespondWith returns a handler that responds to a request with the specified status code and body - -Body may be a string or []byte - -Also, RespondWith can be given an optional http.Header. The headers defined therein will be added to the response headers. -*/ -func RespondWith(statusCode int, body interface{}, optionalHeader ...http.Header) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - if len(optionalHeader) == 1 { - copyHeader(optionalHeader[0], w.Header()) - } - w.WriteHeader(statusCode) - switch x := body.(type) { - case string: - w.Write([]byte(x)) - case []byte: - w.Write(x) - default: - Ω(body).Should(BeNil(), "Invalid type for body. Should be string or []byte.") - } - } -} - -/* -RespondWithPtr returns a handler that responds to a request with the specified status code and body - -Unlike RespondWith, you pass RepondWithPtr a pointer to the status code and body allowing different tests -to share the same setup but specify different status codes and bodies. - -Also, RespondWithPtr can be given an optional http.Header. The headers defined therein will be added to the response headers. -Since the http.Header can be mutated after the fact you don't need to pass in a pointer. -*/ -func RespondWithPtr(statusCode *int, body interface{}, optionalHeader ...http.Header) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - if len(optionalHeader) == 1 { - copyHeader(optionalHeader[0], w.Header()) - } - w.WriteHeader(*statusCode) - if body != nil { - switch x := (body).(type) { - case *string: - w.Write([]byte(*x)) - case *[]byte: - w.Write(*x) - default: - Ω(body).Should(BeNil(), "Invalid type for body. Should be string or []byte.") - } - } - } -} - -/* -RespondWithJSONEncoded returns a handler that responds to a request with the specified status code and a body -containing the JSON-encoding of the passed in object - -Also, RespondWithJSONEncoded can be given an optional http.Header. The headers defined therein will be added to the response headers. -*/ -func RespondWithJSONEncoded(statusCode int, object interface{}, optionalHeader ...http.Header) http.HandlerFunc { - data, err := json.Marshal(object) - Ω(err).ShouldNot(HaveOccurred()) - - var headers http.Header - if len(optionalHeader) == 1 { - headers = optionalHeader[0] - } else { - headers = make(http.Header) - } - if _, found := headers["Content-Type"]; !found { - headers["Content-Type"] = []string{"application/json"} - } - return RespondWith(statusCode, string(data), headers) -} - -/* -RespondWithJSONEncodedPtr behaves like RespondWithJSONEncoded but takes a pointer -to a status code and object. - -This allows different tests to share the same setup but specify different status codes and JSON-encoded -objects. - -Also, RespondWithJSONEncodedPtr can be given an optional http.Header. The headers defined therein will be added to the response headers. -Since the http.Header can be mutated after the fact you don't need to pass in a pointer. -*/ -func RespondWithJSONEncodedPtr(statusCode *int, object interface{}, optionalHeader ...http.Header) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - data, err := json.Marshal(object) - Ω(err).ShouldNot(HaveOccurred()) - var headers http.Header - if len(optionalHeader) == 1 { - headers = optionalHeader[0] - } else { - headers = make(http.Header) - } - if _, found := headers["Content-Type"]; !found { - headers["Content-Type"] = []string{"application/json"} - } - copyHeader(headers, w.Header()) - w.WriteHeader(*statusCode) - w.Write(data) - } -} - -//RespondWithProto returns a handler that responds to a request with the specified status code and a body -//containing the protobuf serialization of the provided message. -// -//Also, RespondWithProto can be given an optional http.Header. The headers defined therein will be added to the response headers. -func RespondWithProto(statusCode int, message proto.Message, optionalHeader ...http.Header) http.HandlerFunc { - return func(w http.ResponseWriter, req *http.Request) { - data, err := proto.Marshal(message) - Ω(err).ShouldNot(HaveOccurred()) - - var headers http.Header - if len(optionalHeader) == 1 { - headers = optionalHeader[0] - } else { - headers = make(http.Header) - } - if _, found := headers["Content-Type"]; !found { - headers["Content-Type"] = []string{"application/x-protobuf"} - } - copyHeader(headers, w.Header()) - - w.WriteHeader(statusCode) - w.Write(data) - } -} diff --git a/vendor/github.com/onsi/gomega/ghttp/protobuf/protobuf.go b/vendor/github.com/onsi/gomega/ghttp/protobuf/protobuf.go deleted file mode 100644 index b2972bc9f..000000000 --- a/vendor/github.com/onsi/gomega/ghttp/protobuf/protobuf.go +++ /dev/null @@ -1,3 +0,0 @@ -package protobuf - -//go:generate protoc --go_out=. simple_message.proto diff --git a/vendor/github.com/onsi/gomega/ghttp/protobuf/simple_message.pb.go b/vendor/github.com/onsi/gomega/ghttp/protobuf/simple_message.pb.go deleted file mode 100644 index c55a48448..000000000 --- a/vendor/github.com/onsi/gomega/ghttp/protobuf/simple_message.pb.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by protoc-gen-go. -// source: simple_message.proto -// DO NOT EDIT! - -/* -Package protobuf is a generated protocol buffer package. - -It is generated from these files: - simple_message.proto - -It has these top-level messages: - SimpleMessage -*/ -package protobuf - -import proto "github.com/golang/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 SimpleMessage struct { - Description *string `protobuf:"bytes,1,req,name=description" json:"description,omitempty"` - Id *int32 `protobuf:"varint,2,req,name=id" json:"id,omitempty"` - Metadata *string `protobuf:"bytes,3,opt,name=metadata" json:"metadata,omitempty"` - XXX_unrecognized []byte `json:"-"` -} - -func (m *SimpleMessage) Reset() { *m = SimpleMessage{} } -func (m *SimpleMessage) String() string { return proto.CompactTextString(m) } -func (*SimpleMessage) ProtoMessage() {} - -func (m *SimpleMessage) GetDescription() string { - if m != nil && m.Description != nil { - return *m.Description - } - return "" -} - -func (m *SimpleMessage) GetId() int32 { - if m != nil && m.Id != nil { - return *m.Id - } - return 0 -} - -func (m *SimpleMessage) GetMetadata() string { - if m != nil && m.Metadata != nil { - return *m.Metadata - } - return "" -} diff --git a/vendor/github.com/onsi/gomega/ghttp/test_server.go b/vendor/github.com/onsi/gomega/ghttp/test_server.go deleted file mode 100644 index 40d92dea2..000000000 --- a/vendor/github.com/onsi/gomega/ghttp/test_server.go +++ /dev/null @@ -1,381 +0,0 @@ -/* -Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports -registering multiple handlers. Incoming requests are not routed between the different handlers -- rather it is merely the order of the handlers that matters. The first request is handled by the first -registered handler, the second request by the second handler, etc. - -The intent here is to have each handler *verify* that the incoming request is valid. To accomplish, ghttp -also provides a collection of bite-size handlers that each perform one aspect of request verification. These can -be composed together and registered with a ghttp server. The result is an expressive language for describing -the requests generated by the client under test. - -Here's a simple example, note that the server handler is only defined in one BeforeEach and then modified, as required, by the nested BeforeEaches. -A more comprehensive example is available at https://onsi.github.io/gomega/#_testing_http_clients - - var _ = Describe("A Sprockets Client", func() { - var server *ghttp.Server - var client *SprocketClient - BeforeEach(func() { - server = ghttp.NewServer() - client = NewSprocketClient(server.URL(), "skywalker", "tk427") - }) - - AfterEach(func() { - server.Close() - }) - - Describe("fetching sprockets", func() { - var statusCode int - var sprockets []Sprocket - BeforeEach(func() { - statusCode = http.StatusOK - sprockets = []Sprocket{} - server.AppendHandlers(ghttp.CombineHandlers( - ghttp.VerifyRequest("GET", "/sprockets"), - ghttp.VerifyBasicAuth("skywalker", "tk427"), - ghttp.RespondWithJSONEncodedPtr(&statusCode, &sprockets), - )) - }) - - Context("when requesting all sprockets", func() { - Context("when the response is succesful", func() { - BeforeEach(func() { - sprockets = []Sprocket{ - NewSprocket("Alfalfa"), - NewSprocket("Banana"), - } - }) - - It("should return the returned sprockets", func() { - Ω(client.Sprockets()).Should(Equal(sprockets)) - }) - }) - - Context("when the response is missing", func() { - BeforeEach(func() { - statusCode = http.StatusNotFound - }) - - It("should return an empty list of sprockets", func() { - Ω(client.Sprockets()).Should(BeEmpty()) - }) - }) - - Context("when the response fails to authenticate", func() { - BeforeEach(func() { - statusCode = http.StatusUnauthorized - }) - - It("should return an AuthenticationError error", func() { - sprockets, err := client.Sprockets() - Ω(sprockets).Should(BeEmpty()) - Ω(err).Should(MatchError(AuthenticationError)) - }) - }) - - Context("when the response is a server failure", func() { - BeforeEach(func() { - statusCode = http.StatusInternalServerError - }) - - It("should return an InternalError error", func() { - sprockets, err := client.Sprockets() - Ω(sprockets).Should(BeEmpty()) - Ω(err).Should(MatchError(InternalError)) - }) - }) - }) - - Context("when requesting some sprockets", func() { - BeforeEach(func() { - sprockets = []Sprocket{ - NewSprocket("Alfalfa"), - NewSprocket("Banana"), - } - - server.WrapHandler(0, ghttp.VerifyRequest("GET", "/sprockets", "filter=FOOD")) - }) - - It("should make the request with a filter", func() { - Ω(client.Sprockets("food")).Should(Equal(sprockets)) - }) - }) - }) - }) -*/ -package ghttp - -import ( - "fmt" - "io" - "io/ioutil" - "net/http" - "net/http/httptest" - "reflect" - "regexp" - "strings" - "sync" - - . "github.com/onsi/gomega" -) - -func new() *Server { - return &Server{ - AllowUnhandledRequests: false, - UnhandledRequestStatusCode: http.StatusInternalServerError, - writeLock: &sync.Mutex{}, - } -} - -type routedHandler struct { - method string - pathRegexp *regexp.Regexp - path string - handler http.HandlerFunc -} - -// NewServer returns a new `*ghttp.Server` that wraps an `httptest` server. The server is started automatically. -func NewServer() *Server { - s := new() - s.HTTPTestServer = httptest.NewServer(s) - return s -} - -// NewUnstartedServer return a new, unstarted, `*ghttp.Server`. Useful for specifying a custom listener on `server.HTTPTestServer`. -func NewUnstartedServer() *Server { - s := new() - s.HTTPTestServer = httptest.NewUnstartedServer(s) - return s -} - -// NewTLSServer returns a new `*ghttp.Server` that wraps an `httptest` TLS server. The server is started automatically. -func NewTLSServer() *Server { - s := new() - s.HTTPTestServer = httptest.NewTLSServer(s) - return s -} - -type Server struct { - //The underlying httptest server - HTTPTestServer *httptest.Server - - //Defaults to false. If set to true, the Server will allow more requests than there are registered handlers. - AllowUnhandledRequests bool - - //The status code returned when receiving an unhandled request. - //Defaults to http.StatusInternalServerError. - //Only applies if AllowUnhandledRequests is true - UnhandledRequestStatusCode int - - //If provided, ghttp will log about each request received to the provided io.Writer - //Defaults to nil - //If you're using Ginkgo, set this to GinkgoWriter to get improved output during failures - Writer io.Writer - - receivedRequests []*http.Request - requestHandlers []http.HandlerFunc - routedHandlers []routedHandler - - writeLock *sync.Mutex - calls int -} - -//Start() starts an unstarted ghttp server. It is a catastrophic error to call Start more than once (thanks, httptest). -func (s *Server) Start() { - s.HTTPTestServer.Start() -} - -//URL() returns a url that will hit the server -func (s *Server) URL() string { - return s.HTTPTestServer.URL -} - -//Addr() returns the address on which the server is listening. -func (s *Server) Addr() string { - return s.HTTPTestServer.Listener.Addr().String() -} - -//Close() should be called at the end of each test. It spins down and cleans up the test server. -func (s *Server) Close() { - s.writeLock.Lock() - server := s.HTTPTestServer - s.HTTPTestServer = nil - s.writeLock.Unlock() - - if server != nil { - server.Close() - } -} - -//ServeHTTP() makes Server an http.Handler -//When the server receives a request it handles the request in the following order: -// -//1. If the request matches a handler registered with RouteToHandler, that handler is called. -//2. Otherwise, if there are handlers registered via AppendHandlers, those handlers are called in order. -//3. If all registered handlers have been called then: -// a) If AllowUnhandledRequests is true, the request will be handled with response code of UnhandledRequestStatusCode -// b) If AllowUnhandledRequests is false, the request will not be handled and the current test will be marked as failed. -func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) { - s.writeLock.Lock() - defer func() { - e := recover() - if e != nil { - w.WriteHeader(http.StatusInternalServerError) - } - - //If the handler panics GHTTP will silently succeed. This is bad™. - //To catch this case we need to fail the test if the handler has panicked. - //However, if the handler is panicking because Ginkgo's causing it to panic (i.e. an assertion failed) - //then we shouldn't double-report the error as this will confuse people. - - //So: step 1, if this is a Ginkgo panic - do nothing, Ginkgo's aware of the failure - eAsString, ok := e.(string) - if ok && strings.Contains(eAsString, "defer GinkgoRecover()") { - return - } - - //If we're here, we have to do step 2: assert that the error is nil. This assertion will - //allow us to fail the test suite (note: we can't call Fail since Gomega is not allowed to import Ginkgo). - //Since a failed assertion throws a panic, and we are likely in a goroutine, we need to defer within our defer! - defer func() { - recover() - }() - Ω(e).Should(BeNil(), "Handler Panicked") - }() - - if s.Writer != nil { - s.Writer.Write([]byte(fmt.Sprintf("GHTTP Received Request: %s - %s\n", req.Method, req.URL))) - } - - s.receivedRequests = append(s.receivedRequests, req) - if routedHandler, ok := s.handlerForRoute(req.Method, req.URL.Path); ok { - s.writeLock.Unlock() - routedHandler(w, req) - } else if s.calls < len(s.requestHandlers) { - h := s.requestHandlers[s.calls] - s.calls++ - s.writeLock.Unlock() - h(w, req) - } else { - s.writeLock.Unlock() - if s.AllowUnhandledRequests { - ioutil.ReadAll(req.Body) - req.Body.Close() - w.WriteHeader(s.UnhandledRequestStatusCode) - } else { - Ω(req).Should(BeNil(), "Received Unhandled Request") - } - } -} - -//ReceivedRequests is an array containing all requests received by the server (both handled and unhandled requests) -func (s *Server) ReceivedRequests() []*http.Request { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - return s.receivedRequests -} - -//RouteToHandler can be used to register handlers that will always handle requests that match -//the passed in method and path. -// -//The path may be either a string object or a *regexp.Regexp. -func (s *Server) RouteToHandler(method string, path interface{}, handler http.HandlerFunc) { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - rh := routedHandler{ - method: method, - handler: handler, - } - - switch p := path.(type) { - case *regexp.Regexp: - rh.pathRegexp = p - case string: - rh.path = p - default: - panic("path must be a string or a regular expression") - } - - for i, existingRH := range s.routedHandlers { - if existingRH.method == method && - reflect.DeepEqual(existingRH.pathRegexp, rh.pathRegexp) && - existingRH.path == rh.path { - s.routedHandlers[i] = rh - return - } - } - s.routedHandlers = append(s.routedHandlers, rh) -} - -func (s *Server) handlerForRoute(method string, path string) (http.HandlerFunc, bool) { - for _, rh := range s.routedHandlers { - if rh.method == method { - if rh.pathRegexp != nil { - if rh.pathRegexp.Match([]byte(path)) { - return rh.handler, true - } - } else if rh.path == path { - return rh.handler, true - } - } - } - - return nil, false -} - -//AppendHandlers will appends http.HandlerFuncs to the server's list of registered handlers. The first incoming request is handled by the first handler, the second by the second, etc... -func (s *Server) AppendHandlers(handlers ...http.HandlerFunc) { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - s.requestHandlers = append(s.requestHandlers, handlers...) -} - -//SetHandler overrides the registered handler at the passed in index with the passed in handler -//This is useful, for example, when a server has been set up in a shared context, but must be tweaked -//for a particular test. -func (s *Server) SetHandler(index int, handler http.HandlerFunc) { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - s.requestHandlers[index] = handler -} - -//GetHandler returns the handler registered at the passed in index. -func (s *Server) GetHandler(index int) http.HandlerFunc { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - return s.requestHandlers[index] -} - -func (s *Server) Reset() { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - s.HTTPTestServer.CloseClientConnections() - s.calls = 0 - s.receivedRequests = nil - s.requestHandlers = nil - s.routedHandlers = nil -} - -//WrapHandler combines the passed in handler with the handler registered at the passed in index. -//This is useful, for example, when a server has been set up in a shared context but must be tweaked -//for a particular test. -// -//If the currently registered handler is A, and the new passed in handler is B then -//WrapHandler will generate a new handler that first calls A, then calls B, and assign it to index -func (s *Server) WrapHandler(index int, handler http.HandlerFunc) { - existingHandler := s.GetHandler(index) - s.SetHandler(index, CombineHandlers(existingHandler, handler)) -} - -func (s *Server) CloseClientConnections() { - s.writeLock.Lock() - defer s.writeLock.Unlock() - - s.HTTPTestServer.CloseClientConnections() -} diff --git a/vendor/github.com/onsi/gomega/gomega_dsl.go b/vendor/github.com/onsi/gomega/gomega_dsl.go deleted file mode 100644 index 0296fc472..000000000 --- a/vendor/github.com/onsi/gomega/gomega_dsl.go +++ /dev/null @@ -1,396 +0,0 @@ -/* -Gomega is the Ginkgo BDD-style testing framework's preferred matcher library. - -The godoc documentation describes Gomega's API. More comprehensive documentation (with examples!) is available at http://onsi.github.io/gomega/ - -Gomega on Github: http://github.com/onsi/gomega - -Learn more about Ginkgo online: http://onsi.github.io/ginkgo - -Ginkgo on Github: http://github.com/onsi/ginkgo - -Gomega is MIT-Licensed -*/ -package gomega - -import ( - "fmt" - "reflect" - "time" - - "github.com/onsi/gomega/internal/assertion" - "github.com/onsi/gomega/internal/asyncassertion" - "github.com/onsi/gomega/internal/testingtsupport" - "github.com/onsi/gomega/types" -) - -const GOMEGA_VERSION = "1.2.0" - -const nilFailHandlerPanic = `You are trying to make an assertion, but Gomega's fail handler is nil. -If you're using Ginkgo then you probably forgot to put your assertion in an It(). -Alternatively, you may have forgotten to register a fail handler with RegisterFailHandler() or RegisterTestingT(). -Depending on your vendoring solution you may be inadvertently importing gomega and subpackages (e.g. ghhtp, gexec,...) from different locations. -` - -var globalFailHandler types.GomegaFailHandler - -var defaultEventuallyTimeout = time.Second -var defaultEventuallyPollingInterval = 10 * time.Millisecond -var defaultConsistentlyDuration = 100 * time.Millisecond -var defaultConsistentlyPollingInterval = 10 * time.Millisecond - -//RegisterFailHandler connects Ginkgo to Gomega. When a matcher fails -//the fail handler passed into RegisterFailHandler is called. -func RegisterFailHandler(handler types.GomegaFailHandler) { - globalFailHandler = handler -} - -//RegisterTestingT connects Gomega to Golang's XUnit style -//Testing.T tests. It is now deprecated and you should use NewGomegaWithT() instead. -// -//Legacy Documentation: -// -//You'll need to call this at the top of each XUnit style test: -// -// func TestFarmHasCow(t *testing.T) { -// RegisterTestingT(t) -// -// f := farm.New([]string{"Cow", "Horse"}) -// Expect(f.HasCow()).To(BeTrue(), "Farm should have cow") -// } -// -// Note that this *testing.T is registered *globally* by Gomega (this is why you don't have to -// pass `t` down to the matcher itself). This means that you cannot run the XUnit style tests -// in parallel as the global fail handler cannot point to more than one testing.T at a time. -// -// NewGomegaWithT() does not have this limitation -// -// (As an aside: Ginkgo gets around this limitation by running parallel tests in different *processes*). -func RegisterTestingT(t types.GomegaTestingT) { - RegisterFailHandler(testingtsupport.BuildTestingTGomegaFailHandler(t)) -} - -//InterceptGomegaHandlers runs a given callback and returns an array of -//failure messages generated by any Gomega assertions within the callback. -// -//This is accomplished by temporarily replacing the *global* fail handler -//with a fail handler that simply annotates failures. The original fail handler -//is reset when InterceptGomegaFailures returns. -// -//This is most useful when testing custom matchers, but can also be used to check -//on a value using a Gomega assertion without causing a test failure. -func InterceptGomegaFailures(f func()) []string { - originalHandler := globalFailHandler - failures := []string{} - RegisterFailHandler(func(message string, callerSkip ...int) { - failures = append(failures, message) - }) - f() - RegisterFailHandler(originalHandler) - return failures -} - -//Ω wraps an actual value allowing assertions to be made on it: -// Ω("foo").Should(Equal("foo")) -// -//If Ω is passed more than one argument it will pass the *first* argument to the matcher. -//All subsequent arguments will be required to be nil/zero. -// -//This is convenient if you want to make an assertion on a method/function that returns -//a value and an error - a common patter in Go. -// -//For example, given a function with signature: -// func MyAmazingThing() (int, error) -// -//Then: -// Ω(MyAmazingThing()).Should(Equal(3)) -//Will succeed only if `MyAmazingThing()` returns `(3, nil)` -// -//Ω and Expect are identical -func Ω(actual interface{}, extra ...interface{}) GomegaAssertion { - return ExpectWithOffset(0, actual, extra...) -} - -//Expect wraps an actual value allowing assertions to be made on it: -// Expect("foo").To(Equal("foo")) -// -//If Expect is passed more than one argument it will pass the *first* argument to the matcher. -//All subsequent arguments will be required to be nil/zero. -// -//This is convenient if you want to make an assertion on a method/function that returns -//a value and an error - a common patter in Go. -// -//For example, given a function with signature: -// func MyAmazingThing() (int, error) -// -//Then: -// Expect(MyAmazingThing()).Should(Equal(3)) -//Will succeed only if `MyAmazingThing()` returns `(3, nil)` -// -//Expect and Ω are identical -func Expect(actual interface{}, extra ...interface{}) GomegaAssertion { - return ExpectWithOffset(0, actual, extra...) -} - -//ExpectWithOffset wraps an actual value allowing assertions to be made on it: -// ExpectWithOffset(1, "foo").To(Equal("foo")) -// -//Unlike `Expect` and `Ω`, `ExpectWithOffset` takes an additional integer argument -//this is used to modify the call-stack offset when computing line numbers. -// -//This is most useful in helper functions that make assertions. If you want Gomega's -//error message to refer to the calling line in the test (as opposed to the line in the helper function) -//set the first argument of `ExpectWithOffset` appropriately. -func ExpectWithOffset(offset int, actual interface{}, extra ...interface{}) GomegaAssertion { - if globalFailHandler == nil { - panic(nilFailHandlerPanic) - } - return assertion.New(actual, globalFailHandler, offset, extra...) -} - -//Eventually wraps an actual value allowing assertions to be made on it. -//The assertion is tried periodically until it passes or a timeout occurs. -// -//Both the timeout and polling interval are configurable as optional arguments: -//The first optional argument is the timeout -//The second optional argument is the polling interval -// -//Both intervals can either be specified as time.Duration, parsable duration strings or as floats/integers. In the -//last case they are interpreted as seconds. -// -//If Eventually is passed an actual that is a function taking no arguments and returning at least one value, -//then Eventually will call the function periodically and try the matcher against the function's first return value. -// -//Example: -// -// Eventually(func() int { -// return thingImPolling.Count() -// }).Should(BeNumerically(">=", 17)) -// -//Note that this example could be rewritten: -// -// Eventually(thingImPolling.Count).Should(BeNumerically(">=", 17)) -// -//If the function returns more than one value, then Eventually will pass the first value to the matcher and -//assert that all other values are nil/zero. -//This allows you to pass Eventually a function that returns a value and an error - a common pattern in Go. -// -//For example, consider a method that returns a value and an error: -// func FetchFromDB() (string, error) -// -//Then -// Eventually(FetchFromDB).Should(Equal("hasselhoff")) -// -//Will pass only if the the returned error is nil and the returned string passes the matcher. -// -//Eventually's default timeout is 1 second, and its default polling interval is 10ms -func Eventually(actual interface{}, intervals ...interface{}) GomegaAsyncAssertion { - return EventuallyWithOffset(0, actual, intervals...) -} - -//EventuallyWithOffset operates like Eventually but takes an additional -//initial argument to indicate an offset in the call stack. This is useful when building helper -//functions that contain matchers. To learn more, read about `ExpectWithOffset`. -func EventuallyWithOffset(offset int, actual interface{}, intervals ...interface{}) GomegaAsyncAssertion { - if globalFailHandler == nil { - panic(nilFailHandlerPanic) - } - timeoutInterval := defaultEventuallyTimeout - pollingInterval := defaultEventuallyPollingInterval - if len(intervals) > 0 { - timeoutInterval = toDuration(intervals[0]) - } - if len(intervals) > 1 { - pollingInterval = toDuration(intervals[1]) - } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeEventually, actual, globalFailHandler, timeoutInterval, pollingInterval, offset) -} - -//Consistently wraps an actual value allowing assertions to be made on it. -//The assertion is tried periodically and is required to pass for a period of time. -// -//Both the total time and polling interval are configurable as optional arguments: -//The first optional argument is the duration that Consistently will run for -//The second optional argument is the polling interval -// -//Both intervals can either be specified as time.Duration, parsable duration strings or as floats/integers. In the -//last case they are interpreted as seconds. -// -//If Consistently is passed an actual that is a function taking no arguments and returning at least one value, -//then Consistently will call the function periodically and try the matcher against the function's first return value. -// -//If the function returns more than one value, then Consistently will pass the first value to the matcher and -//assert that all other values are nil/zero. -//This allows you to pass Consistently a function that returns a value and an error - a common pattern in Go. -// -//Consistently is useful in cases where you want to assert that something *does not happen* over a period of tiem. -//For example, you want to assert that a goroutine does *not* send data down a channel. In this case, you could: -// -// Consistently(channel).ShouldNot(Receive()) -// -//Consistently's default duration is 100ms, and its default polling interval is 10ms -func Consistently(actual interface{}, intervals ...interface{}) GomegaAsyncAssertion { - return ConsistentlyWithOffset(0, actual, intervals...) -} - -//ConsistentlyWithOffset operates like Consistnetly but takes an additional -//initial argument to indicate an offset in the call stack. This is useful when building helper -//functions that contain matchers. To learn more, read about `ExpectWithOffset`. -func ConsistentlyWithOffset(offset int, actual interface{}, intervals ...interface{}) GomegaAsyncAssertion { - if globalFailHandler == nil { - panic(nilFailHandlerPanic) - } - timeoutInterval := defaultConsistentlyDuration - pollingInterval := defaultConsistentlyPollingInterval - if len(intervals) > 0 { - timeoutInterval = toDuration(intervals[0]) - } - if len(intervals) > 1 { - pollingInterval = toDuration(intervals[1]) - } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeConsistently, actual, globalFailHandler, timeoutInterval, pollingInterval, offset) -} - -//Set the default timeout duration for Eventually. Eventually will repeatedly poll your condition until it succeeds, or until this timeout elapses. -func SetDefaultEventuallyTimeout(t time.Duration) { - defaultEventuallyTimeout = t -} - -//Set the default polling interval for Eventually. -func SetDefaultEventuallyPollingInterval(t time.Duration) { - defaultEventuallyPollingInterval = t -} - -//Set the default duration for Consistently. Consistently will verify that your condition is satsified for this long. -func SetDefaultConsistentlyDuration(t time.Duration) { - defaultConsistentlyDuration = t -} - -//Set the default polling interval for Consistently. -func SetDefaultConsistentlyPollingInterval(t time.Duration) { - defaultConsistentlyPollingInterval = t -} - -//GomegaAsyncAssertion is returned by Eventually and Consistently and polls the actual value passed into Eventually against -//the matcher passed to the Should and ShouldNot methods. -// -//Both Should and ShouldNot take a variadic optionalDescription argument. This is passed on to -//fmt.Sprintf() and is used to annotate failure messages. This allows you to make your failure messages more -//descriptive -// -//Both Should and ShouldNot return a boolean that is true if the assertion passed and false if it failed. -// -//Example: -// -// Eventually(myChannel).Should(Receive(), "Something should have come down the pipe.") -// Consistently(myChannel).ShouldNot(Receive(), "Nothing should have come down the pipe.") -type GomegaAsyncAssertion interface { - Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool - ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool -} - -//GomegaAssertion is returned by Ω and Expect and compares the actual value to the matcher -//passed to the Should/ShouldNot and To/ToNot/NotTo methods. -// -//Typically Should/ShouldNot are used with Ω and To/ToNot/NotTo are used with Expect -//though this is not enforced. -// -//All methods take a variadic optionalDescription argument. This is passed on to fmt.Sprintf() -//and is used to annotate failure messages. -// -//All methods return a bool that is true if hte assertion passed and false if it failed. -// -//Example: -// -// Ω(farm.HasCow()).Should(BeTrue(), "Farm %v should have a cow", farm) -type GomegaAssertion interface { - Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool - ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool - - To(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool - ToNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool - NotTo(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool -} - -//OmegaMatcher is deprecated in favor of the better-named and better-organized types.GomegaMatcher but sticks around to support existing code that uses it -type OmegaMatcher types.GomegaMatcher - -//GomegaWithT wraps a *testing.T and provides `Expect`, `Eventually`, and `Consistently` methods. This allows you to leverage -//Gomega's rich ecosystem of matchers in standard `testing` test suites. -// -//Use `NewGomegaWithT` to instantiate a `GomegaWithT` -type GomegaWithT struct { - t types.GomegaTestingT -} - -//NewGomegaWithT takes a *testing.T and returngs a `GomegaWithT` allowing you to use `Expect`, `Eventually`, and `Consistently` along with -//Gomega's rich ecosystem of matchers in standard `testing` test suits. -// -// func TestFarmHasCow(t *testing.T) { -// g := GomegaWithT(t) -// -// f := farm.New([]string{"Cow", "Horse"}) -// g.Expect(f.HasCow()).To(BeTrue(), "Farm should have cow") -// } -func NewGomegaWithT(t types.GomegaTestingT) *GomegaWithT { - return &GomegaWithT{ - t: t, - } -} - -//See documentation for Expect -func (g *GomegaWithT) Expect(actual interface{}, extra ...interface{}) GomegaAssertion { - return assertion.New(actual, testingtsupport.BuildTestingTGomegaFailHandler(g.t), 0, extra...) -} - -//See documentation for Eventually -func (g *GomegaWithT) Eventually(actual interface{}, intervals ...interface{}) GomegaAsyncAssertion { - timeoutInterval := defaultEventuallyTimeout - pollingInterval := defaultEventuallyPollingInterval - if len(intervals) > 0 { - timeoutInterval = toDuration(intervals[0]) - } - if len(intervals) > 1 { - pollingInterval = toDuration(intervals[1]) - } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeEventually, actual, testingtsupport.BuildTestingTGomegaFailHandler(g.t), timeoutInterval, pollingInterval, 0) -} - -//See documentation for Consistently -func (g *GomegaWithT) Consistently(actual interface{}, intervals ...interface{}) GomegaAsyncAssertion { - timeoutInterval := defaultConsistentlyDuration - pollingInterval := defaultConsistentlyPollingInterval - if len(intervals) > 0 { - timeoutInterval = toDuration(intervals[0]) - } - if len(intervals) > 1 { - pollingInterval = toDuration(intervals[1]) - } - return asyncassertion.New(asyncassertion.AsyncAssertionTypeConsistently, actual, testingtsupport.BuildTestingTGomegaFailHandler(g.t), timeoutInterval, pollingInterval, 0) -} - -func toDuration(input interface{}) time.Duration { - duration, ok := input.(time.Duration) - if ok { - return duration - } - - value := reflect.ValueOf(input) - kind := reflect.TypeOf(input).Kind() - - if reflect.Int <= kind && kind <= reflect.Int64 { - return time.Duration(value.Int()) * time.Second - } else if reflect.Uint <= kind && kind <= reflect.Uint64 { - return time.Duration(value.Uint()) * time.Second - } else if reflect.Float32 <= kind && kind <= reflect.Float64 { - return time.Duration(value.Float() * float64(time.Second)) - } else if reflect.String == kind { - duration, err := time.ParseDuration(value.String()) - if err != nil { - panic(fmt.Sprintf("%#v is not a valid parsable duration string.", input)) - } - return duration - } - - panic(fmt.Sprintf("%v is not a valid interval. Must be time.Duration, parsable duration string or a number.", input)) -} diff --git a/vendor/github.com/onsi/gomega/gstruct/elements.go b/vendor/github.com/onsi/gomega/gstruct/elements.go deleted file mode 100644 index a315fa139..000000000 --- a/vendor/github.com/onsi/gomega/gstruct/elements.go +++ /dev/null @@ -1,145 +0,0 @@ -package gstruct - -import ( - "errors" - "fmt" - "reflect" - "runtime/debug" - - "github.com/onsi/gomega/format" - errorsutil "github.com/onsi/gomega/gstruct/errors" - "github.com/onsi/gomega/types" -) - -//MatchAllElements succeeds if every element of a slice matches the element matcher it maps to -//through the id function, and every element matcher is matched. -// Expect([]string{"a", "b"}).To(MatchAllElements(idFn, matchers.Elements{ -// "a": BeEqual("a"), -// "b": BeEqual("b"), -// }) -func MatchAllElements(identifier Identifier, elements Elements) types.GomegaMatcher { - return &ElementsMatcher{ - Identifier: identifier, - Elements: elements, - } -} - -//MatchElements succeeds if each element of a slice matches the element matcher it maps to -//through the id function. It can ignore extra elements and/or missing elements. -// Expect([]string{"a", "c"}).To(MatchElements(idFn, IgnoreMissing|IgnoreExtra, matchers.Elements{ -// "a": BeEqual("a") -// "b": BeEqual("b"), -// }) -func MatchElements(identifier Identifier, options Options, elements Elements) types.GomegaMatcher { - return &ElementsMatcher{ - Identifier: identifier, - Elements: elements, - IgnoreExtras: options&IgnoreExtras != 0, - IgnoreMissing: options&IgnoreMissing != 0, - AllowDuplicates: options&AllowDuplicates != 0, - } -} - -// ElementsMatcher is a NestingMatcher that applies custom matchers to each element of a slice mapped -// by the Identifier function. -// TODO: Extend this to work with arrays & maps (map the key) as well. -type ElementsMatcher struct { - // Matchers for each element. - Elements Elements - // Function mapping an element to the string key identifying its matcher. - Identifier Identifier - - // Whether to ignore extra elements or consider it an error. - IgnoreExtras bool - // Whether to ignore missing elements or consider it an error. - IgnoreMissing bool - // Whether to key duplicates when matching IDs. - AllowDuplicates bool - - // State. - failures []error -} - -// Element ID to matcher. -type Elements map[string]types.GomegaMatcher - -// Function for identifying (mapping) elements. -type Identifier func(element interface{}) string - -func (m *ElementsMatcher) Match(actual interface{}) (success bool, err error) { - if reflect.TypeOf(actual).Kind() != reflect.Slice { - return false, fmt.Errorf("%v is type %T, expected slice", actual, actual) - } - - m.failures = m.matchElements(actual) - if len(m.failures) > 0 { - return false, nil - } - return true, nil -} - -func (m *ElementsMatcher) matchElements(actual interface{}) (errs []error) { - // Provide more useful error messages in the case of a panic. - defer func() { - if err := recover(); err != nil { - errs = append(errs, fmt.Errorf("panic checking %+v: %v\n%s", actual, err, debug.Stack())) - } - }() - - val := reflect.ValueOf(actual) - elements := map[string]bool{} - for i := 0; i < val.Len(); i++ { - element := val.Index(i).Interface() - id := m.Identifier(element) - if elements[id] { - if !m.AllowDuplicates { - errs = append(errs, fmt.Errorf("found duplicate element ID %s", id)) - continue - } - } - elements[id] = true - - matcher, expected := m.Elements[id] - if !expected { - if !m.IgnoreExtras { - errs = append(errs, fmt.Errorf("unexpected element %s", id)) - } - continue - } - - match, err := matcher.Match(element) - if match { - continue - } - - if err == nil { - if nesting, ok := matcher.(errorsutil.NestingMatcher); ok { - err = errorsutil.AggregateError(nesting.Failures()) - } else { - err = errors.New(matcher.FailureMessage(element)) - } - } - errs = append(errs, errorsutil.Nest(fmt.Sprintf("[%s]", id), err)) - } - - for id := range m.Elements { - if !elements[id] && !m.IgnoreMissing { - errs = append(errs, fmt.Errorf("missing expected element %s", id)) - } - } - - return errs -} - -func (m *ElementsMatcher) FailureMessage(actual interface{}) (message string) { - failure := errorsutil.AggregateError(m.failures) - return format.Message(actual, fmt.Sprintf("to match elements: %v", failure)) -} - -func (m *ElementsMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to match elements") -} - -func (m *ElementsMatcher) Failures() []error { - return m.failures -} diff --git a/vendor/github.com/onsi/gomega/gstruct/errors/nested_types.go b/vendor/github.com/onsi/gomega/gstruct/errors/nested_types.go deleted file mode 100644 index 188492b21..000000000 --- a/vendor/github.com/onsi/gomega/gstruct/errors/nested_types.go +++ /dev/null @@ -1,72 +0,0 @@ -package errors - -import ( - "fmt" - "strings" - - "github.com/onsi/gomega/types" -) - -// A stateful matcher that nests other matchers within it and preserves the error types of the -// nested matcher failures. -type NestingMatcher interface { - types.GomegaMatcher - - // Returns the failures of nested matchers. - Failures() []error -} - -// An error type for labeling errors on deeply nested matchers. -type NestedError struct { - Path string - Err error -} - -func (e *NestedError) Error() string { - // Indent Errors. - indented := strings.Replace(e.Err.Error(), "\n", "\n\t", -1) - return fmt.Sprintf("%s:\n\t%v", e.Path, indented) -} - -// Create a NestedError with the given path. -// If err is a NestedError, prepend the path to it. -// If err is an AggregateError, recursively Nest each error. -func Nest(path string, err error) error { - if ag, ok := err.(AggregateError); ok { - var errs AggregateError - for _, e := range ag { - errs = append(errs, Nest(path, e)) - } - return errs - } - if ne, ok := err.(*NestedError); ok { - return &NestedError{ - Path: path + ne.Path, - Err: ne.Err, - } - } - return &NestedError{ - Path: path, - Err: err, - } -} - -// An error type for treating multiple errors as a single error. -type AggregateError []error - -// Error is part of the error interface. -func (err AggregateError) Error() string { - if len(err) == 0 { - // This should never happen, really. - return "" - } - if len(err) == 1 { - return err[0].Error() - } - result := fmt.Sprintf("[%s", err[0].Error()) - for i := 1; i < len(err); i++ { - result += fmt.Sprintf(", %s", err[i].Error()) - } - result += "]" - return result -} diff --git a/vendor/github.com/onsi/gomega/gstruct/fields.go b/vendor/github.com/onsi/gomega/gstruct/fields.go deleted file mode 100644 index 0020b873d..000000000 --- a/vendor/github.com/onsi/gomega/gstruct/fields.go +++ /dev/null @@ -1,141 +0,0 @@ -package gstruct - -import ( - "errors" - "fmt" - "reflect" - "runtime/debug" - "strings" - - "github.com/onsi/gomega/format" - errorsutil "github.com/onsi/gomega/gstruct/errors" - "github.com/onsi/gomega/types" -) - -//MatchAllFields succeeds if every field of a struct matches the field matcher associated with -//it, and every element matcher is matched. -// Expect([]string{"a", "b"}).To(MatchAllFields(gstruct.Fields{ -// "a": BeEqual("a"), -// "b": BeEqual("b"), -// }) -func MatchAllFields(fields Fields) types.GomegaMatcher { - return &FieldsMatcher{ - Fields: fields, - } -} - -//MatchFields succeeds if each element of a struct matches the field matcher associated with -//it. It can ignore extra fields and/or missing fields. -// Expect([]string{"a", "c"}).To(MatchFields(IgnoreMissing|IgnoreExtra, gstruct.Fields{ -// "a": BeEqual("a") -// "b": BeEqual("b"), -// }) -func MatchFields(options Options, fields Fields) types.GomegaMatcher { - return &FieldsMatcher{ - Fields: fields, - IgnoreExtras: options&IgnoreExtras != 0, - IgnoreMissing: options&IgnoreMissing != 0, - } -} - -type FieldsMatcher struct { - // Matchers for each field. - Fields Fields - - // Whether to ignore extra elements or consider it an error. - IgnoreExtras bool - // Whether to ignore missing elements or consider it an error. - IgnoreMissing bool - - // State. - failures []error -} - -// Field name to matcher. -type Fields map[string]types.GomegaMatcher - -func (m *FieldsMatcher) Match(actual interface{}) (success bool, err error) { - if reflect.TypeOf(actual).Kind() != reflect.Struct { - return false, fmt.Errorf("%v is type %T, expected struct", actual, actual) - } - - m.failures = m.matchFields(actual) - if len(m.failures) > 0 { - return false, nil - } - return true, nil -} - -func (m *FieldsMatcher) matchFields(actual interface{}) (errs []error) { - val := reflect.ValueOf(actual) - typ := val.Type() - fields := map[string]bool{} - for i := 0; i < val.NumField(); i++ { - fieldName := typ.Field(i).Name - fields[fieldName] = true - - err := func() (err error) { - // This test relies heavily on reflect, which tends to panic. - // Recover here to provide more useful error messages in that case. - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("panic checking %+v: %v\n%s", actual, r, debug.Stack()) - } - }() - - matcher, expected := m.Fields[fieldName] - if !expected { - if !m.IgnoreExtras { - return fmt.Errorf("unexpected field %s: %+v", fieldName, actual) - } - return nil - } - - var field interface{} - if val.Field(i).IsValid() { - field = val.Field(i).Interface() - } else { - field = reflect.Zero(typ.Field(i).Type) - } - - match, err := matcher.Match(field) - if err != nil { - return err - } else if !match { - if nesting, ok := matcher.(errorsutil.NestingMatcher); ok { - return errorsutil.AggregateError(nesting.Failures()) - } - return errors.New(matcher.FailureMessage(field)) - } - return nil - }() - if err != nil { - errs = append(errs, errorsutil.Nest("."+fieldName, err)) - } - } - - for field := range m.Fields { - if !fields[field] && !m.IgnoreMissing { - errs = append(errs, fmt.Errorf("missing expected field %s", field)) - } - } - - return errs -} - -func (m *FieldsMatcher) FailureMessage(actual interface{}) (message string) { - failures := make([]string, len(m.failures)) - for i := range m.failures { - failures[i] = m.failures[i].Error() - } - return format.Message(reflect.TypeOf(actual).Name(), - fmt.Sprintf("to match fields: {\n%v\n}\n", strings.Join(failures, "\n"))) -} - -func (m *FieldsMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to match fields") -} - -func (m *FieldsMatcher) Failures() []error { - return m.failures -} diff --git a/vendor/github.com/onsi/gomega/gstruct/ignore.go b/vendor/github.com/onsi/gomega/gstruct/ignore.go deleted file mode 100644 index 0365f32ad..000000000 --- a/vendor/github.com/onsi/gomega/gstruct/ignore.go +++ /dev/null @@ -1,37 +0,0 @@ -package gstruct - -import ( - "github.com/onsi/gomega/types" -) - -//Ignore ignores the actual value and always succeeds. -// Expect(nil).To(Ignore()) -// Expect(true).To(Ignore()) -func Ignore() types.GomegaMatcher { - return &IgnoreMatcher{true} -} - -//Reject ignores the actual value and always fails. It can be used in conjunction with IgnoreMissing -//to catch problematic elements, or to verify tests are running. -// Expect(nil).NotTo(Reject()) -// Expect(true).NotTo(Reject()) -func Reject() types.GomegaMatcher { - return &IgnoreMatcher{false} -} - -// A matcher that either always succeeds or always fails. -type IgnoreMatcher struct { - Succeed bool -} - -func (m *IgnoreMatcher) Match(actual interface{}) (bool, error) { - return m.Succeed, nil -} - -func (m *IgnoreMatcher) FailureMessage(_ interface{}) (message string) { - return "Unconditional failure" -} - -func (m *IgnoreMatcher) NegatedFailureMessage(_ interface{}) (message string) { - return "Unconditional success" -} diff --git a/vendor/github.com/onsi/gomega/gstruct/pointer.go b/vendor/github.com/onsi/gomega/gstruct/pointer.go deleted file mode 100644 index 0a2f35de3..000000000 --- a/vendor/github.com/onsi/gomega/gstruct/pointer.go +++ /dev/null @@ -1,56 +0,0 @@ -package gstruct - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" - "github.com/onsi/gomega/types" -) - -//PointTo applies the given matcher to the value pointed to by actual. It fails if the pointer is -//nil. -// actual := 5 -// Expect(&actual).To(PointTo(Equal(5))) -func PointTo(matcher types.GomegaMatcher) types.GomegaMatcher { - return &PointerMatcher{ - Matcher: matcher, - } -} - -type PointerMatcher struct { - Matcher types.GomegaMatcher - - // Failure message. - failure string -} - -func (m *PointerMatcher) Match(actual interface{}) (bool, error) { - val := reflect.ValueOf(actual) - - // return error if actual type is not a pointer - if val.Kind() != reflect.Ptr { - return false, fmt.Errorf("PointerMatcher expects a pointer but we have '%s'", val.Kind()) - } - - if !val.IsValid() || val.IsNil() { - m.failure = format.Message(actual, "not to be ") - return false, nil - } - - // Forward the value. - elem := val.Elem().Interface() - match, err := m.Matcher.Match(elem) - if !match { - m.failure = m.Matcher.FailureMessage(elem) - } - return match, err -} - -func (m *PointerMatcher) FailureMessage(_ interface{}) (message string) { - return m.failure -} - -func (m *PointerMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return m.Matcher.NegatedFailureMessage(actual) -} diff --git a/vendor/github.com/onsi/gomega/gstruct/types.go b/vendor/github.com/onsi/gomega/gstruct/types.go deleted file mode 100644 index 48cbbe8f6..000000000 --- a/vendor/github.com/onsi/gomega/gstruct/types.go +++ /dev/null @@ -1,15 +0,0 @@ -package gstruct - -//Options is the type for options passed to some matchers. -type Options int - -const ( - //IgnoreExtras tells the matcher to ignore extra elements or fields, rather than triggering a failure. - IgnoreExtras Options = 1 << iota - //IgnoreMissing tells the matcher to ignore missing elements or fields, rather than triggering a failure. - IgnoreMissing - //AllowDuplicates tells the matcher to permit multiple members of the slice to produce the same ID when - //considered by the indentifier function. All members that map to a given key must still match successfully - //with the matcher that is provided for that key. - AllowDuplicates -) diff --git a/vendor/github.com/onsi/gomega/internal/assertion/assertion.go b/vendor/github.com/onsi/gomega/internal/assertion/assertion.go deleted file mode 100644 index b73673f21..000000000 --- a/vendor/github.com/onsi/gomega/internal/assertion/assertion.go +++ /dev/null @@ -1,98 +0,0 @@ -package assertion - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/types" -) - -type Assertion struct { - actualInput interface{} - fail types.GomegaFailHandler - offset int - extra []interface{} -} - -func New(actualInput interface{}, fail types.GomegaFailHandler, offset int, extra ...interface{}) *Assertion { - return &Assertion{ - actualInput: actualInput, - fail: fail, - offset: offset, - extra: extra, - } -} - -func (assertion *Assertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, true, optionalDescription...) -} - -func (assertion *Assertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, false, optionalDescription...) -} - -func (assertion *Assertion) To(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, true, optionalDescription...) -} - -func (assertion *Assertion) ToNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, false, optionalDescription...) -} - -func (assertion *Assertion) NotTo(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.vetExtras(optionalDescription...) && assertion.match(matcher, false, optionalDescription...) -} - -func (assertion *Assertion) buildDescription(optionalDescription ...interface{}) string { - switch len(optionalDescription) { - case 0: - return "" - default: - return fmt.Sprintf(optionalDescription[0].(string), optionalDescription[1:]...) + "\n" - } -} - -func (assertion *Assertion) match(matcher types.GomegaMatcher, desiredMatch bool, optionalDescription ...interface{}) bool { - matches, err := matcher.Match(assertion.actualInput) - description := assertion.buildDescription(optionalDescription...) - if err != nil { - assertion.fail(description+err.Error(), 2+assertion.offset) - return false - } - if matches != desiredMatch { - var message string - if desiredMatch { - message = matcher.FailureMessage(assertion.actualInput) - } else { - message = matcher.NegatedFailureMessage(assertion.actualInput) - } - assertion.fail(description+message, 2+assertion.offset) - return false - } - - return true -} - -func (assertion *Assertion) vetExtras(optionalDescription ...interface{}) bool { - success, message := vetExtras(assertion.extra) - if success { - return true - } - - description := assertion.buildDescription(optionalDescription...) - assertion.fail(description+message, 2+assertion.offset) - return false -} - -func vetExtras(extras []interface{}) (bool, string) { - for i, extra := range extras { - if extra != nil { - zeroValue := reflect.Zero(reflect.TypeOf(extra)).Interface() - if !reflect.DeepEqual(zeroValue, extra) { - message := fmt.Sprintf("Unexpected non-nil/non-zero extra argument at index %d:\n\t<%T>: %#v", i+1, extra, extra) - return false, message - } - } - } - return true, "" -} diff --git a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go b/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go deleted file mode 100644 index bce085300..000000000 --- a/vendor/github.com/onsi/gomega/internal/asyncassertion/async_assertion.go +++ /dev/null @@ -1,189 +0,0 @@ -package asyncassertion - -import ( - "errors" - "fmt" - "reflect" - "time" - - "github.com/onsi/gomega/internal/oraclematcher" - "github.com/onsi/gomega/types" -) - -type AsyncAssertionType uint - -const ( - AsyncAssertionTypeEventually AsyncAssertionType = iota - AsyncAssertionTypeConsistently -) - -type AsyncAssertion struct { - asyncType AsyncAssertionType - actualInput interface{} - timeoutInterval time.Duration - pollingInterval time.Duration - fail types.GomegaFailHandler - offset int -} - -func New(asyncType AsyncAssertionType, actualInput interface{}, fail types.GomegaFailHandler, timeoutInterval time.Duration, pollingInterval time.Duration, offset int) *AsyncAssertion { - actualType := reflect.TypeOf(actualInput) - if actualType.Kind() == reflect.Func { - if actualType.NumIn() != 0 || actualType.NumOut() == 0 { - panic("Expected a function with no arguments and one or more return values.") - } - } - - return &AsyncAssertion{ - asyncType: asyncType, - actualInput: actualInput, - fail: fail, - timeoutInterval: timeoutInterval, - pollingInterval: pollingInterval, - offset: offset, - } -} - -func (assertion *AsyncAssertion) Should(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.match(matcher, true, optionalDescription...) -} - -func (assertion *AsyncAssertion) ShouldNot(matcher types.GomegaMatcher, optionalDescription ...interface{}) bool { - return assertion.match(matcher, false, optionalDescription...) -} - -func (assertion *AsyncAssertion) buildDescription(optionalDescription ...interface{}) string { - switch len(optionalDescription) { - case 0: - return "" - default: - return fmt.Sprintf(optionalDescription[0].(string), optionalDescription[1:]...) + "\n" - } -} - -func (assertion *AsyncAssertion) actualInputIsAFunction() bool { - actualType := reflect.TypeOf(assertion.actualInput) - return actualType.Kind() == reflect.Func && actualType.NumIn() == 0 && actualType.NumOut() > 0 -} - -func (assertion *AsyncAssertion) pollActual() (interface{}, error) { - if assertion.actualInputIsAFunction() { - values := reflect.ValueOf(assertion.actualInput).Call([]reflect.Value{}) - - extras := []interface{}{} - for _, value := range values[1:] { - extras = append(extras, value.Interface()) - } - - success, message := vetExtras(extras) - - if !success { - return nil, errors.New(message) - } - - return values[0].Interface(), nil - } - - return assertion.actualInput, nil -} - -func (assertion *AsyncAssertion) matcherMayChange(matcher types.GomegaMatcher, value interface{}) bool { - if assertion.actualInputIsAFunction() { - return true - } - - return oraclematcher.MatchMayChangeInTheFuture(matcher, value) -} - -func (assertion *AsyncAssertion) match(matcher types.GomegaMatcher, desiredMatch bool, optionalDescription ...interface{}) bool { - timer := time.Now() - timeout := time.After(assertion.timeoutInterval) - - description := assertion.buildDescription(optionalDescription...) - - var matches bool - var err error - mayChange := true - value, err := assertion.pollActual() - if err == nil { - mayChange = assertion.matcherMayChange(matcher, value) - matches, err = matcher.Match(value) - } - - fail := func(preamble string) { - errMsg := "" - message := "" - if err != nil { - errMsg = "Error: " + err.Error() - } else { - if desiredMatch { - message = matcher.FailureMessage(value) - } else { - message = matcher.NegatedFailureMessage(value) - } - } - assertion.fail(fmt.Sprintf("%s after %.3fs.\n%s%s%s", preamble, time.Since(timer).Seconds(), description, message, errMsg), 3+assertion.offset) - } - - if assertion.asyncType == AsyncAssertionTypeEventually { - for { - if err == nil && matches == desiredMatch { - return true - } - - if !mayChange { - fail("No future change is possible. Bailing out early") - return false - } - - select { - case <-time.After(assertion.pollingInterval): - value, err = assertion.pollActual() - if err == nil { - mayChange = assertion.matcherMayChange(matcher, value) - matches, err = matcher.Match(value) - } - case <-timeout: - fail("Timed out") - return false - } - } - } else if assertion.asyncType == AsyncAssertionTypeConsistently { - for { - if !(err == nil && matches == desiredMatch) { - fail("Failed") - return false - } - - if !mayChange { - return true - } - - select { - case <-time.After(assertion.pollingInterval): - value, err = assertion.pollActual() - if err == nil { - mayChange = assertion.matcherMayChange(matcher, value) - matches, err = matcher.Match(value) - } - case <-timeout: - return true - } - } - } - - return false -} - -func vetExtras(extras []interface{}) (bool, string) { - for i, extra := range extras { - if extra != nil { - zeroValue := reflect.Zero(reflect.TypeOf(extra)).Interface() - if !reflect.DeepEqual(zeroValue, extra) { - message := fmt.Sprintf("Unexpected non-nil/non-zero extra argument at index %d:\n\t<%T>: %#v", i+1, extra, extra) - return false, message - } - } - } - return true, "" -} diff --git a/vendor/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go b/vendor/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go deleted file mode 100644 index 6e351a7de..000000000 --- a/vendor/github.com/onsi/gomega/internal/fakematcher/fake_matcher.go +++ /dev/null @@ -1,23 +0,0 @@ -package fakematcher - -import "fmt" - -type FakeMatcher struct { - ReceivedActual interface{} - MatchesToReturn bool - ErrToReturn error -} - -func (matcher *FakeMatcher) Match(actual interface{}) (bool, error) { - matcher.ReceivedActual = actual - - return matcher.MatchesToReturn, matcher.ErrToReturn -} - -func (matcher *FakeMatcher) FailureMessage(actual interface{}) string { - return fmt.Sprintf("positive: %v", actual) -} - -func (matcher *FakeMatcher) NegatedFailureMessage(actual interface{}) string { - return fmt.Sprintf("negative: %v", actual) -} diff --git a/vendor/github.com/onsi/gomega/internal/oraclematcher/oracle_matcher.go b/vendor/github.com/onsi/gomega/internal/oraclematcher/oracle_matcher.go deleted file mode 100644 index 66cad88a1..000000000 --- a/vendor/github.com/onsi/gomega/internal/oraclematcher/oracle_matcher.go +++ /dev/null @@ -1,25 +0,0 @@ -package oraclematcher - -import "github.com/onsi/gomega/types" - -/* -GomegaMatchers that also match the OracleMatcher interface can convey information about -whether or not their result will change upon future attempts. - -This allows `Eventually` and `Consistently` to short circuit if success becomes impossible. - -For example, a process' exit code can never change. So, gexec's Exit matcher returns `true` -for `MatchMayChangeInTheFuture` until the process exits, at which point it returns `false` forevermore. -*/ -type OracleMatcher interface { - MatchMayChangeInTheFuture(actual interface{}) bool -} - -func MatchMayChangeInTheFuture(matcher types.GomegaMatcher, value interface{}) bool { - oracleMatcher, ok := matcher.(OracleMatcher) - if !ok { - return true - } - - return oracleMatcher.MatchMayChangeInTheFuture(value) -} diff --git a/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go b/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go deleted file mode 100644 index ac8912525..000000000 --- a/vendor/github.com/onsi/gomega/internal/testingtsupport/testing_t_support.go +++ /dev/null @@ -1,40 +0,0 @@ -package testingtsupport - -import ( - "regexp" - "runtime/debug" - "strings" - - "github.com/onsi/gomega/types" -) - -type gomegaTestingT interface { - Fatalf(format string, args ...interface{}) -} - -func BuildTestingTGomegaFailHandler(t gomegaTestingT) types.GomegaFailHandler { - return func(message string, callerSkip ...int) { - skip := 1 - if len(callerSkip) > 0 { - skip = callerSkip[0] - } - stackTrace := pruneStack(string(debug.Stack()), skip) - t.Fatalf("\n%s\n%s", stackTrace, message) - } -} - -func pruneStack(fullStackTrace string, skip int) string { - stack := strings.Split(fullStackTrace, "\n") - if len(stack) > 2*(skip+1) { - stack = stack[2*(skip+1):] - } - prunedStack := []string{} - re := regexp.MustCompile(`\/ginkgo\/|\/pkg\/testing\/|\/pkg\/runtime\/`) - for i := 0; i < len(stack)/2; i++ { - if !re.Match([]byte(stack[i*2])) { - prunedStack = append(prunedStack, stack[i*2]) - prunedStack = append(prunedStack, stack[i*2+1]) - } - } - return strings.Join(prunedStack, "\n") -} diff --git a/vendor/github.com/onsi/gomega/matchers.go b/vendor/github.com/onsi/gomega/matchers.go deleted file mode 100644 index b064925c6..000000000 --- a/vendor/github.com/onsi/gomega/matchers.go +++ /dev/null @@ -1,427 +0,0 @@ -package gomega - -import ( - "time" - - "github.com/onsi/gomega/matchers" - "github.com/onsi/gomega/types" -) - -//Equal uses reflect.DeepEqual to compare actual with expected. Equal is strict about -//types when performing comparisons. -//It is an error for both actual and expected to be nil. Use BeNil() instead. -func Equal(expected interface{}) types.GomegaMatcher { - return &matchers.EqualMatcher{ - Expected: expected, - } -} - -//BeEquivalentTo is more lax than Equal, allowing equality between different types. -//This is done by converting actual to have the type of expected before -//attempting equality with reflect.DeepEqual. -//It is an error for actual and expected to be nil. Use BeNil() instead. -func BeEquivalentTo(expected interface{}) types.GomegaMatcher { - return &matchers.BeEquivalentToMatcher{ - Expected: expected, - } -} - -//BeIdenticalTo uses the == operator to compare actual with expected. -//BeIdenticalTo is strict about types when performing comparisons. -//It is an error for both actual and expected to be nil. Use BeNil() instead. -func BeIdenticalTo(expected interface{}) types.GomegaMatcher { - return &matchers.BeIdenticalToMatcher{ - Expected: expected, - } -} - -//BeNil succeeds if actual is nil -func BeNil() types.GomegaMatcher { - return &matchers.BeNilMatcher{} -} - -//BeTrue succeeds if actual is true -func BeTrue() types.GomegaMatcher { - return &matchers.BeTrueMatcher{} -} - -//BeFalse succeeds if actual is false -func BeFalse() types.GomegaMatcher { - return &matchers.BeFalseMatcher{} -} - -//HaveOccurred succeeds if actual is a non-nil error -//The typical Go error checking pattern looks like: -// err := SomethingThatMightFail() -// Ω(err).ShouldNot(HaveOccurred()) -func HaveOccurred() types.GomegaMatcher { - return &matchers.HaveOccurredMatcher{} -} - -//Succeed passes if actual is a nil error -//Succeed is intended to be used with functions that return a single error value. Instead of -// err := SomethingThatMightFail() -// Ω(err).ShouldNot(HaveOccurred()) -// -//You can write: -// Ω(SomethingThatMightFail()).Should(Succeed()) -// -//It is a mistake to use Succeed with a function that has multiple return values. Gomega's Ω and Expect -//functions automatically trigger failure if any return values after the first return value are non-zero/non-nil. -//This means that Ω(MultiReturnFunc()).ShouldNot(Succeed()) can never pass. -func Succeed() types.GomegaMatcher { - return &matchers.SucceedMatcher{} -} - -//MatchError succeeds if actual is a non-nil error that matches the passed in string/error. -// -//These are valid use-cases: -// Ω(err).Should(MatchError("an error")) //asserts that err.Error() == "an error" -// Ω(err).Should(MatchError(SomeError)) //asserts that err == SomeError (via reflect.DeepEqual) -// -//It is an error for err to be nil or an object that does not implement the Error interface -func MatchError(expected interface{}) types.GomegaMatcher { - return &matchers.MatchErrorMatcher{ - Expected: expected, - } -} - -//BeClosed succeeds if actual is a closed channel. -//It is an error to pass a non-channel to BeClosed, it is also an error to pass nil -// -//In order to check whether or not the channel is closed, Gomega must try to read from the channel -//(even in the `ShouldNot(BeClosed())` case). You should keep this in mind if you wish to make subsequent assertions about -//values coming down the channel. -// -//Also, if you are testing that a *buffered* channel is closed you must first read all values out of the channel before -//asserting that it is closed (it is not possible to detect that a buffered-channel has been closed until all its buffered values are read). -// -//Finally, as a corollary: it is an error to check whether or not a send-only channel is closed. -func BeClosed() types.GomegaMatcher { - return &matchers.BeClosedMatcher{} -} - -//Receive succeeds if there is a value to be received on actual. -//Actual must be a channel (and cannot be a send-only channel) -- anything else is an error. -// -//Receive returns immediately and never blocks: -// -//- If there is nothing on the channel `c` then Ω(c).Should(Receive()) will fail and Ω(c).ShouldNot(Receive()) will pass. -// -//- If the channel `c` is closed then Ω(c).Should(Receive()) will fail and Ω(c).ShouldNot(Receive()) will pass. -// -//- If there is something on the channel `c` ready to be read, then Ω(c).Should(Receive()) will pass and Ω(c).ShouldNot(Receive()) will fail. -// -//If you have a go-routine running in the background that will write to channel `c` you can: -// Eventually(c).Should(Receive()) -// -//This will timeout if nothing gets sent to `c` (you can modify the timeout interval as you normally do with `Eventually`) -// -//A similar use-case is to assert that no go-routine writes to a channel (for a period of time). You can do this with `Consistently`: -// Consistently(c).ShouldNot(Receive()) -// -//You can pass `Receive` a matcher. If you do so, it will match the received object against the matcher. For example: -// Ω(c).Should(Receive(Equal("foo"))) -// -//When given a matcher, `Receive` will always fail if there is nothing to be received on the channel. -// -//Passing Receive a matcher is especially useful when paired with Eventually: -// -// Eventually(c).Should(Receive(ContainSubstring("bar"))) -// -//will repeatedly attempt to pull values out of `c` until a value matching "bar" is received. -// -//Finally, if you want to have a reference to the value *sent* to the channel you can pass the `Receive` matcher a pointer to a variable of the appropriate type: -// var myThing thing -// Eventually(thingChan).Should(Receive(&myThing)) -// Ω(myThing.Sprocket).Should(Equal("foo")) -// Ω(myThing.IsValid()).Should(BeTrue()) -func Receive(args ...interface{}) types.GomegaMatcher { - var arg interface{} - if len(args) > 0 { - arg = args[0] - } - - return &matchers.ReceiveMatcher{ - Arg: arg, - } -} - -//BeSent succeeds if a value can be sent to actual. -//Actual must be a channel (and cannot be a receive-only channel) that can sent the type of the value passed into BeSent -- anything else is an error. -//In addition, actual must not be closed. -// -//BeSent never blocks: -// -//- If the channel `c` is not ready to receive then Ω(c).Should(BeSent("foo")) will fail immediately -//- If the channel `c` is eventually ready to receive then Eventually(c).Should(BeSent("foo")) will succeed.. presuming the channel becomes ready to receive before Eventually's timeout -//- If the channel `c` is closed then Ω(c).Should(BeSent("foo")) and Ω(c).ShouldNot(BeSent("foo")) will both fail immediately -// -//Of course, the value is actually sent to the channel. The point of `BeSent` is less to make an assertion about the availability of the channel (which is typically an implementation detail that your test should not be concerned with). -//Rather, the point of `BeSent` is to make it possible to easily and expressively write tests that can timeout on blocked channel sends. -func BeSent(arg interface{}) types.GomegaMatcher { - return &matchers.BeSentMatcher{ - Arg: arg, - } -} - -//MatchRegexp succeeds if actual is a string or stringer that matches the -//passed-in regexp. Optional arguments can be provided to construct a regexp -//via fmt.Sprintf(). -func MatchRegexp(regexp string, args ...interface{}) types.GomegaMatcher { - return &matchers.MatchRegexpMatcher{ - Regexp: regexp, - Args: args, - } -} - -//ContainSubstring succeeds if actual is a string or stringer that contains the -//passed-in substring. Optional arguments can be provided to construct the substring -//via fmt.Sprintf(). -func ContainSubstring(substr string, args ...interface{}) types.GomegaMatcher { - return &matchers.ContainSubstringMatcher{ - Substr: substr, - Args: args, - } -} - -//HavePrefix succeeds if actual is a string or stringer that contains the -//passed-in string as a prefix. Optional arguments can be provided to construct -//via fmt.Sprintf(). -func HavePrefix(prefix string, args ...interface{}) types.GomegaMatcher { - return &matchers.HavePrefixMatcher{ - Prefix: prefix, - Args: args, - } -} - -//HaveSuffix succeeds if actual is a string or stringer that contains the -//passed-in string as a suffix. Optional arguments can be provided to construct -//via fmt.Sprintf(). -func HaveSuffix(suffix string, args ...interface{}) types.GomegaMatcher { - return &matchers.HaveSuffixMatcher{ - Suffix: suffix, - Args: args, - } -} - -//MatchJSON succeeds if actual is a string or stringer of JSON that matches -//the expected JSON. The JSONs are decoded and the resulting objects are compared via -//reflect.DeepEqual so things like key-ordering and whitespace shouldn't matter. -func MatchJSON(json interface{}) types.GomegaMatcher { - return &matchers.MatchJSONMatcher{ - JSONToMatch: json, - } -} - -//MatchXML succeeds if actual is a string or stringer of XML that matches -//the expected XML. The XMLs are decoded and the resulting objects are compared via -//reflect.DeepEqual so things like whitespaces shouldn't matter. -func MatchXML(xml interface{}) types.GomegaMatcher { - return &matchers.MatchXMLMatcher{ - XMLToMatch: xml, - } -} - -//MatchYAML succeeds if actual is a string or stringer of YAML that matches -//the expected YAML. The YAML's are decoded and the resulting objects are compared via -//reflect.DeepEqual so things like key-ordering and whitespace shouldn't matter. -func MatchYAML(yaml interface{}) types.GomegaMatcher { - return &matchers.MatchYAMLMatcher{ - YAMLToMatch: yaml, - } -} - -//BeEmpty succeeds if actual is empty. Actual must be of type string, array, map, chan, or slice. -func BeEmpty() types.GomegaMatcher { - return &matchers.BeEmptyMatcher{} -} - -//HaveLen succeeds if actual has the passed-in length. Actual must be of type string, array, map, chan, or slice. -func HaveLen(count int) types.GomegaMatcher { - return &matchers.HaveLenMatcher{ - Count: count, - } -} - -//HaveCap succeeds if actual has the passed-in capacity. Actual must be of type array, chan, or slice. -func HaveCap(count int) types.GomegaMatcher { - return &matchers.HaveCapMatcher{ - Count: count, - } -} - -//BeZero succeeds if actual is the zero value for its type or if actual is nil. -func BeZero() types.GomegaMatcher { - return &matchers.BeZeroMatcher{} -} - -//ContainElement succeeds if actual contains the passed in element. -//By default ContainElement() uses Equal() to perform the match, however a -//matcher can be passed in instead: -// Ω([]string{"Foo", "FooBar"}).Should(ContainElement(ContainSubstring("Bar"))) -// -//Actual must be an array, slice or map. -//For maps, ContainElement searches through the map's values. -func ContainElement(element interface{}) types.GomegaMatcher { - return &matchers.ContainElementMatcher{ - Element: element, - } -} - -//ConsistOf succeeds if actual contains precisely the elements passed into the matcher. The ordering of the elements does not matter. -//By default ConsistOf() uses Equal() to match the elements, however custom matchers can be passed in instead. Here are some examples: -// -// Ω([]string{"Foo", "FooBar"}).Should(ConsistOf("FooBar", "Foo")) -// Ω([]string{"Foo", "FooBar"}).Should(ConsistOf(ContainSubstring("Bar"), "Foo")) -// Ω([]string{"Foo", "FooBar"}).Should(ConsistOf(ContainSubstring("Foo"), ContainSubstring("Foo"))) -// -//Actual must be an array, slice or map. For maps, ConsistOf matches against the map's values. -// -//You typically pass variadic arguments to ConsistOf (as in the examples above). However, if you need to pass in a slice you can provided that it -//is the only element passed in to ConsistOf: -// -// Ω([]string{"Foo", "FooBar"}).Should(ConsistOf([]string{"FooBar", "Foo"})) -// -//Note that Go's type system does not allow you to write this as ConsistOf([]string{"FooBar", "Foo"}...) as []string and []interface{} are different types - hence the need for this special rule. -func ConsistOf(elements ...interface{}) types.GomegaMatcher { - return &matchers.ConsistOfMatcher{ - Elements: elements, - } -} - -//HaveKey succeeds if actual is a map with the passed in key. -//By default HaveKey uses Equal() to perform the match, however a -//matcher can be passed in instead: -// Ω(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKey(MatchRegexp(`.+Foo$`))) -func HaveKey(key interface{}) types.GomegaMatcher { - return &matchers.HaveKeyMatcher{ - Key: key, - } -} - -//HaveKeyWithValue succeeds if actual is a map with the passed in key and value. -//By default HaveKeyWithValue uses Equal() to perform the match, however a -//matcher can be passed in instead: -// Ω(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKeyWithValue("Foo", "Bar")) -// Ω(map[string]string{"Foo": "Bar", "BazFoo": "Duck"}).Should(HaveKeyWithValue(MatchRegexp(`.+Foo$`), "Bar")) -func HaveKeyWithValue(key interface{}, value interface{}) types.GomegaMatcher { - return &matchers.HaveKeyWithValueMatcher{ - Key: key, - Value: value, - } -} - -//BeNumerically performs numerical assertions in a type-agnostic way. -//Actual and expected should be numbers, though the specific type of -//number is irrelevant (floa32, float64, uint8, etc...). -// -//There are six, self-explanatory, supported comparators: -// Ω(1.0).Should(BeNumerically("==", 1)) -// Ω(1.0).Should(BeNumerically("~", 0.999, 0.01)) -// Ω(1.0).Should(BeNumerically(">", 0.9)) -// Ω(1.0).Should(BeNumerically(">=", 1.0)) -// Ω(1.0).Should(BeNumerically("<", 3)) -// Ω(1.0).Should(BeNumerically("<=", 1.0)) -func BeNumerically(comparator string, compareTo ...interface{}) types.GomegaMatcher { - return &matchers.BeNumericallyMatcher{ - Comparator: comparator, - CompareTo: compareTo, - } -} - -//BeTemporally compares time.Time's like BeNumerically -//Actual and expected must be time.Time. The comparators are the same as for BeNumerically -// Ω(time.Now()).Should(BeTemporally(">", time.Time{})) -// Ω(time.Now()).Should(BeTemporally("~", time.Now(), time.Second)) -func BeTemporally(comparator string, compareTo time.Time, threshold ...time.Duration) types.GomegaMatcher { - return &matchers.BeTemporallyMatcher{ - Comparator: comparator, - CompareTo: compareTo, - Threshold: threshold, - } -} - -//BeAssignableToTypeOf succeeds if actual is assignable to the type of expected. -//It will return an error when one of the values is nil. -// Ω(0).Should(BeAssignableToTypeOf(0)) // Same values -// Ω(5).Should(BeAssignableToTypeOf(-1)) // different values same type -// Ω("foo").Should(BeAssignableToTypeOf("bar")) // different values same type -// Ω(struct{ Foo string }{}).Should(BeAssignableToTypeOf(struct{ Foo string }{})) -func BeAssignableToTypeOf(expected interface{}) types.GomegaMatcher { - return &matchers.AssignableToTypeOfMatcher{ - Expected: expected, - } -} - -//Panic succeeds if actual is a function that, when invoked, panics. -//Actual must be a function that takes no arguments and returns no results. -func Panic() types.GomegaMatcher { - return &matchers.PanicMatcher{} -} - -//BeAnExistingFile succeeds if a file exists. -//Actual must be a string representing the abs path to the file being checked. -func BeAnExistingFile() types.GomegaMatcher { - return &matchers.BeAnExistingFileMatcher{} -} - -//BeARegularFile succeeds if a file exists and is a regular file. -//Actual must be a string representing the abs path to the file being checked. -func BeARegularFile() types.GomegaMatcher { - return &matchers.BeARegularFileMatcher{} -} - -//BeADirectory succeeds if a file exists and is a directory. -//Actual must be a string representing the abs path to the file being checked. -func BeADirectory() types.GomegaMatcher { - return &matchers.BeADirectoryMatcher{} -} - -//And succeeds only if all of the given matchers succeed. -//The matchers are tried in order, and will fail-fast if one doesn't succeed. -// Expect("hi").To(And(HaveLen(2), Equal("hi")) -// -//And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. -func And(ms ...types.GomegaMatcher) types.GomegaMatcher { - return &matchers.AndMatcher{Matchers: ms} -} - -//SatisfyAll is an alias for And(). -// Ω("hi").Should(SatisfyAll(HaveLen(2), Equal("hi"))) -func SatisfyAll(matchers ...types.GomegaMatcher) types.GomegaMatcher { - return And(matchers...) -} - -//Or succeeds if any of the given matchers succeed. -//The matchers are tried in order and will return immediately upon the first successful match. -// Expect("hi").To(Or(HaveLen(3), HaveLen(2)) -// -//And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. -func Or(ms ...types.GomegaMatcher) types.GomegaMatcher { - return &matchers.OrMatcher{Matchers: ms} -} - -//SatisfyAny is an alias for Or(). -// Expect("hi").SatisfyAny(Or(HaveLen(3), HaveLen(2)) -func SatisfyAny(matchers ...types.GomegaMatcher) types.GomegaMatcher { - return Or(matchers...) -} - -//Not negates the given matcher; it succeeds if the given matcher fails. -// Expect(1).To(Not(Equal(2)) -// -//And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. -func Not(matcher types.GomegaMatcher) types.GomegaMatcher { - return &matchers.NotMatcher{Matcher: matcher} -} - -//WithTransform applies the `transform` to the actual value and matches it against `matcher`. -//The given transform must be a function of one parameter that returns one value. -// var plus1 = func(i int) int { return i + 1 } -// Expect(1).To(WithTransform(plus1, Equal(2)) -// -//And(), Or(), Not() and WithTransform() allow matchers to be composed into complex expressions. -func WithTransform(transform interface{}, matcher types.GomegaMatcher) types.GomegaMatcher { - return matchers.NewWithTransformMatcher(transform, matcher) -} diff --git a/vendor/github.com/onsi/gomega/matchers/and.go b/vendor/github.com/onsi/gomega/matchers/and.go deleted file mode 100644 index d83a29164..000000000 --- a/vendor/github.com/onsi/gomega/matchers/and.go +++ /dev/null @@ -1,63 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" - "github.com/onsi/gomega/internal/oraclematcher" - "github.com/onsi/gomega/types" -) - -type AndMatcher struct { - Matchers []types.GomegaMatcher - - // state - firstFailedMatcher types.GomegaMatcher -} - -func (m *AndMatcher) Match(actual interface{}) (success bool, err error) { - m.firstFailedMatcher = nil - for _, matcher := range m.Matchers { - success, err := matcher.Match(actual) - if !success || err != nil { - m.firstFailedMatcher = matcher - return false, err - } - } - return true, nil -} - -func (m *AndMatcher) FailureMessage(actual interface{}) (message string) { - return m.firstFailedMatcher.FailureMessage(actual) -} - -func (m *AndMatcher) NegatedFailureMessage(actual interface{}) (message string) { - // not the most beautiful list of matchers, but not bad either... - return format.Message(actual, fmt.Sprintf("To not satisfy all of these matchers: %s", m.Matchers)) -} - -func (m *AndMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - /* - Example with 3 matchers: A, B, C - - Match evaluates them: T, F, => F - So match is currently F, what should MatchMayChangeInTheFuture() return? - Seems like it only depends on B, since currently B MUST change to allow the result to become T - - Match eval: T, T, T => T - So match is currently T, what should MatchMayChangeInTheFuture() return? - Seems to depend on ANY of them being able to change to F. - */ - - if m.firstFailedMatcher == nil { - // so all matchers succeeded.. Any one of them changing would change the result. - for _, matcher := range m.Matchers { - if oraclematcher.MatchMayChangeInTheFuture(matcher, actual) { - return true - } - } - return false // none of were going to change - } - // one of the matchers failed.. it must be able to change in order to affect the result - return oraclematcher.MatchMayChangeInTheFuture(m.firstFailedMatcher, actual) -} diff --git a/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go b/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go deleted file mode 100644 index 89a1fc211..000000000 --- a/vendor/github.com/onsi/gomega/matchers/assignable_to_type_of_matcher.go +++ /dev/null @@ -1,31 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type AssignableToTypeOfMatcher struct { - Expected interface{} -} - -func (matcher *AssignableToTypeOfMatcher) Match(actual interface{}) (success bool, err error) { - if actual == nil || matcher.Expected == nil { - return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") - } - - actualType := reflect.TypeOf(actual) - expectedType := reflect.TypeOf(matcher.Expected) - - return actualType.AssignableTo(expectedType), nil -} - -func (matcher *AssignableToTypeOfMatcher) FailureMessage(actual interface{}) string { - return format.Message(actual, fmt.Sprintf("to be assignable to the type: %T", matcher.Expected)) -} - -func (matcher *AssignableToTypeOfMatcher) NegatedFailureMessage(actual interface{}) string { - return format.Message(actual, fmt.Sprintf("not to be assignable to the type: %T", matcher.Expected)) -} diff --git a/vendor/github.com/onsi/gomega/matchers/attributes_slice.go b/vendor/github.com/onsi/gomega/matchers/attributes_slice.go deleted file mode 100644 index 355b362f4..000000000 --- a/vendor/github.com/onsi/gomega/matchers/attributes_slice.go +++ /dev/null @@ -1,14 +0,0 @@ -package matchers - -import ( - "encoding/xml" - "strings" -) - -type attributesSlice []xml.Attr - -func (attrs attributesSlice) Len() int { return len(attrs) } -func (attrs attributesSlice) Less(i, j int) bool { - return strings.Compare(attrs[i].Name.Local, attrs[j].Name.Local) == -1 -} -func (attrs attributesSlice) Swap(i, j int) { attrs[i], attrs[j] = attrs[j], attrs[i] } diff --git a/vendor/github.com/onsi/gomega/matchers/be_a_directory.go b/vendor/github.com/onsi/gomega/matchers/be_a_directory.go deleted file mode 100644 index 7b6975e41..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_a_directory.go +++ /dev/null @@ -1,54 +0,0 @@ -package matchers - -import ( - "fmt" - "os" - - "github.com/onsi/gomega/format" -) - -type notADirectoryError struct { - os.FileInfo -} - -func (t notADirectoryError) Error() string { - fileInfo := os.FileInfo(t) - switch { - case fileInfo.Mode().IsRegular(): - return "file is a regular file" - default: - return fmt.Sprintf("file mode is: %s", fileInfo.Mode().String()) - } -} - -type BeADirectoryMatcher struct { - expected interface{} - err error -} - -func (matcher *BeADirectoryMatcher) Match(actual interface{}) (success bool, err error) { - actualFilename, ok := actual.(string) - if !ok { - return false, fmt.Errorf("BeADirectoryMatcher matcher expects a file path") - } - - fileInfo, err := os.Stat(actualFilename) - if err != nil { - matcher.err = err - return false, nil - } - - if !fileInfo.Mode().IsDir() { - matcher.err = notADirectoryError{fileInfo} - return false, nil - } - return true, nil -} - -func (matcher *BeADirectoryMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("to be a directory: %s", matcher.err)) -} - -func (matcher *BeADirectoryMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not be a directory")) -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go b/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go deleted file mode 100644 index e239131fb..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_a_regular_file.go +++ /dev/null @@ -1,54 +0,0 @@ -package matchers - -import ( - "fmt" - "os" - - "github.com/onsi/gomega/format" -) - -type notARegularFileError struct { - os.FileInfo -} - -func (t notARegularFileError) Error() string { - fileInfo := os.FileInfo(t) - switch { - case fileInfo.IsDir(): - return "file is a directory" - default: - return fmt.Sprintf("file mode is: %s", fileInfo.Mode().String()) - } -} - -type BeARegularFileMatcher struct { - expected interface{} - err error -} - -func (matcher *BeARegularFileMatcher) Match(actual interface{}) (success bool, err error) { - actualFilename, ok := actual.(string) - if !ok { - return false, fmt.Errorf("BeARegularFileMatcher matcher expects a file path") - } - - fileInfo, err := os.Stat(actualFilename) - if err != nil { - matcher.err = err - return false, nil - } - - if !fileInfo.Mode().IsRegular() { - matcher.err = notARegularFileError{fileInfo} - return false, nil - } - return true, nil -} - -func (matcher *BeARegularFileMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("to be a regular file: %s", matcher.err)) -} - -func (matcher *BeARegularFileMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not be a regular file")) -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go b/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go deleted file mode 100644 index d42eba223..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_an_existing_file.go +++ /dev/null @@ -1,38 +0,0 @@ -package matchers - -import ( - "fmt" - "os" - - "github.com/onsi/gomega/format" -) - -type BeAnExistingFileMatcher struct { - expected interface{} -} - -func (matcher *BeAnExistingFileMatcher) Match(actual interface{}) (success bool, err error) { - actualFilename, ok := actual.(string) - if !ok { - return false, fmt.Errorf("BeAnExistingFileMatcher matcher expects a file path") - } - - if _, err = os.Stat(actualFilename); err != nil { - switch { - case os.IsNotExist(err): - return false, nil - default: - return false, err - } - } - - return true, nil -} - -func (matcher *BeAnExistingFileMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("to exist")) -} - -func (matcher *BeAnExistingFileMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not to exist")) -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go deleted file mode 100644 index ed6f69288..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_closed_matcher.go +++ /dev/null @@ -1,46 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type BeClosedMatcher struct { -} - -func (matcher *BeClosedMatcher) Match(actual interface{}) (success bool, err error) { - if !isChan(actual) { - return false, fmt.Errorf("BeClosed matcher expects a channel. Got:\n%s", format.Object(actual, 1)) - } - - channelType := reflect.TypeOf(actual) - channelValue := reflect.ValueOf(actual) - - if channelType.ChanDir() == reflect.SendDir { - return false, fmt.Errorf("BeClosed matcher cannot determine if a send-only channel is closed or open. Got:\n%s", format.Object(actual, 1)) - } - - winnerIndex, _, open := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectRecv, Chan: channelValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, - }) - - var closed bool - if winnerIndex == 0 { - closed = !open - } else if winnerIndex == 1 { - closed = false - } - - return closed, nil -} - -func (matcher *BeClosedMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be closed") -} - -func (matcher *BeClosedMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be open") -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go deleted file mode 100644 index 8b00311b0..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher.go +++ /dev/null @@ -1,27 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type BeEmptyMatcher struct { -} - -func (matcher *BeEmptyMatcher) Match(actual interface{}) (success bool, err error) { - length, ok := lengthOf(actual) - if !ok { - return false, fmt.Errorf("BeEmpty matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) - } - - return length == 0, nil -} - -func (matcher *BeEmptyMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be empty") -} - -func (matcher *BeEmptyMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be empty") -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go deleted file mode 100644 index 97ab20a4e..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_equivalent_to_matcher.go +++ /dev/null @@ -1,34 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type BeEquivalentToMatcher struct { - Expected interface{} -} - -func (matcher *BeEquivalentToMatcher) Match(actual interface{}) (success bool, err error) { - if actual == nil && matcher.Expected == nil { - return false, fmt.Errorf("Both actual and expected must not be nil.") - } - - convertedActual := actual - - if actual != nil && matcher.Expected != nil && reflect.TypeOf(actual).ConvertibleTo(reflect.TypeOf(matcher.Expected)) { - convertedActual = reflect.ValueOf(actual).Convert(reflect.TypeOf(matcher.Expected)).Interface() - } - - return reflect.DeepEqual(convertedActual, matcher.Expected), nil -} - -func (matcher *BeEquivalentToMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be equivalent to", matcher.Expected) -} - -func (matcher *BeEquivalentToMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be equivalent to", matcher.Expected) -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go deleted file mode 100644 index 91d3b779e..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_false_matcher.go +++ /dev/null @@ -1,26 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type BeFalseMatcher struct { -} - -func (matcher *BeFalseMatcher) Match(actual interface{}) (success bool, err error) { - if !isBool(actual) { - return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) - } - - return actual == false, nil -} - -func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be false") -} - -func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be false") -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_identical_to.go b/vendor/github.com/onsi/gomega/matchers/be_identical_to.go deleted file mode 100644 index fdcda4d1f..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_identical_to.go +++ /dev/null @@ -1,37 +0,0 @@ -package matchers - -import ( - "fmt" - "runtime" - - "github.com/onsi/gomega/format" -) - -type BeIdenticalToMatcher struct { - Expected interface{} -} - -func (matcher *BeIdenticalToMatcher) Match(actual interface{}) (success bool, matchErr error) { - if actual == nil && matcher.Expected == nil { - return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") - } - - defer func() { - if r := recover(); r != nil { - if _, ok := r.(runtime.Error); ok { - success = false - matchErr = nil - } - } - }() - - return actual == matcher.Expected, nil -} - -func (matcher *BeIdenticalToMatcher) FailureMessage(actual interface{}) string { - return format.Message(actual, "to be identical to", matcher.Expected) -} - -func (matcher *BeIdenticalToMatcher) NegatedFailureMessage(actual interface{}) string { - return format.Message(actual, "not to be identical to", matcher.Expected) -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go deleted file mode 100644 index 7ee84fe1b..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_nil_matcher.go +++ /dev/null @@ -1,18 +0,0 @@ -package matchers - -import "github.com/onsi/gomega/format" - -type BeNilMatcher struct { -} - -func (matcher *BeNilMatcher) Match(actual interface{}) (success bool, err error) { - return isNil(actual), nil -} - -func (matcher *BeNilMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be nil") -} - -func (matcher *BeNilMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be nil") -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go deleted file mode 100644 index 0c157f61b..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_numerically_matcher.go +++ /dev/null @@ -1,120 +0,0 @@ -package matchers - -import ( - "fmt" - "math" - - "github.com/onsi/gomega/format" -) - -type BeNumericallyMatcher struct { - Comparator string - CompareTo []interface{} -} - -func (matcher *BeNumericallyMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("to be %s", matcher.Comparator), matcher.CompareTo[0]) -} - -func (matcher *BeNumericallyMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not to be %s", matcher.Comparator), matcher.CompareTo[0]) -} - -func (matcher *BeNumericallyMatcher) Match(actual interface{}) (success bool, err error) { - if len(matcher.CompareTo) == 0 || len(matcher.CompareTo) > 2 { - return false, fmt.Errorf("BeNumerically requires 1 or 2 CompareTo arguments. Got:\n%s", format.Object(matcher.CompareTo, 1)) - } - if !isNumber(actual) { - return false, fmt.Errorf("Expected a number. Got:\n%s", format.Object(actual, 1)) - } - if !isNumber(matcher.CompareTo[0]) { - return false, fmt.Errorf("Expected a number. Got:\n%s", format.Object(matcher.CompareTo[0], 1)) - } - if len(matcher.CompareTo) == 2 && !isNumber(matcher.CompareTo[1]) { - return false, fmt.Errorf("Expected a number. Got:\n%s", format.Object(matcher.CompareTo[0], 1)) - } - - switch matcher.Comparator { - case "==", "~", ">", ">=", "<", "<=": - default: - return false, fmt.Errorf("Unknown comparator: %s", matcher.Comparator) - } - - if isFloat(actual) || isFloat(matcher.CompareTo[0]) { - var secondOperand float64 = 1e-8 - if len(matcher.CompareTo) == 2 { - secondOperand = toFloat(matcher.CompareTo[1]) - } - success = matcher.matchFloats(toFloat(actual), toFloat(matcher.CompareTo[0]), secondOperand) - } else if isInteger(actual) { - var secondOperand int64 = 0 - if len(matcher.CompareTo) == 2 { - secondOperand = toInteger(matcher.CompareTo[1]) - } - success = matcher.matchIntegers(toInteger(actual), toInteger(matcher.CompareTo[0]), secondOperand) - } else if isUnsignedInteger(actual) { - var secondOperand uint64 = 0 - if len(matcher.CompareTo) == 2 { - secondOperand = toUnsignedInteger(matcher.CompareTo[1]) - } - success = matcher.matchUnsignedIntegers(toUnsignedInteger(actual), toUnsignedInteger(matcher.CompareTo[0]), secondOperand) - } else { - return false, fmt.Errorf("Failed to compare:\n%s\n%s:\n%s", format.Object(actual, 1), matcher.Comparator, format.Object(matcher.CompareTo[0], 1)) - } - - return success, nil -} - -func (matcher *BeNumericallyMatcher) matchIntegers(actual, compareTo, threshold int64) (success bool) { - switch matcher.Comparator { - case "==", "~": - diff := actual - compareTo - return -threshold <= diff && diff <= threshold - case ">": - return (actual > compareTo) - case ">=": - return (actual >= compareTo) - case "<": - return (actual < compareTo) - case "<=": - return (actual <= compareTo) - } - return false -} - -func (matcher *BeNumericallyMatcher) matchUnsignedIntegers(actual, compareTo, threshold uint64) (success bool) { - switch matcher.Comparator { - case "==", "~": - if actual < compareTo { - actual, compareTo = compareTo, actual - } - return actual-compareTo <= threshold - case ">": - return (actual > compareTo) - case ">=": - return (actual >= compareTo) - case "<": - return (actual < compareTo) - case "<=": - return (actual <= compareTo) - } - return false -} - -func (matcher *BeNumericallyMatcher) matchFloats(actual, compareTo, threshold float64) (success bool) { - switch matcher.Comparator { - case "~": - return math.Abs(actual-compareTo) <= threshold - case "==": - return (actual == compareTo) - case ">": - return (actual > compareTo) - case ">=": - return (actual >= compareTo) - case "<": - return (actual < compareTo) - case "<=": - return (actual <= compareTo) - } - return false -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go deleted file mode 100644 index d7c32233e..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_sent_matcher.go +++ /dev/null @@ -1,71 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type BeSentMatcher struct { - Arg interface{} - channelClosed bool -} - -func (matcher *BeSentMatcher) Match(actual interface{}) (success bool, err error) { - if !isChan(actual) { - return false, fmt.Errorf("BeSent expects a channel. Got:\n%s", format.Object(actual, 1)) - } - - channelType := reflect.TypeOf(actual) - channelValue := reflect.ValueOf(actual) - - if channelType.ChanDir() == reflect.RecvDir { - return false, fmt.Errorf("BeSent matcher cannot be passed a receive-only channel. Got:\n%s", format.Object(actual, 1)) - } - - argType := reflect.TypeOf(matcher.Arg) - assignable := argType.AssignableTo(channelType.Elem()) - - if !assignable { - return false, fmt.Errorf("Cannot pass:\n%s to the channel:\n%s\nThe types don't match.", format.Object(matcher.Arg, 1), format.Object(actual, 1)) - } - - argValue := reflect.ValueOf(matcher.Arg) - - defer func() { - if e := recover(); e != nil { - success = false - err = fmt.Errorf("Cannot send to a closed channel") - matcher.channelClosed = true - } - }() - - winnerIndex, _, _ := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectSend, Chan: channelValue, Send: argValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, - }) - - var didSend bool - if winnerIndex == 0 { - didSend = true - } - - return didSend, nil -} - -func (matcher *BeSentMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to send:", matcher.Arg) -} - -func (matcher *BeSentMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to send:", matcher.Arg) -} - -func (matcher *BeSentMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - if !isChan(actual) { - return false - } - - return !matcher.channelClosed -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go deleted file mode 100644 index cb7c038ef..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_temporally_matcher.go +++ /dev/null @@ -1,66 +0,0 @@ -package matchers - -import ( - "fmt" - "time" - - "github.com/onsi/gomega/format" -) - -type BeTemporallyMatcher struct { - Comparator string - CompareTo time.Time - Threshold []time.Duration -} - -func (matcher *BeTemporallyMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("to be %s", matcher.Comparator), matcher.CompareTo) -} - -func (matcher *BeTemporallyMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not to be %s", matcher.Comparator), matcher.CompareTo) -} - -func (matcher *BeTemporallyMatcher) Match(actual interface{}) (bool, error) { - // predicate to test for time.Time type - isTime := func(t interface{}) bool { - _, ok := t.(time.Time) - return ok - } - - if !isTime(actual) { - return false, fmt.Errorf("Expected a time.Time. Got:\n%s", format.Object(actual, 1)) - } - - switch matcher.Comparator { - case "==", "~", ">", ">=", "<", "<=": - default: - return false, fmt.Errorf("Unknown comparator: %s", matcher.Comparator) - } - - var threshold = time.Millisecond - if len(matcher.Threshold) == 1 { - threshold = matcher.Threshold[0] - } - - return matcher.matchTimes(actual.(time.Time), matcher.CompareTo, threshold), nil -} - -func (matcher *BeTemporallyMatcher) matchTimes(actual, compareTo time.Time, threshold time.Duration) (success bool) { - switch matcher.Comparator { - case "==": - return actual.Equal(compareTo) - case "~": - diff := actual.Sub(compareTo) - return -threshold <= diff && diff <= threshold - case ">": - return actual.After(compareTo) - case ">=": - return !actual.Before(compareTo) - case "<": - return actual.Before(compareTo) - case "<=": - return !actual.After(compareTo) - } - return false -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go deleted file mode 100644 index ec57c5db4..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_true_matcher.go +++ /dev/null @@ -1,26 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type BeTrueMatcher struct { -} - -func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) { - if !isBool(actual) { - return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1)) - } - - return actual.(bool), nil -} - -func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be true") -} - -func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be true") -} diff --git a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go b/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go deleted file mode 100644 index 26196f168..000000000 --- a/vendor/github.com/onsi/gomega/matchers/be_zero_matcher.go +++ /dev/null @@ -1,28 +0,0 @@ -package matchers - -import ( - "reflect" - - "github.com/onsi/gomega/format" -) - -type BeZeroMatcher struct { -} - -func (matcher *BeZeroMatcher) Match(actual interface{}) (success bool, err error) { - if actual == nil { - return true, nil - } - zeroValue := reflect.Zero(reflect.TypeOf(actual)).Interface() - - return reflect.DeepEqual(zeroValue, actual), nil - -} - -func (matcher *BeZeroMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to be zero-valued") -} - -func (matcher *BeZeroMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to be zero-valued") -} diff --git a/vendor/github.com/onsi/gomega/matchers/consist_of.go b/vendor/github.com/onsi/gomega/matchers/consist_of.go deleted file mode 100644 index 7b0e08868..000000000 --- a/vendor/github.com/onsi/gomega/matchers/consist_of.go +++ /dev/null @@ -1,80 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" - "github.com/onsi/gomega/matchers/support/goraph/bipartitegraph" -) - -type ConsistOfMatcher struct { - Elements []interface{} -} - -func (matcher *ConsistOfMatcher) Match(actual interface{}) (success bool, err error) { - if !isArrayOrSlice(actual) && !isMap(actual) { - return false, fmt.Errorf("ConsistOf matcher expects an array/slice/map. Got:\n%s", format.Object(actual, 1)) - } - - elements := matcher.Elements - if len(matcher.Elements) == 1 && isArrayOrSlice(matcher.Elements[0]) { - elements = []interface{}{} - value := reflect.ValueOf(matcher.Elements[0]) - for i := 0; i < value.Len(); i++ { - elements = append(elements, value.Index(i).Interface()) - } - } - - matchers := []interface{}{} - for _, element := range elements { - matcher, isMatcher := element.(omegaMatcher) - if !isMatcher { - matcher = &EqualMatcher{Expected: element} - } - matchers = append(matchers, matcher) - } - - values := matcher.valuesOf(actual) - - if len(values) != len(matchers) { - return false, nil - } - - neighbours := func(v, m interface{}) (bool, error) { - match, err := m.(omegaMatcher).Match(v) - return match && err == nil, nil - } - - bipartiteGraph, err := bipartitegraph.NewBipartiteGraph(values, matchers, neighbours) - if err != nil { - return false, err - } - - return len(bipartiteGraph.LargestMatching()) == len(values), nil -} - -func (matcher *ConsistOfMatcher) valuesOf(actual interface{}) []interface{} { - value := reflect.ValueOf(actual) - values := []interface{}{} - if isMap(actual) { - keys := value.MapKeys() - for i := 0; i < value.Len(); i++ { - values = append(values, value.MapIndex(keys[i]).Interface()) - } - } else { - for i := 0; i < value.Len(); i++ { - values = append(values, value.Index(i).Interface()) - } - } - - return values -} - -func (matcher *ConsistOfMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to consist of", matcher.Elements) -} - -func (matcher *ConsistOfMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to consist of", matcher.Elements) -} diff --git a/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go deleted file mode 100644 index 4159335d0..000000000 --- a/vendor/github.com/onsi/gomega/matchers/contain_element_matcher.go +++ /dev/null @@ -1,56 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type ContainElementMatcher struct { - Element interface{} -} - -func (matcher *ContainElementMatcher) Match(actual interface{}) (success bool, err error) { - if !isArrayOrSlice(actual) && !isMap(actual) { - return false, fmt.Errorf("ContainElement matcher expects an array/slice/map. Got:\n%s", format.Object(actual, 1)) - } - - elemMatcher, elementIsMatcher := matcher.Element.(omegaMatcher) - if !elementIsMatcher { - elemMatcher = &EqualMatcher{Expected: matcher.Element} - } - - value := reflect.ValueOf(actual) - var keys []reflect.Value - if isMap(actual) { - keys = value.MapKeys() - } - var lastError error - for i := 0; i < value.Len(); i++ { - var success bool - var err error - if isMap(actual) { - success, err = elemMatcher.Match(value.MapIndex(keys[i]).Interface()) - } else { - success, err = elemMatcher.Match(value.Index(i).Interface()) - } - if err != nil { - lastError = err - continue - } - if success { - return true, nil - } - } - - return false, lastError -} - -func (matcher *ContainElementMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to contain element matching", matcher.Element) -} - -func (matcher *ContainElementMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to contain element matching", matcher.Element) -} diff --git a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go b/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go deleted file mode 100644 index f8dc41e74..000000000 --- a/vendor/github.com/onsi/gomega/matchers/contain_substring_matcher.go +++ /dev/null @@ -1,38 +0,0 @@ -package matchers - -import ( - "fmt" - "strings" - - "github.com/onsi/gomega/format" -) - -type ContainSubstringMatcher struct { - Substr string - Args []interface{} -} - -func (matcher *ContainSubstringMatcher) Match(actual interface{}) (success bool, err error) { - actualString, ok := toString(actual) - if !ok { - return false, fmt.Errorf("ContainSubstring matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) - } - - return strings.Contains(actualString, matcher.stringToMatch()), nil -} - -func (matcher *ContainSubstringMatcher) stringToMatch() string { - stringToMatch := matcher.Substr - if len(matcher.Args) > 0 { - stringToMatch = fmt.Sprintf(matcher.Substr, matcher.Args...) - } - return stringToMatch -} - -func (matcher *ContainSubstringMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to contain substring", matcher.stringToMatch()) -} - -func (matcher *ContainSubstringMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to contain substring", matcher.stringToMatch()) -} diff --git a/vendor/github.com/onsi/gomega/matchers/equal_matcher.go b/vendor/github.com/onsi/gomega/matchers/equal_matcher.go deleted file mode 100644 index befb7bdfd..000000000 --- a/vendor/github.com/onsi/gomega/matchers/equal_matcher.go +++ /dev/null @@ -1,42 +0,0 @@ -package matchers - -import ( - "bytes" - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type EqualMatcher struct { - Expected interface{} -} - -func (matcher *EqualMatcher) Match(actual interface{}) (success bool, err error) { - if actual == nil && matcher.Expected == nil { - return false, fmt.Errorf("Refusing to compare to .\nBe explicit and use BeNil() instead. This is to avoid mistakes where both sides of an assertion are erroneously uninitialized.") - } - // Shortcut for byte slices. - // Comparing long byte slices with reflect.DeepEqual is very slow, - // so use bytes.Equal if actual and expected are both byte slices. - if actualByteSlice, ok := actual.([]byte); ok { - if expectedByteSlice, ok := matcher.Expected.([]byte); ok { - return bytes.Equal(actualByteSlice, expectedByteSlice), nil - } - } - return reflect.DeepEqual(actual, matcher.Expected), nil -} - -func (matcher *EqualMatcher) FailureMessage(actual interface{}) (message string) { - actualString, actualOK := actual.(string) - expectedString, expectedOK := matcher.Expected.(string) - if actualOK && expectedOK { - return format.MessageWithDiff(actualString, "to equal", expectedString) - } - - return format.Message(actual, "to equal", matcher.Expected) -} - -func (matcher *EqualMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to equal", matcher.Expected) -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go deleted file mode 100644 index 7ace93dc3..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_cap_matcher.go +++ /dev/null @@ -1,28 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type HaveCapMatcher struct { - Count int -} - -func (matcher *HaveCapMatcher) Match(actual interface{}) (success bool, err error) { - length, ok := capOf(actual) - if !ok { - return false, fmt.Errorf("HaveCap matcher expects a array/channel/slice. Got:\n%s", format.Object(actual, 1)) - } - - return length == matcher.Count, nil -} - -func (matcher *HaveCapMatcher) FailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected\n%s\nto have capacity %d", format.Object(actual, 1), matcher.Count) -} - -func (matcher *HaveCapMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected\n%s\nnot to have capacity %d", format.Object(actual, 1), matcher.Count) -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go deleted file mode 100644 index ea5b92336..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_key_matcher.go +++ /dev/null @@ -1,54 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type HaveKeyMatcher struct { - Key interface{} -} - -func (matcher *HaveKeyMatcher) Match(actual interface{}) (success bool, err error) { - if !isMap(actual) { - return false, fmt.Errorf("HaveKey matcher expects a map. Got:%s", format.Object(actual, 1)) - } - - keyMatcher, keyIsMatcher := matcher.Key.(omegaMatcher) - if !keyIsMatcher { - keyMatcher = &EqualMatcher{Expected: matcher.Key} - } - - keys := reflect.ValueOf(actual).MapKeys() - for i := 0; i < len(keys); i++ { - success, err := keyMatcher.Match(keys[i].Interface()) - if err != nil { - return false, fmt.Errorf("HaveKey's key matcher failed with:\n%s%s", format.Indent, err.Error()) - } - if success { - return true, nil - } - } - - return false, nil -} - -func (matcher *HaveKeyMatcher) FailureMessage(actual interface{}) (message string) { - switch matcher.Key.(type) { - case omegaMatcher: - return format.Message(actual, "to have key matching", matcher.Key) - default: - return format.Message(actual, "to have key", matcher.Key) - } -} - -func (matcher *HaveKeyMatcher) NegatedFailureMessage(actual interface{}) (message string) { - switch matcher.Key.(type) { - case omegaMatcher: - return format.Message(actual, "not to have key matching", matcher.Key) - default: - return format.Message(actual, "not to have key", matcher.Key) - } -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go deleted file mode 100644 index 06355b1e9..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_key_with_value_matcher.go +++ /dev/null @@ -1,74 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type HaveKeyWithValueMatcher struct { - Key interface{} - Value interface{} -} - -func (matcher *HaveKeyWithValueMatcher) Match(actual interface{}) (success bool, err error) { - if !isMap(actual) { - return false, fmt.Errorf("HaveKeyWithValue matcher expects a map. Got:%s", format.Object(actual, 1)) - } - - keyMatcher, keyIsMatcher := matcher.Key.(omegaMatcher) - if !keyIsMatcher { - keyMatcher = &EqualMatcher{Expected: matcher.Key} - } - - valueMatcher, valueIsMatcher := matcher.Value.(omegaMatcher) - if !valueIsMatcher { - valueMatcher = &EqualMatcher{Expected: matcher.Value} - } - - keys := reflect.ValueOf(actual).MapKeys() - for i := 0; i < len(keys); i++ { - success, err := keyMatcher.Match(keys[i].Interface()) - if err != nil { - return false, fmt.Errorf("HaveKeyWithValue's key matcher failed with:\n%s%s", format.Indent, err.Error()) - } - if success { - actualValue := reflect.ValueOf(actual).MapIndex(keys[i]) - success, err := valueMatcher.Match(actualValue.Interface()) - if err != nil { - return false, fmt.Errorf("HaveKeyWithValue's value matcher failed with:\n%s%s", format.Indent, err.Error()) - } - return success, nil - } - } - - return false, nil -} - -func (matcher *HaveKeyWithValueMatcher) FailureMessage(actual interface{}) (message string) { - str := "to have {key: value}" - if _, ok := matcher.Key.(omegaMatcher); ok { - str += " matching" - } else if _, ok := matcher.Value.(omegaMatcher); ok { - str += " matching" - } - - expect := make(map[interface{}]interface{}, 1) - expect[matcher.Key] = matcher.Value - return format.Message(actual, str, expect) -} - -func (matcher *HaveKeyWithValueMatcher) NegatedFailureMessage(actual interface{}) (message string) { - kStr := "not to have key" - if _, ok := matcher.Key.(omegaMatcher); ok { - kStr = "not to have key matching" - } - - vStr := "or that key's value not be" - if _, ok := matcher.Value.(omegaMatcher); ok { - vStr = "or to have that key's value not matching" - } - - return format.Message(actual, kStr, matcher.Key, vStr, matcher.Value) -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go deleted file mode 100644 index ee4276189..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_len_matcher.go +++ /dev/null @@ -1,28 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type HaveLenMatcher struct { - Count int -} - -func (matcher *HaveLenMatcher) Match(actual interface{}) (success bool, err error) { - length, ok := lengthOf(actual) - if !ok { - return false, fmt.Errorf("HaveLen matcher expects a string/array/map/channel/slice. Got:\n%s", format.Object(actual, 1)) - } - - return length == matcher.Count, nil -} - -func (matcher *HaveLenMatcher) FailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected\n%s\nto have length %d", format.Object(actual, 1), matcher.Count) -} - -func (matcher *HaveLenMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected\n%s\nnot to have length %d", format.Object(actual, 1), matcher.Count) -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go deleted file mode 100644 index ebdd71786..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_occurred_matcher.go +++ /dev/null @@ -1,33 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type HaveOccurredMatcher struct { -} - -func (matcher *HaveOccurredMatcher) Match(actual interface{}) (success bool, err error) { - // is purely nil? - if actual == nil { - return false, nil - } - - // must be an 'error' type - if !isError(actual) { - return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) - } - - // must be non-nil (or a pointer to a non-nil) - return !isNil(actual), nil -} - -func (matcher *HaveOccurredMatcher) FailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected an error to have occurred. Got:\n%s", format.Object(actual, 1)) -} - -func (matcher *HaveOccurredMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected error:\n%s\n%s\n%s", format.Object(actual, 1), format.IndentString(actual.(error).Error(), 1), "not to have occurred") -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go deleted file mode 100644 index 1d8e80270..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_prefix_matcher.go +++ /dev/null @@ -1,36 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type HavePrefixMatcher struct { - Prefix string - Args []interface{} -} - -func (matcher *HavePrefixMatcher) Match(actual interface{}) (success bool, err error) { - actualString, ok := toString(actual) - if !ok { - return false, fmt.Errorf("HavePrefix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) - } - prefix := matcher.prefix() - return len(actualString) >= len(prefix) && actualString[0:len(prefix)] == prefix, nil -} - -func (matcher *HavePrefixMatcher) prefix() string { - if len(matcher.Args) > 0 { - return fmt.Sprintf(matcher.Prefix, matcher.Args...) - } - return matcher.Prefix -} - -func (matcher *HavePrefixMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to have prefix", matcher.prefix()) -} - -func (matcher *HavePrefixMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to have prefix", matcher.prefix()) -} diff --git a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go b/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go deleted file mode 100644 index 40a3526eb..000000000 --- a/vendor/github.com/onsi/gomega/matchers/have_suffix_matcher.go +++ /dev/null @@ -1,36 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type HaveSuffixMatcher struct { - Suffix string - Args []interface{} -} - -func (matcher *HaveSuffixMatcher) Match(actual interface{}) (success bool, err error) { - actualString, ok := toString(actual) - if !ok { - return false, fmt.Errorf("HaveSuffix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1)) - } - suffix := matcher.suffix() - return len(actualString) >= len(suffix) && actualString[len(actualString)-len(suffix):] == suffix, nil -} - -func (matcher *HaveSuffixMatcher) suffix() string { - if len(matcher.Args) > 0 { - return fmt.Sprintf(matcher.Suffix, matcher.Args...) - } - return matcher.Suffix -} - -func (matcher *HaveSuffixMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to have suffix", matcher.suffix()) -} - -func (matcher *HaveSuffixMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to have suffix", matcher.suffix()) -} diff --git a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go deleted file mode 100644 index 07499ac95..000000000 --- a/vendor/github.com/onsi/gomega/matchers/match_error_matcher.go +++ /dev/null @@ -1,51 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type MatchErrorMatcher struct { - Expected interface{} -} - -func (matcher *MatchErrorMatcher) Match(actual interface{}) (success bool, err error) { - if isNil(actual) { - return false, fmt.Errorf("Expected an error, got nil") - } - - if !isError(actual) { - return false, fmt.Errorf("Expected an error. Got:\n%s", format.Object(actual, 1)) - } - - actualErr := actual.(error) - - if isError(matcher.Expected) { - return reflect.DeepEqual(actualErr, matcher.Expected), nil - } - - if isString(matcher.Expected) { - return actualErr.Error() == matcher.Expected, nil - } - - var subMatcher omegaMatcher - var hasSubMatcher bool - if matcher.Expected != nil { - subMatcher, hasSubMatcher = (matcher.Expected).(omegaMatcher) - if hasSubMatcher { - return subMatcher.Match(actualErr.Error()) - } - } - - return false, fmt.Errorf("MatchError must be passed an error, string, or Matcher that can match on strings. Got:\n%s", format.Object(matcher.Expected, 1)) -} - -func (matcher *MatchErrorMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to match error", matcher.Expected) -} - -func (matcher *MatchErrorMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to match error", matcher.Expected) -} diff --git a/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go deleted file mode 100644 index 499bb5830..000000000 --- a/vendor/github.com/onsi/gomega/matchers/match_json_matcher.go +++ /dev/null @@ -1,135 +0,0 @@ -package matchers - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "strings" - - "github.com/onsi/gomega/format" -) - -type MatchJSONMatcher struct { - JSONToMatch interface{} - firstFailurePath []interface{} -} - -func (matcher *MatchJSONMatcher) Match(actual interface{}) (success bool, err error) { - actualString, expectedString, err := matcher.prettyPrint(actual) - if err != nil { - return false, err - } - - var aval interface{} - var eval interface{} - - // this is guarded by prettyPrint - json.Unmarshal([]byte(actualString), &aval) - json.Unmarshal([]byte(expectedString), &eval) - var equal bool - equal, matcher.firstFailurePath = deepEqual(aval, eval) - return equal, nil -} - -func (matcher *MatchJSONMatcher) FailureMessage(actual interface{}) (message string) { - actualString, expectedString, _ := matcher.prettyPrint(actual) - return formattedMessage(format.Message(actualString, "to match JSON of", expectedString), matcher.firstFailurePath) -} - -func (matcher *MatchJSONMatcher) NegatedFailureMessage(actual interface{}) (message string) { - actualString, expectedString, _ := matcher.prettyPrint(actual) - return formattedMessage(format.Message(actualString, "not to match JSON of", expectedString), matcher.firstFailurePath) -} - -func formattedMessage(comparisonMessage string, failurePath []interface{}) string { - var diffMessage string - if len(failurePath) == 0 { - diffMessage = "" - } else { - diffMessage = fmt.Sprintf("\n\nfirst mismatched key: %s", formattedFailurePath(failurePath)) - } - return fmt.Sprintf("%s%s", comparisonMessage, diffMessage) -} - -func formattedFailurePath(failurePath []interface{}) string { - formattedPaths := []string{} - for i := len(failurePath) - 1; i >= 0; i-- { - switch p := failurePath[i].(type) { - case int: - formattedPaths = append(formattedPaths, fmt.Sprintf(`[%d]`, p)) - default: - if i != len(failurePath)-1 { - formattedPaths = append(formattedPaths, ".") - } - formattedPaths = append(formattedPaths, fmt.Sprintf(`"%s"`, p)) - } - } - return strings.Join(formattedPaths, "") -} - -func (matcher *MatchJSONMatcher) prettyPrint(actual interface{}) (actualFormatted, expectedFormatted string, err error) { - actualString, ok := toString(actual) - if !ok { - return "", "", fmt.Errorf("MatchJSONMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) - } - expectedString, ok := toString(matcher.JSONToMatch) - if !ok { - return "", "", fmt.Errorf("MatchJSONMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.JSONToMatch, 1)) - } - - abuf := new(bytes.Buffer) - ebuf := new(bytes.Buffer) - - if err := json.Indent(abuf, []byte(actualString), "", " "); err != nil { - return "", "", fmt.Errorf("Actual '%s' should be valid JSON, but it is not.\nUnderlying error:%s", actualString, err) - } - - if err := json.Indent(ebuf, []byte(expectedString), "", " "); err != nil { - return "", "", fmt.Errorf("Expected '%s' should be valid JSON, but it is not.\nUnderlying error:%s", expectedString, err) - } - - return abuf.String(), ebuf.String(), nil -} - -func deepEqual(a interface{}, b interface{}) (bool, []interface{}) { - var errorPath []interface{} - if reflect.TypeOf(a) != reflect.TypeOf(b) { - return false, errorPath - } - - switch a.(type) { - case []interface{}: - if len(a.([]interface{})) != len(b.([]interface{})) { - return false, errorPath - } - - for i, v := range a.([]interface{}) { - elementEqual, keyPath := deepEqual(v, b.([]interface{})[i]) - if !elementEqual { - return false, append(keyPath, i) - } - } - return true, errorPath - - case map[string]interface{}: - if len(a.(map[string]interface{})) != len(b.(map[string]interface{})) { - return false, errorPath - } - - for k, v1 := range a.(map[string]interface{}) { - v2, ok := b.(map[string]interface{})[k] - if !ok { - return false, errorPath - } - elementEqual, keyPath := deepEqual(v1, v2) - if !elementEqual { - return false, append(keyPath, k) - } - } - return true, errorPath - - default: - return a == b, errorPath - } -} diff --git a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go deleted file mode 100644 index adac5db6b..000000000 --- a/vendor/github.com/onsi/gomega/matchers/match_regexp_matcher.go +++ /dev/null @@ -1,43 +0,0 @@ -package matchers - -import ( - "fmt" - "regexp" - - "github.com/onsi/gomega/format" -) - -type MatchRegexpMatcher struct { - Regexp string - Args []interface{} -} - -func (matcher *MatchRegexpMatcher) Match(actual interface{}) (success bool, err error) { - actualString, ok := toString(actual) - if !ok { - return false, fmt.Errorf("RegExp matcher requires a string or stringer.\nGot:%s", format.Object(actual, 1)) - } - - match, err := regexp.Match(matcher.regexp(), []byte(actualString)) - if err != nil { - return false, fmt.Errorf("RegExp match failed to compile with error:\n\t%s", err.Error()) - } - - return match, nil -} - -func (matcher *MatchRegexpMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to match regular expression", matcher.regexp()) -} - -func (matcher *MatchRegexpMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, "not to match regular expression", matcher.regexp()) -} - -func (matcher *MatchRegexpMatcher) regexp() string { - re := matcher.Regexp - if len(matcher.Args) > 0 { - re = fmt.Sprintf(matcher.Regexp, matcher.Args...) - } - return re -} diff --git a/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go deleted file mode 100644 index 3b412ce81..000000000 --- a/vendor/github.com/onsi/gomega/matchers/match_xml_matcher.go +++ /dev/null @@ -1,134 +0,0 @@ -package matchers - -import ( - "bytes" - "encoding/xml" - "errors" - "fmt" - "io" - "reflect" - "sort" - "strings" - - "github.com/onsi/gomega/format" - "golang.org/x/net/html/charset" -) - -type MatchXMLMatcher struct { - XMLToMatch interface{} -} - -func (matcher *MatchXMLMatcher) Match(actual interface{}) (success bool, err error) { - actualString, expectedString, err := matcher.formattedPrint(actual) - if err != nil { - return false, err - } - - aval, err := parseXmlContent(actualString) - if err != nil { - return false, fmt.Errorf("Actual '%s' should be valid XML, but it is not.\nUnderlying error:%s", actualString, err) - } - - eval, err := parseXmlContent(expectedString) - if err != nil { - return false, fmt.Errorf("Expected '%s' should be valid XML, but it is not.\nUnderlying error:%s", expectedString, err) - } - - return reflect.DeepEqual(aval, eval), nil -} - -func (matcher *MatchXMLMatcher) FailureMessage(actual interface{}) (message string) { - actualString, expectedString, _ := matcher.formattedPrint(actual) - return fmt.Sprintf("Expected\n%s\nto match XML of\n%s", actualString, expectedString) -} - -func (matcher *MatchXMLMatcher) NegatedFailureMessage(actual interface{}) (message string) { - actualString, expectedString, _ := matcher.formattedPrint(actual) - return fmt.Sprintf("Expected\n%s\nnot to match XML of\n%s", actualString, expectedString) -} - -func (matcher *MatchXMLMatcher) formattedPrint(actual interface{}) (actualString, expectedString string, err error) { - var ok bool - actualString, ok = toString(actual) - if !ok { - return "", "", fmt.Errorf("MatchXMLMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) - } - expectedString, ok = toString(matcher.XMLToMatch) - if !ok { - return "", "", fmt.Errorf("MatchXMLMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.XMLToMatch, 1)) - } - return actualString, expectedString, nil -} - -func parseXmlContent(content string) (*xmlNode, error) { - allNodes := []*xmlNode{} - - dec := newXmlDecoder(strings.NewReader(content)) - for { - tok, err := dec.Token() - if err != nil { - if err == io.EOF { - break - } - return nil, fmt.Errorf("failed to decode next token: %v", err) - } - - lastNodeIndex := len(allNodes) - 1 - var lastNode *xmlNode - if len(allNodes) > 0 { - lastNode = allNodes[lastNodeIndex] - } else { - lastNode = &xmlNode{} - } - - switch tok := tok.(type) { - case xml.StartElement: - attrs := attributesSlice(tok.Attr) - sort.Sort(attrs) - allNodes = append(allNodes, &xmlNode{XMLName: tok.Name, XMLAttr: tok.Attr}) - case xml.EndElement: - if len(allNodes) > 1 { - allNodes[lastNodeIndex-1].Nodes = append(allNodes[lastNodeIndex-1].Nodes, lastNode) - allNodes = allNodes[:lastNodeIndex] - } - case xml.CharData: - lastNode.Content = append(lastNode.Content, tok.Copy()...) - case xml.Comment: - lastNode.Comments = append(lastNode.Comments, tok.Copy()) - case xml.ProcInst: - lastNode.ProcInsts = append(lastNode.ProcInsts, tok.Copy()) - } - } - - if len(allNodes) == 0 { - return nil, errors.New("found no nodes") - } - firstNode := allNodes[0] - trimParentNodesContentSpaces(firstNode) - - return firstNode, nil -} - -func newXmlDecoder(reader io.Reader) *xml.Decoder { - dec := xml.NewDecoder(reader) - dec.CharsetReader = charset.NewReaderLabel - return dec -} - -func trimParentNodesContentSpaces(node *xmlNode) { - if len(node.Nodes) > 0 { - node.Content = bytes.TrimSpace(node.Content) - for _, childNode := range node.Nodes { - trimParentNodesContentSpaces(childNode) - } - } -} - -type xmlNode struct { - XMLName xml.Name - Comments []xml.Comment - ProcInsts []xml.ProcInst - XMLAttr []xml.Attr - Content []byte - Nodes []*xmlNode -} diff --git a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go b/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go deleted file mode 100644 index 69fb51a85..000000000 --- a/vendor/github.com/onsi/gomega/matchers/match_yaml_matcher.go +++ /dev/null @@ -1,74 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - "strings" - - "github.com/onsi/gomega/format" - "gopkg.in/yaml.v2" -) - -type MatchYAMLMatcher struct { - YAMLToMatch interface{} -} - -func (matcher *MatchYAMLMatcher) Match(actual interface{}) (success bool, err error) { - actualString, expectedString, err := matcher.toStrings(actual) - if err != nil { - return false, err - } - - var aval interface{} - var eval interface{} - - if err := yaml.Unmarshal([]byte(actualString), &aval); err != nil { - return false, fmt.Errorf("Actual '%s' should be valid YAML, but it is not.\nUnderlying error:%s", actualString, err) - } - if err := yaml.Unmarshal([]byte(expectedString), &eval); err != nil { - return false, fmt.Errorf("Expected '%s' should be valid YAML, but it is not.\nUnderlying error:%s", expectedString, err) - } - - return reflect.DeepEqual(aval, eval), nil -} - -func (matcher *MatchYAMLMatcher) FailureMessage(actual interface{}) (message string) { - actualString, expectedString, _ := matcher.toNormalisedStrings(actual) - return format.Message(actualString, "to match YAML of", expectedString) -} - -func (matcher *MatchYAMLMatcher) NegatedFailureMessage(actual interface{}) (message string) { - actualString, expectedString, _ := matcher.toNormalisedStrings(actual) - return format.Message(actualString, "not to match YAML of", expectedString) -} - -func (matcher *MatchYAMLMatcher) toNormalisedStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) { - actualString, expectedString, err := matcher.toStrings(actual) - return normalise(actualString), normalise(expectedString), err -} - -func normalise(input string) string { - var val interface{} - err := yaml.Unmarshal([]byte(input), &val) - if err != nil { - panic(err) // guarded by Match - } - output, err := yaml.Marshal(val) - if err != nil { - panic(err) // guarded by Unmarshal - } - return strings.TrimSpace(string(output)) -} - -func (matcher *MatchYAMLMatcher) toStrings(actual interface{}) (actualFormatted, expectedFormatted string, err error) { - actualString, ok := toString(actual) - if !ok { - return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got actual:\n%s", format.Object(actual, 1)) - } - expectedString, ok := toString(matcher.YAMLToMatch) - if !ok { - return "", "", fmt.Errorf("MatchYAMLMatcher matcher requires a string, stringer, or []byte. Got expected:\n%s", format.Object(matcher.YAMLToMatch, 1)) - } - - return actualString, expectedString, nil -} diff --git a/vendor/github.com/onsi/gomega/matchers/not.go b/vendor/github.com/onsi/gomega/matchers/not.go deleted file mode 100644 index 2c91670bd..000000000 --- a/vendor/github.com/onsi/gomega/matchers/not.go +++ /dev/null @@ -1,30 +0,0 @@ -package matchers - -import ( - "github.com/onsi/gomega/internal/oraclematcher" - "github.com/onsi/gomega/types" -) - -type NotMatcher struct { - Matcher types.GomegaMatcher -} - -func (m *NotMatcher) Match(actual interface{}) (bool, error) { - success, err := m.Matcher.Match(actual) - if err != nil { - return false, err - } - return !success, nil -} - -func (m *NotMatcher) FailureMessage(actual interface{}) (message string) { - return m.Matcher.NegatedFailureMessage(actual) // works beautifully -} - -func (m *NotMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return m.Matcher.FailureMessage(actual) // works beautifully -} - -func (m *NotMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - return oraclematcher.MatchMayChangeInTheFuture(m.Matcher, actual) // just return m.Matcher's value -} diff --git a/vendor/github.com/onsi/gomega/matchers/or.go b/vendor/github.com/onsi/gomega/matchers/or.go deleted file mode 100644 index 3bf799800..000000000 --- a/vendor/github.com/onsi/gomega/matchers/or.go +++ /dev/null @@ -1,67 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" - "github.com/onsi/gomega/internal/oraclematcher" - "github.com/onsi/gomega/types" -) - -type OrMatcher struct { - Matchers []types.GomegaMatcher - - // state - firstSuccessfulMatcher types.GomegaMatcher -} - -func (m *OrMatcher) Match(actual interface{}) (success bool, err error) { - m.firstSuccessfulMatcher = nil - for _, matcher := range m.Matchers { - success, err := matcher.Match(actual) - if err != nil { - return false, err - } - if success { - m.firstSuccessfulMatcher = matcher - return true, nil - } - } - return false, nil -} - -func (m *OrMatcher) FailureMessage(actual interface{}) (message string) { - // not the most beautiful list of matchers, but not bad either... - return format.Message(actual, fmt.Sprintf("To satisfy at least one of these matchers: %s", m.Matchers)) -} - -func (m *OrMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return m.firstSuccessfulMatcher.NegatedFailureMessage(actual) -} - -func (m *OrMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - /* - Example with 3 matchers: A, B, C - - Match evaluates them: F, T, => T - So match is currently T, what should MatchMayChangeInTheFuture() return? - Seems like it only depends on B, since currently B MUST change to allow the result to become F - - Match eval: F, F, F => F - So match is currently F, what should MatchMayChangeInTheFuture() return? - Seems to depend on ANY of them being able to change to T. - */ - - if m.firstSuccessfulMatcher != nil { - // one of the matchers succeeded.. it must be able to change in order to affect the result - return oraclematcher.MatchMayChangeInTheFuture(m.firstSuccessfulMatcher, actual) - } else { - // so all matchers failed.. Any one of them changing would change the result. - for _, matcher := range m.Matchers { - if oraclematcher.MatchMayChangeInTheFuture(matcher, actual) { - return true - } - } - return false // none of were going to change - } -} diff --git a/vendor/github.com/onsi/gomega/matchers/panic_matcher.go b/vendor/github.com/onsi/gomega/matchers/panic_matcher.go deleted file mode 100644 index 640f4db1a..000000000 --- a/vendor/github.com/onsi/gomega/matchers/panic_matcher.go +++ /dev/null @@ -1,46 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type PanicMatcher struct { - object interface{} -} - -func (matcher *PanicMatcher) Match(actual interface{}) (success bool, err error) { - if actual == nil { - return false, fmt.Errorf("PanicMatcher expects a non-nil actual.") - } - - actualType := reflect.TypeOf(actual) - if actualType.Kind() != reflect.Func { - return false, fmt.Errorf("PanicMatcher expects a function. Got:\n%s", format.Object(actual, 1)) - } - if !(actualType.NumIn() == 0 && actualType.NumOut() == 0) { - return false, fmt.Errorf("PanicMatcher expects a function with no arguments and no return value. Got:\n%s", format.Object(actual, 1)) - } - - success = false - defer func() { - if e := recover(); e != nil { - matcher.object = e - success = true - } - }() - - reflect.ValueOf(actual).Call([]reflect.Value{}) - - return -} - -func (matcher *PanicMatcher) FailureMessage(actual interface{}) (message string) { - return format.Message(actual, "to panic") -} - -func (matcher *PanicMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return format.Message(actual, fmt.Sprintf("not to panic, but panicked with\n%s", format.Object(matcher.object, 1))) -} diff --git a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go b/vendor/github.com/onsi/gomega/matchers/receive_matcher.go deleted file mode 100644 index 74e9e7ebe..000000000 --- a/vendor/github.com/onsi/gomega/matchers/receive_matcher.go +++ /dev/null @@ -1,122 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/format" -) - -type ReceiveMatcher struct { - Arg interface{} - receivedValue reflect.Value - channelClosed bool -} - -func (matcher *ReceiveMatcher) Match(actual interface{}) (success bool, err error) { - if !isChan(actual) { - return false, fmt.Errorf("ReceiveMatcher expects a channel. Got:\n%s", format.Object(actual, 1)) - } - - channelType := reflect.TypeOf(actual) - channelValue := reflect.ValueOf(actual) - - if channelType.ChanDir() == reflect.SendDir { - return false, fmt.Errorf("ReceiveMatcher matcher cannot be passed a send-only channel. Got:\n%s", format.Object(actual, 1)) - } - - var subMatcher omegaMatcher - var hasSubMatcher bool - - if matcher.Arg != nil { - subMatcher, hasSubMatcher = (matcher.Arg).(omegaMatcher) - if !hasSubMatcher { - argType := reflect.TypeOf(matcher.Arg) - if argType.Kind() != reflect.Ptr { - return false, fmt.Errorf("Cannot assign a value from the channel:\n%s\nTo:\n%s\nYou need to pass a pointer!", format.Object(actual, 1), format.Object(matcher.Arg, 1)) - } - - assignable := channelType.Elem().AssignableTo(argType.Elem()) - if !assignable { - return false, fmt.Errorf("Cannot assign a value from the channel:\n%s\nTo:\n%s", format.Object(actual, 1), format.Object(matcher.Arg, 1)) - } - } - } - - winnerIndex, value, open := reflect.Select([]reflect.SelectCase{ - reflect.SelectCase{Dir: reflect.SelectRecv, Chan: channelValue}, - reflect.SelectCase{Dir: reflect.SelectDefault}, - }) - - var closed bool - var didReceive bool - if winnerIndex == 0 { - closed = !open - didReceive = open - } - matcher.channelClosed = closed - - if closed { - return false, nil - } - - if hasSubMatcher { - if didReceive { - matcher.receivedValue = value - return subMatcher.Match(matcher.receivedValue.Interface()) - } - return false, nil - } - - if didReceive { - if matcher.Arg != nil { - outValue := reflect.ValueOf(matcher.Arg) - reflect.Indirect(outValue).Set(value) - } - - return true, nil - } - return false, nil -} - -func (matcher *ReceiveMatcher) FailureMessage(actual interface{}) (message string) { - subMatcher, hasSubMatcher := (matcher.Arg).(omegaMatcher) - - closedAddendum := "" - if matcher.channelClosed { - closedAddendum = " The channel is closed." - } - - if hasSubMatcher { - if matcher.receivedValue.IsValid() { - return subMatcher.FailureMessage(matcher.receivedValue.Interface()) - } - return "When passed a matcher, ReceiveMatcher's channel *must* receive something." - } - return format.Message(actual, "to receive something."+closedAddendum) -} - -func (matcher *ReceiveMatcher) NegatedFailureMessage(actual interface{}) (message string) { - subMatcher, hasSubMatcher := (matcher.Arg).(omegaMatcher) - - closedAddendum := "" - if matcher.channelClosed { - closedAddendum = " The channel is closed." - } - - if hasSubMatcher { - if matcher.receivedValue.IsValid() { - return subMatcher.NegatedFailureMessage(matcher.receivedValue.Interface()) - } - return "When passed a matcher, ReceiveMatcher's channel *must* receive something." - } - return format.Message(actual, "not to receive anything."+closedAddendum) -} - -func (matcher *ReceiveMatcher) MatchMayChangeInTheFuture(actual interface{}) bool { - if !isChan(actual) { - return false - } - - return !matcher.channelClosed -} diff --git a/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go b/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go deleted file mode 100644 index 721ed5529..000000000 --- a/vendor/github.com/onsi/gomega/matchers/succeed_matcher.go +++ /dev/null @@ -1,33 +0,0 @@ -package matchers - -import ( - "fmt" - - "github.com/onsi/gomega/format" -) - -type SucceedMatcher struct { -} - -func (matcher *SucceedMatcher) Match(actual interface{}) (success bool, err error) { - // is purely nil? - if actual == nil { - return true, nil - } - - // must be an 'error' type - if !isError(actual) { - return false, fmt.Errorf("Expected an error-type. Got:\n%s", format.Object(actual, 1)) - } - - // must be nil (or a pointer to a nil) - return isNil(actual), nil -} - -func (matcher *SucceedMatcher) FailureMessage(actual interface{}) (message string) { - return fmt.Sprintf("Expected success, but got an error:\n%s\n%s", format.Object(actual, 1), format.IndentString(actual.(error).Error(), 1)) -} - -func (matcher *SucceedMatcher) NegatedFailureMessage(actual interface{}) (message string) { - return "Expected failure, but got no error." -} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go deleted file mode 100644 index 81b377111..000000000 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraph.go +++ /dev/null @@ -1,41 +0,0 @@ -package bipartitegraph - -import "errors" -import "fmt" - -import . "github.com/onsi/gomega/matchers/support/goraph/node" -import . "github.com/onsi/gomega/matchers/support/goraph/edge" - -type BipartiteGraph struct { - Left NodeOrderedSet - Right NodeOrderedSet - Edges EdgeSet -} - -func NewBipartiteGraph(leftValues, rightValues []interface{}, neighbours func(interface{}, interface{}) (bool, error)) (*BipartiteGraph, error) { - left := NodeOrderedSet{} - for i, _ := range leftValues { - left = append(left, Node{Id: i}) - } - - right := NodeOrderedSet{} - for j, _ := range rightValues { - right = append(right, Node{Id: j + len(left)}) - } - - edges := EdgeSet{} - for i, leftValue := range leftValues { - for j, rightValue := range rightValues { - neighbours, err := neighbours(leftValue, rightValue) - if err != nil { - return nil, errors.New(fmt.Sprintf("error determining adjacency for %v and %v: %s", leftValue, rightValue, err.Error())) - } - - if neighbours { - edges = append(edges, Edge{Node1: left[i], Node2: right[j]}) - } - } - } - - return &BipartiteGraph{left, right, edges}, nil -} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go deleted file mode 100644 index 8181f43a4..000000000 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/bipartitegraph/bipartitegraphmatching.go +++ /dev/null @@ -1,159 +0,0 @@ -package bipartitegraph - -import . "github.com/onsi/gomega/matchers/support/goraph/node" -import . "github.com/onsi/gomega/matchers/support/goraph/edge" -import "github.com/onsi/gomega/matchers/support/goraph/util" - -func (bg *BipartiteGraph) LargestMatching() (matching EdgeSet) { - paths := bg.maximalDisjointSLAPCollection(matching) - - for len(paths) > 0 { - for _, path := range paths { - matching = matching.SymmetricDifference(path) - } - paths = bg.maximalDisjointSLAPCollection(matching) - } - - return -} - -func (bg *BipartiteGraph) maximalDisjointSLAPCollection(matching EdgeSet) (result []EdgeSet) { - guideLayers := bg.createSLAPGuideLayers(matching) - if len(guideLayers) == 0 { - return - } - - used := make(map[Node]bool) - - for _, u := range guideLayers[len(guideLayers)-1] { - slap, found := bg.findDisjointSLAP(u, matching, guideLayers, used) - if found { - for _, edge := range slap { - used[edge.Node1] = true - used[edge.Node2] = true - } - result = append(result, slap) - } - } - - return -} - -func (bg *BipartiteGraph) findDisjointSLAP( - start Node, - matching EdgeSet, - guideLayers []NodeOrderedSet, - used map[Node]bool, -) ([]Edge, bool) { - return bg.findDisjointSLAPHelper(start, EdgeSet{}, len(guideLayers)-1, matching, guideLayers, used) -} - -func (bg *BipartiteGraph) findDisjointSLAPHelper( - currentNode Node, - currentSLAP EdgeSet, - currentLevel int, - matching EdgeSet, - guideLayers []NodeOrderedSet, - used map[Node]bool, -) (EdgeSet, bool) { - used[currentNode] = true - - if currentLevel == 0 { - return currentSLAP, true - } - - for _, nextNode := range guideLayers[currentLevel-1] { - if used[nextNode] { - continue - } - - edge, found := bg.Edges.FindByNodes(currentNode, nextNode) - if !found { - continue - } - - if matching.Contains(edge) == util.Odd(currentLevel) { - continue - } - - currentSLAP = append(currentSLAP, edge) - slap, found := bg.findDisjointSLAPHelper(nextNode, currentSLAP, currentLevel-1, matching, guideLayers, used) - if found { - return slap, true - } - currentSLAP = currentSLAP[:len(currentSLAP)-1] - } - - used[currentNode] = false - return nil, false -} - -func (bg *BipartiteGraph) createSLAPGuideLayers(matching EdgeSet) (guideLayers []NodeOrderedSet) { - used := make(map[Node]bool) - currentLayer := NodeOrderedSet{} - - for _, node := range bg.Left { - if matching.Free(node) { - used[node] = true - currentLayer = append(currentLayer, node) - } - } - - if len(currentLayer) == 0 { - return []NodeOrderedSet{} - } - guideLayers = append(guideLayers, currentLayer) - - done := false - - for !done { - lastLayer := currentLayer - currentLayer = NodeOrderedSet{} - - if util.Odd(len(guideLayers)) { - for _, leftNode := range lastLayer { - for _, rightNode := range bg.Right { - if used[rightNode] { - continue - } - - edge, found := bg.Edges.FindByNodes(leftNode, rightNode) - if !found || matching.Contains(edge) { - continue - } - - currentLayer = append(currentLayer, rightNode) - used[rightNode] = true - - if matching.Free(rightNode) { - done = true - } - } - } - } else { - for _, rightNode := range lastLayer { - for _, leftNode := range bg.Left { - if used[leftNode] { - continue - } - - edge, found := bg.Edges.FindByNodes(leftNode, rightNode) - if !found || !matching.Contains(edge) { - continue - } - - currentLayer = append(currentLayer, leftNode) - used[leftNode] = true - } - } - - } - - if len(currentLayer) == 0 { - return []NodeOrderedSet{} - } - guideLayers = append(guideLayers, currentLayer) - } - - return -} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go deleted file mode 100644 index 4fd15cc06..000000000 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/edge/edge.go +++ /dev/null @@ -1,61 +0,0 @@ -package edge - -import . "github.com/onsi/gomega/matchers/support/goraph/node" - -type Edge struct { - Node1 Node - Node2 Node -} - -type EdgeSet []Edge - -func (ec EdgeSet) Free(node Node) bool { - for _, e := range ec { - if e.Node1 == node || e.Node2 == node { - return false - } - } - - return true -} - -func (ec EdgeSet) Contains(edge Edge) bool { - for _, e := range ec { - if e == edge { - return true - } - } - - return false -} - -func (ec EdgeSet) FindByNodes(node1, node2 Node) (Edge, bool) { - for _, e := range ec { - if (e.Node1 == node1 && e.Node2 == node2) || (e.Node1 == node2 && e.Node2 == node1) { - return e, true - } - } - - return Edge{}, false -} - -func (ec EdgeSet) SymmetricDifference(ec2 EdgeSet) EdgeSet { - edgesToInclude := make(map[Edge]bool) - - for _, e := range ec { - edgesToInclude[e] = true - } - - for _, e := range ec2 { - edgesToInclude[e] = !edgesToInclude[e] - } - - result := EdgeSet{} - for e, include := range edgesToInclude { - if include { - result = append(result, e) - } - } - - return result -} diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go deleted file mode 100644 index 800c2ea8c..000000000 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/node/node.go +++ /dev/null @@ -1,7 +0,0 @@ -package node - -type Node struct { - Id int -} - -type NodeOrderedSet []Node diff --git a/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go b/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go deleted file mode 100644 index d76a1ee00..000000000 --- a/vendor/github.com/onsi/gomega/matchers/support/goraph/util/util.go +++ /dev/null @@ -1,7 +0,0 @@ -package util - -import "math" - -func Odd(n int) bool { - return math.Mod(float64(n), 2.0) == 1.0 -} diff --git a/vendor/github.com/onsi/gomega/matchers/type_support.go b/vendor/github.com/onsi/gomega/matchers/type_support.go deleted file mode 100644 index b05a5e75d..000000000 --- a/vendor/github.com/onsi/gomega/matchers/type_support.go +++ /dev/null @@ -1,173 +0,0 @@ -/* -Gomega matchers - -This package implements the Gomega matchers and does not typically need to be imported. -See the docs for Gomega for documentation on the matchers - -http://onsi.github.io/gomega/ -*/ -package matchers - -import ( - "fmt" - "reflect" -) - -type omegaMatcher interface { - Match(actual interface{}) (success bool, err error) - FailureMessage(actual interface{}) (message string) - NegatedFailureMessage(actual interface{}) (message string) -} - -func isBool(a interface{}) bool { - return reflect.TypeOf(a).Kind() == reflect.Bool -} - -func isNumber(a interface{}) bool { - if a == nil { - return false - } - kind := reflect.TypeOf(a).Kind() - return reflect.Int <= kind && kind <= reflect.Float64 -} - -func isInteger(a interface{}) bool { - kind := reflect.TypeOf(a).Kind() - return reflect.Int <= kind && kind <= reflect.Int64 -} - -func isUnsignedInteger(a interface{}) bool { - kind := reflect.TypeOf(a).Kind() - return reflect.Uint <= kind && kind <= reflect.Uint64 -} - -func isFloat(a interface{}) bool { - kind := reflect.TypeOf(a).Kind() - return reflect.Float32 <= kind && kind <= reflect.Float64 -} - -func toInteger(a interface{}) int64 { - if isInteger(a) { - return reflect.ValueOf(a).Int() - } else if isUnsignedInteger(a) { - return int64(reflect.ValueOf(a).Uint()) - } else if isFloat(a) { - return int64(reflect.ValueOf(a).Float()) - } - panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) -} - -func toUnsignedInteger(a interface{}) uint64 { - if isInteger(a) { - return uint64(reflect.ValueOf(a).Int()) - } else if isUnsignedInteger(a) { - return reflect.ValueOf(a).Uint() - } else if isFloat(a) { - return uint64(reflect.ValueOf(a).Float()) - } - panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) -} - -func toFloat(a interface{}) float64 { - if isInteger(a) { - return float64(reflect.ValueOf(a).Int()) - } else if isUnsignedInteger(a) { - return float64(reflect.ValueOf(a).Uint()) - } else if isFloat(a) { - return reflect.ValueOf(a).Float() - } - panic(fmt.Sprintf("Expected a number! Got <%T> %#v", a, a)) -} - -func isError(a interface{}) bool { - _, ok := a.(error) - return ok -} - -func isChan(a interface{}) bool { - if isNil(a) { - return false - } - return reflect.TypeOf(a).Kind() == reflect.Chan -} - -func isMap(a interface{}) bool { - if a == nil { - return false - } - return reflect.TypeOf(a).Kind() == reflect.Map -} - -func isArrayOrSlice(a interface{}) bool { - if a == nil { - return false - } - switch reflect.TypeOf(a).Kind() { - case reflect.Array, reflect.Slice: - return true - default: - return false - } -} - -func isString(a interface{}) bool { - if a == nil { - return false - } - return reflect.TypeOf(a).Kind() == reflect.String -} - -func toString(a interface{}) (string, bool) { - aString, isString := a.(string) - if isString { - return aString, true - } - - aBytes, isBytes := a.([]byte) - if isBytes { - return string(aBytes), true - } - - aStringer, isStringer := a.(fmt.Stringer) - if isStringer { - return aStringer.String(), true - } - - return "", false -} - -func lengthOf(a interface{}) (int, bool) { - if a == nil { - return 0, false - } - switch reflect.TypeOf(a).Kind() { - case reflect.Map, reflect.Array, reflect.String, reflect.Chan, reflect.Slice: - return reflect.ValueOf(a).Len(), true - default: - return 0, false - } -} -func capOf(a interface{}) (int, bool) { - if a == nil { - return 0, false - } - switch reflect.TypeOf(a).Kind() { - case reflect.Array, reflect.Chan, reflect.Slice: - return reflect.ValueOf(a).Cap(), true - default: - return 0, false - } -} - -func isNil(a interface{}) bool { - if a == nil { - return true - } - - switch reflect.TypeOf(a).Kind() { - case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return reflect.ValueOf(a).IsNil() - } - - return false -} diff --git a/vendor/github.com/onsi/gomega/matchers/with_transform.go b/vendor/github.com/onsi/gomega/matchers/with_transform.go deleted file mode 100644 index 8e58d8a0f..000000000 --- a/vendor/github.com/onsi/gomega/matchers/with_transform.go +++ /dev/null @@ -1,72 +0,0 @@ -package matchers - -import ( - "fmt" - "reflect" - - "github.com/onsi/gomega/internal/oraclematcher" - "github.com/onsi/gomega/types" -) - -type WithTransformMatcher struct { - // input - Transform interface{} // must be a function of one parameter that returns one value - Matcher types.GomegaMatcher - - // cached value - transformArgType reflect.Type - - // state - transformedValue interface{} -} - -func NewWithTransformMatcher(transform interface{}, matcher types.GomegaMatcher) *WithTransformMatcher { - if transform == nil { - panic("transform function cannot be nil") - } - txType := reflect.TypeOf(transform) - if txType.NumIn() != 1 { - panic("transform function must have 1 argument") - } - if txType.NumOut() != 1 { - panic("transform function must have 1 return value") - } - - return &WithTransformMatcher{ - Transform: transform, - Matcher: matcher, - transformArgType: reflect.TypeOf(transform).In(0), - } -} - -func (m *WithTransformMatcher) Match(actual interface{}) (bool, error) { - // return error if actual's type is incompatible with Transform function's argument type - actualType := reflect.TypeOf(actual) - if !actualType.AssignableTo(m.transformArgType) { - return false, fmt.Errorf("Transform function expects '%s' but we have '%s'", m.transformArgType, actualType) - } - - // call the Transform function with `actual` - fn := reflect.ValueOf(m.Transform) - result := fn.Call([]reflect.Value{reflect.ValueOf(actual)}) - m.transformedValue = result[0].Interface() // expect exactly one value - - return m.Matcher.Match(m.transformedValue) -} - -func (m *WithTransformMatcher) FailureMessage(_ interface{}) (message string) { - return m.Matcher.FailureMessage(m.transformedValue) -} - -func (m *WithTransformMatcher) NegatedFailureMessage(_ interface{}) (message string) { - return m.Matcher.NegatedFailureMessage(m.transformedValue) -} - -func (m *WithTransformMatcher) MatchMayChangeInTheFuture(_ interface{}) bool { - // TODO: Maybe this should always just return true? (Only an issue for non-deterministic transformers.) - // - // Querying the next matcher is fine if the transformer always will return the same value. - // But if the transformer is non-deterministic and returns a different value each time, then there - // is no point in querying the next matcher, since it can only comment on the last transformed value. - return oraclematcher.MatchMayChangeInTheFuture(m.Matcher, m.transformedValue) -} diff --git a/vendor/github.com/onsi/gomega/types/types.go b/vendor/github.com/onsi/gomega/types/types.go deleted file mode 100644 index a83b40110..000000000 --- a/vendor/github.com/onsi/gomega/types/types.go +++ /dev/null @@ -1,17 +0,0 @@ -package types - -type GomegaFailHandler func(message string, callerSkip ...int) - -//A simple *testing.T interface wrapper -type GomegaTestingT interface { - Fatalf(format string, args ...interface{}) -} - -//All Gomega matchers must implement the GomegaMatcher interface -// -//For details on writing custom matchers, check out: http://onsi.github.io/gomega/#adding_your_own_matchers -type GomegaMatcher interface { - Match(actual interface{}) (success bool, err error) - FailureMessage(actual interface{}) (message string) - NegatedFailureMessage(actual interface{}) (message string) -} diff --git a/vendor/github.com/oschwald/geoip2-golang/.gitignore b/vendor/github.com/oschwald/geoip2-golang/.gitignore new file mode 100644 index 000000000..dca06949c --- /dev/null +++ b/vendor/github.com/oschwald/geoip2-golang/.gitignore @@ -0,0 +1,3 @@ +.vscode +*.out +*.test diff --git a/vendor/github.com/oschwald/geoip2-golang/.gitmodules b/vendor/github.com/oschwald/geoip2-golang/.gitmodules new file mode 100644 index 000000000..51779cbff --- /dev/null +++ b/vendor/github.com/oschwald/geoip2-golang/.gitmodules @@ -0,0 +1,3 @@ +[submodule "test-data"] + path = test-data + url = git://github.com/maxmind/MaxMind-DB.git diff --git a/vendor/github.com/oschwald/geoip2-golang/.travis.yml b/vendor/github.com/oschwald/geoip2-golang/.travis.yml new file mode 100644 index 000000000..adb0a6b0f --- /dev/null +++ b/vendor/github.com/oschwald/geoip2-golang/.travis.yml @@ -0,0 +1,24 @@ +language: go + +go: + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - tip + +matrix: + allow_failures: + - go: tip + +before_install: + - "if [[ $TRAVIS_GO_VERSION == 1.8 ]]; then go get -v github.com/golang/lint/golint; fi" + +script: + - go test -race -cpu 1,4 -v + - go test -race -v -tags appengine + - "if [[ $TRAVIS_GO_VERSION == 1.8 ]]; then go vet ./...; fi" + - "if [[ $TRAVIS_GO_VERSION == 1.8 ]]; then golint .; fi" + +sudo: false diff --git a/vendor/github.com/oschwald/geoip2-golang/README.md b/vendor/github.com/oschwald/geoip2-golang/README.md new file mode 100644 index 000000000..7a3c22a0a --- /dev/null +++ b/vendor/github.com/oschwald/geoip2-golang/README.md @@ -0,0 +1,90 @@ +# GeoIP2 Reader for Go # + +[![Build Status](https://travis-ci.org/oschwald/geoip2-golang.png?branch=master)](https://travis-ci.org/oschwald/geoip2-golang) +[![GoDoc](https://godoc.org/github.com/oschwald/geoip2-golang?status.png)](https://godoc.org/github.com/oschwald/geoip2-golang) + +This library reads MaxMind [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/) +and [GeoIP2](http://www.maxmind.com/en/geolocation_landing) databases. + +This library is built using +[the Go maxminddb reader](https://github.com/oschwald/maxminddb-golang). +All data for the database record is decoded using this library. If you only +need several fields, you may get superior performance by using maxminddb's +`Lookup` directly with a result struct that only contains the required fields. +(See [example_test.go](https://github.com/oschwald/maxminddb-golang/blob/master/example_test.go) +in the maxminddb repository for an example of this.) + +## Installation ## + +``` +go get github.com/oschwald/geoip2-golang +``` + +## Usage ## + +[See GoDoc](http://godoc.org/github.com/oschwald/geoip2-golang) for +documentation and examples. + +## Example ## + +```go +package main + +import ( + "fmt" + "github.com/oschwald/geoip2-golang" + "log" + "net" +) + +func main() { + db, err := geoip2.Open("GeoIP2-City.mmdb") + if err != nil { + log.Fatal(err) + } + defer db.Close() + // If you are using strings that may be invalid, check that ip is not nil + ip := net.ParseIP("81.2.69.142") + record, err := db.City(ip) + if err != nil { + log.Fatal(err) + } + fmt.Printf("Portuguese (BR) city name: %v\n", record.City.Names["pt-BR"]) + fmt.Printf("English subdivision name: %v\n", record.Subdivisions[0].Names["en"]) + fmt.Printf("Russian country name: %v\n", record.Country.Names["ru"]) + fmt.Printf("ISO country code: %v\n", record.Country.IsoCode) + fmt.Printf("Time zone: %v\n", record.Location.TimeZone) + fmt.Printf("Coordinates: %v, %v\n", record.Location.Latitude, record.Location.Longitude) + // Output: + // Portuguese (BR) city name: Londres + // English subdivision name: England + // Russian country name: Великобритания + // ISO country code: GB + // Time zone: Europe/London + // Coordinates: 51.5142, -0.0931 +} +``` + +## Testing ## + +Make sure you checked out test data submodule: + +``` +git submodule init +git submodule update +``` + +Execute test suite: + +``` +go test +``` + +## Contributing ## + +Contributions welcome! Please fork the repository and open a pull request +with your changes. + +## License ## + +This is free software, licensed under the ISC license. diff --git a/vendor/github.com/oschwald/maxminddb-golang/.gitignore b/vendor/github.com/oschwald/maxminddb-golang/.gitignore new file mode 100644 index 000000000..fe3fa4ab9 --- /dev/null +++ b/vendor/github.com/oschwald/maxminddb-golang/.gitignore @@ -0,0 +1,4 @@ +.vscode +*.out +*.sw? +*.test diff --git a/vendor/github.com/oschwald/maxminddb-golang/.gitmodules b/vendor/github.com/oschwald/maxminddb-golang/.gitmodules new file mode 100644 index 000000000..400b2ab62 --- /dev/null +++ b/vendor/github.com/oschwald/maxminddb-golang/.gitmodules @@ -0,0 +1,3 @@ +[submodule "test-data"] + path = test-data + url = https://github.com/maxmind/MaxMind-DB.git diff --git a/vendor/github.com/oschwald/maxminddb-golang/.travis.yml b/vendor/github.com/oschwald/maxminddb-golang/.travis.yml new file mode 100644 index 000000000..49c4478b9 --- /dev/null +++ b/vendor/github.com/oschwald/maxminddb-golang/.travis.yml @@ -0,0 +1,23 @@ +language: go + +go: + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - tip + +before_install: + - "if [[ $TRAVIS_GO_VERSION == 1.7 ]]; then go get -v github.com/golang/lint/golint; fi" + +install: + - go get -v -t ./... + +script: + - go test -race -cpu 1,4 -v + - go test -race -v -tags appengine + - "if [[ $TRAVIS_GO_VERSION == 1.7 ]]; then go vet ./...; fi" + - "if [[ $TRAVIS_GO_VERSION == 1.7 ]]; then golint .; fi" + +sudo: false diff --git a/vendor/github.com/oschwald/maxminddb-golang/README.md b/vendor/github.com/oschwald/maxminddb-golang/README.md new file mode 100644 index 000000000..cdd6bd1a8 --- /dev/null +++ b/vendor/github.com/oschwald/maxminddb-golang/README.md @@ -0,0 +1,38 @@ +# MaxMind DB Reader for Go # + +[![Build Status](https://travis-ci.org/oschwald/maxminddb-golang.png?branch=master)](https://travis-ci.org/oschwald/maxminddb-golang) +[![Windows Build Status](https://ci.appveyor.com/api/projects/status/4j2f9oep8nnfrmov/branch/master?svg=true)](https://ci.appveyor.com/project/oschwald/maxminddb-golang/branch/master) +[![GoDoc](https://godoc.org/github.com/oschwald/maxminddb-golang?status.png)](https://godoc.org/github.com/oschwald/maxminddb-golang) + +This is a Go reader for the MaxMind DB format. Although this can be used to +read [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/) and +[GeoIP2](https://www.maxmind.com/en/geoip2-databases) databases, +[geoip2](https://github.com/oschwald/geoip2-golang) provides a higher-level +API for doing so. + +This is not an official MaxMind API. + +## Installation ## + +``` +go get github.com/oschwald/maxminddb-golang +``` + +## Usage ## + +[See GoDoc](http://godoc.org/github.com/oschwald/maxminddb-golang) for +documentation and examples. + +## Examples ## + +See [GoDoc](http://godoc.org/github.com/oschwald/maxminddb-golang) or +`example_test.go` for examples. + +## Contributing ## + +Contributions welcome! Please fork the repository and open a pull request +with your changes. + +## License ## + +This is free software, licensed under the ISC License. diff --git a/vendor/github.com/oschwald/maxminddb-golang/appveyor.yml b/vendor/github.com/oschwald/maxminddb-golang/appveyor.yml new file mode 100644 index 000000000..e2bb9dd23 --- /dev/null +++ b/vendor/github.com/oschwald/maxminddb-golang/appveyor.yml @@ -0,0 +1,19 @@ +version: "{build}" + +os: Windows Server 2012 R2 + +clone_folder: c:\gopath\src\github.com\oschwald\maxminddb-golang + +environment: + GOPATH: c:\gopath + +install: + - echo %PATH% + - echo %GOPATH% + - git submodule update --init --recursive + - go version + - go env + - go get -v -t ./... + +build_script: + - go test -v ./... diff --git a/vendor/github.com/petermattis/goid/.gitignore b/vendor/github.com/petermattis/goid/.gitignore new file mode 100644 index 000000000..2b9d6b552 --- /dev/null +++ b/vendor/github.com/petermattis/goid/.gitignore @@ -0,0 +1,4 @@ +*~ +*.test +.*.swp +.DS_Store diff --git a/vendor/github.com/petermattis/goid/.travis.yml b/vendor/github.com/petermattis/goid/.travis.yml new file mode 100644 index 000000000..aacc9a920 --- /dev/null +++ b/vendor/github.com/petermattis/goid/.travis.yml @@ -0,0 +1,10 @@ +language: go + +go: + - 1.3.x + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - master diff --git a/vendor/github.com/petermattis/goid/README.md b/vendor/github.com/petermattis/goid/README.md new file mode 100644 index 000000000..6d624e879 --- /dev/null +++ b/vendor/github.com/petermattis/goid/README.md @@ -0,0 +1,4 @@ +# goid [![Build Status](https://travis-ci.org/petermattis/goid.svg?branch=master)](https://travis-ci.org/petermattis/goid) + +Programatically retrieve the current goroutine's ID. See [the CI +configuration](.travis.yml) for supported Go versions. diff --git a/vendor/github.com/pkg/errors/.gitignore b/vendor/github.com/pkg/errors/.gitignore new file mode 100644 index 000000000..daf913b1b --- /dev/null +++ b/vendor/github.com/pkg/errors/.gitignore @@ -0,0 +1,24 @@ +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml new file mode 100644 index 000000000..7ca408d1b --- /dev/null +++ b/vendor/github.com/pkg/errors/.travis.yml @@ -0,0 +1,13 @@ +language: go +go_import_path: github.com/pkg/errors +go: + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - 1.9.x + - tip + +script: + - go test -v ./... diff --git a/vendor/github.com/pkg/errors/README.md b/vendor/github.com/pkg/errors/README.md new file mode 100644 index 000000000..6483ba2af --- /dev/null +++ b/vendor/github.com/pkg/errors/README.md @@ -0,0 +1,52 @@ +# errors [![Travis-CI](https://travis-ci.org/pkg/errors.svg)](https://travis-ci.org/pkg/errors) [![AppVeyor](https://ci.appveyor.com/api/projects/status/b98mptawhudj53ep/branch/master?svg=true)](https://ci.appveyor.com/project/davecheney/errors/branch/master) [![GoDoc](https://godoc.org/github.com/pkg/errors?status.svg)](http://godoc.org/github.com/pkg/errors) [![Report card](https://goreportcard.com/badge/github.com/pkg/errors)](https://goreportcard.com/report/github.com/pkg/errors) [![Sourcegraph](https://sourcegraph.com/github.com/pkg/errors/-/badge.svg)](https://sourcegraph.com/github.com/pkg/errors?badge) + +Package errors provides simple error handling primitives. + +`go get github.com/pkg/errors` + +The traditional error handling idiom in Go is roughly akin to +```go +if err != nil { + return err +} +``` +which applied recursively up the call stack results in error reports without context or debugging information. The errors package allows programmers to add context to the failure path in their code in a way that does not destroy the original value of the error. + +## Adding context to an error + +The errors.Wrap function returns a new error that adds context to the original error. For example +```go +_, err := ioutil.ReadAll(r) +if err != nil { + return errors.Wrap(err, "read failed") +} +``` +## Retrieving the cause of an error + +Using `errors.Wrap` constructs a stack of errors, adding context to the preceding error. Depending on the nature of the error it may be necessary to reverse the operation of errors.Wrap to retrieve the original error for inspection. Any error value which implements this interface can be inspected by `errors.Cause`. +```go +type causer interface { + Cause() error +} +``` +`errors.Cause` will recursively retrieve the topmost error which does not implement `causer`, which is assumed to be the original cause. For example: +```go +switch err := errors.Cause(err).(type) { +case *MyError: + // handle specifically +default: + // unknown error +} +``` + +[Read the package documentation for more information](https://godoc.org/github.com/pkg/errors). + +## Contributing + +We welcome pull requests, bug fixes and issue reports. With that said, the bar for adding new symbols to this package is intentionally set high. + +Before proposing a change, please discuss your change by raising an issue. + +## License + +BSD-2-Clause diff --git a/vendor/github.com/pkg/errors/appveyor.yml b/vendor/github.com/pkg/errors/appveyor.yml new file mode 100644 index 000000000..a932eade0 --- /dev/null +++ b/vendor/github.com/pkg/errors/appveyor.yml @@ -0,0 +1,32 @@ +version: build-{build}.{branch} + +clone_folder: C:\gopath\src\github.com\pkg\errors +shallow_clone: true # for startup speed + +environment: + GOPATH: C:\gopath + +platform: + - x64 + +# http://www.appveyor.com/docs/installed-software +install: + # some helpful output for debugging builds + - go version + - go env + # pre-installed MinGW at C:\MinGW is 32bit only + # but MSYS2 at C:\msys64 has mingw64 + - set PATH=C:\msys64\mingw64\bin;%PATH% + - gcc --version + - g++ --version + +build_script: + - go install -v ./... + +test_script: + - set PATH=C:\gopath\bin;%PATH% + - go test -v ./... + +#artifacts: +# - path: '%GOPATH%\bin\*.exe' +deploy: off diff --git a/vendor/github.com/prometheus/client_golang/prometheus/LICENSE b/vendor/github.com/prometheus/client_golang/LICENSE similarity index 100% rename from vendor/github.com/prometheus/client_golang/prometheus/LICENSE rename to vendor/github.com/prometheus/client_golang/LICENSE diff --git a/vendor/github.com/prometheus/client_golang/NOTICE b/vendor/github.com/prometheus/client_golang/NOTICE new file mode 100644 index 000000000..dd878a30e --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/NOTICE @@ -0,0 +1,23 @@ +Prometheus instrumentation library for Go applications +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). + + +The following components are included in this product: + +perks - a fork of https://github.com/bmizerany/perks +https://github.com/beorn7/perks +Copyright 2013-2015 Blake Mizerany, Björn Rabenstein +See https://github.com/beorn7/perks/blob/master/README.md for license details. + +Go support for Protocol Buffers - Google's data interchange format +http://github.com/golang/protobuf/ +Copyright 2010 The Go Authors +See source code for license details. + +Support for streaming Protocol Buffer messages for the Go language (golang). +https://github.com/matttproud/golang_protobuf_extensions +Copyright 2013 Matt T. Proud +Licensed under the Apache License, Version 2.0 diff --git a/vendor/github.com/prometheus/client_golang/prometheus/.gitignore b/vendor/github.com/prometheus/client_golang/prometheus/.gitignore new file mode 100644 index 000000000..3460f0346 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/.gitignore @@ -0,0 +1 @@ +command-line-arguments.test diff --git a/vendor/github.com/prometheus/client_golang/prometheus/README.md b/vendor/github.com/prometheus/client_golang/prometheus/README.md new file mode 100644 index 000000000..44986bff0 --- /dev/null +++ b/vendor/github.com/prometheus/client_golang/prometheus/README.md @@ -0,0 +1 @@ +See [![go-doc](https://godoc.org/github.com/prometheus/client_golang/prometheus?status.svg)](https://godoc.org/github.com/prometheus/client_golang/prometheus). diff --git a/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go b/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go deleted file mode 100644 index 466e2295d..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/graphite/bridge.go +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2016 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package graphite provides a bridge to push Prometheus metrics to a Graphite -// server. -package graphite - -import ( - "bufio" - "errors" - "fmt" - "io" - "net" - "sort" - "time" - - "github.com/prometheus/common/expfmt" - "github.com/prometheus/common/model" - "golang.org/x/net/context" - - dto "github.com/prometheus/client_model/go" - - "github.com/prometheus/client_golang/prometheus" -) - -const ( - defaultInterval = 15 * time.Second - millisecondsPerSecond = 1000 -) - -// HandlerErrorHandling defines how a Handler serving metrics will handle -// errors. -type HandlerErrorHandling int - -// These constants cause handlers serving metrics to behave as described if -// errors are encountered. -const ( - // Ignore errors and try to push as many metrics to Graphite as possible. - ContinueOnError HandlerErrorHandling = iota - - // Abort the push to Graphite upon the first error encountered. - AbortOnError -) - -// Config defines the Graphite bridge config. -type Config struct { - // The url to push data to. Required. - URL string - - // The prefix for the pushed Graphite metrics. Defaults to empty string. - Prefix string - - // The interval to use for pushing data to Graphite. Defaults to 15 seconds. - Interval time.Duration - - // The timeout for pushing metrics to Graphite. Defaults to 15 seconds. - Timeout time.Duration - - // The Gatherer to use for metrics. Defaults to prometheus.DefaultGatherer. - Gatherer prometheus.Gatherer - - // The logger that messages are written to. Defaults to no logging. - Logger Logger - - // ErrorHandling defines how errors are handled. Note that errors are - // logged regardless of the configured ErrorHandling provided Logger - // is not nil. - ErrorHandling HandlerErrorHandling -} - -// Bridge pushes metrics to the configured Graphite server. -type Bridge struct { - url string - prefix string - interval time.Duration - timeout time.Duration - - errorHandling HandlerErrorHandling - logger Logger - - g prometheus.Gatherer -} - -// Logger is the minimal interface Bridge needs for logging. Note that -// log.Logger from the standard library implements this interface, and it is -// easy to implement by custom loggers, if they don't do so already anyway. -type Logger interface { - Println(v ...interface{}) -} - -// NewBridge returns a pointer to a new Bridge struct. -func NewBridge(c *Config) (*Bridge, error) { - b := &Bridge{} - - if c.URL == "" { - return nil, errors.New("missing URL") - } - b.url = c.URL - - if c.Gatherer == nil { - b.g = prometheus.DefaultGatherer - } else { - b.g = c.Gatherer - } - - if c.Logger != nil { - b.logger = c.Logger - } - - if c.Prefix != "" { - b.prefix = c.Prefix - } - - var z time.Duration - if c.Interval == z { - b.interval = defaultInterval - } else { - b.interval = c.Interval - } - - if c.Timeout == z { - b.timeout = defaultInterval - } else { - b.timeout = c.Timeout - } - - b.errorHandling = c.ErrorHandling - - return b, nil -} - -// Run starts the event loop that pushes Prometheus metrics to Graphite at the -// configured interval. -func (b *Bridge) Run(ctx context.Context) { - ticker := time.NewTicker(b.interval) - defer ticker.Stop() - for { - select { - case <-ticker.C: - if err := b.Push(); err != nil && b.logger != nil { - b.logger.Println("error pushing to Graphite:", err) - } - case <-ctx.Done(): - return - } - } -} - -// Push pushes Prometheus metrics to the configured Graphite server. -func (b *Bridge) Push() error { - mfs, err := b.g.Gather() - if err != nil || len(mfs) == 0 { - switch b.errorHandling { - case AbortOnError: - return err - case ContinueOnError: - if b.logger != nil { - b.logger.Println("continue on error:", err) - } - default: - panic("unrecognized error handling value") - } - } - - conn, err := net.DialTimeout("tcp", b.url, b.timeout) - if err != nil { - return err - } - defer conn.Close() - - return writeMetrics(conn, mfs, b.prefix, model.Now()) -} - -func writeMetrics(w io.Writer, mfs []*dto.MetricFamily, prefix string, now model.Time) error { - vec, err := expfmt.ExtractSamples(&expfmt.DecodeOptions{ - Timestamp: now, - }, mfs...) - if err != nil { - return err - } - - buf := bufio.NewWriter(w) - for _, s := range vec { - for _, c := range prefix { - if _, err := buf.WriteRune(c); err != nil { - return err - } - } - if err := buf.WriteByte('.'); err != nil { - return err - } - if err := writeMetric(buf, s.Metric); err != nil { - return err - } - if _, err := fmt.Fprintf(buf, " %g %d\n", s.Value, int64(s.Timestamp)/millisecondsPerSecond); err != nil { - return err - } - if err := buf.Flush(); err != nil { - return err - } - } - - return nil -} - -func writeMetric(buf *bufio.Writer, m model.Metric) error { - metricName, hasName := m[model.MetricNameLabel] - numLabels := len(m) - 1 - if !hasName { - numLabels = len(m) - } - - labelStrings := make([]string, 0, numLabels) - for label, value := range m { - if label != model.MetricNameLabel { - labelStrings = append(labelStrings, fmt.Sprintf("%s %s", string(label), string(value))) - } - } - - var err error - switch numLabels { - case 0: - if hasName { - return writeSanitized(buf, string(metricName)) - } - default: - sort.Strings(labelStrings) - if err = writeSanitized(buf, string(metricName)); err != nil { - return err - } - for _, s := range labelStrings { - if err = buf.WriteByte('.'); err != nil { - return err - } - if err = writeSanitized(buf, s); err != nil { - return err - } - } - } - return nil -} - -func writeSanitized(buf *bufio.Writer, s string) error { - prevUnderscore := false - - for _, c := range s { - c = replaceInvalidRune(c) - if c == '_' { - if prevUnderscore { - continue - } - prevUnderscore = true - } else { - prevUnderscore = false - } - if _, err := buf.WriteRune(c); err != nil { - return err - } - } - - return nil -} - -func replaceInvalidRune(c rune) rune { - if c == ' ' { - return '.' - } - if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == ':' || c == '-' || (c >= '0' && c <= '9')) { - return '_' - } - return c -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promauto/auto.go b/vendor/github.com/prometheus/client_golang/prometheus/promauto/auto.go deleted file mode 100644 index a00ba1eb8..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promauto/auto.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright 2018 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package promauto provides constructors for the usual Prometheus metrics that -// return them already registered with the global registry -// (prometheus.DefaultRegisterer). This allows very compact code, avoiding any -// references to the registry altogether, but all the constructors in this -// package will panic if the registration fails. -// -// The following example is a complete program to create a histogram of normally -// distributed random numbers from the math/rand package: -// -// package main -// -// import ( -// "math/rand" -// "net/http" -// -// "github.com/prometheus/client_golang/prometheus" -// "github.com/prometheus/client_golang/prometheus/promauto" -// "github.com/prometheus/client_golang/prometheus/promhttp" -// ) -// -// var histogram = promauto.NewHistogram(prometheus.HistogramOpts{ -// Name: "random_numbers", -// Help: "A histogram of normally distributed random numbers.", -// Buckets: prometheus.LinearBuckets(-3, .1, 61), -// }) -// -// func Random() { -// for { -// histogram.Observe(rand.NormFloat64()) -// } -// } -// -// func main() { -// go Random() -// http.Handle("/metrics", promhttp.Handler()) -// http.ListenAndServe(":1971", nil) -// } -// -// Prometheus's version of a minimal hello-world program: -// -// package main -// -// import ( -// "fmt" -// "net/http" -// -// "github.com/prometheus/client_golang/prometheus" -// "github.com/prometheus/client_golang/prometheus/promauto" -// "github.com/prometheus/client_golang/prometheus/promhttp" -// ) -// -// func main() { -// http.Handle("/", promhttp.InstrumentHandlerCounter( -// promauto.NewCounterVec( -// prometheus.CounterOpts{ -// Name: "hello_requests_total", -// Help: "Total number of hello-world requests by HTTP code.", -// }, -// []string{"code"}, -// ), -// http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { -// fmt.Fprint(w, "Hello, world!") -// }), -// )) -// http.Handle("/metrics", promhttp.Handler()) -// http.ListenAndServe(":1971", nil) -// } -// -// This appears very handy. So why are these constructors locked away in a -// separate package? There are two caveats: -// -// First, in more complex programs, global state is often quite problematic. -// That's the reason why the metrics constructors in the prometheus package do -// not interact with the global prometheus.DefaultRegisterer on their own. You -// are free to use the Register or MustRegister functions to register them with -// the global prometheus.DefaultRegisterer, but you could as well choose a local -// Registerer (usually created with prometheus.NewRegistry, but there are other -// scenarios, e.g. testing). -// -// The second issue is that registration may fail, e.g. if a metric inconsistent -// with the newly to be registered one is already registered. But how to signal -// and handle a panic in the automatic registration with the default registry? -// The only way is panicking. While panicking on invalid input provided by the -// programmer is certainly fine, things are a bit more subtle in this case: You -// might just add another package to the program, and that package (in its init -// function) happens to register a metric with the same name as your code. Now, -// all of a sudden, either your code or the code of the newly imported package -// panics, depending on initialization order, without any opportunity to handle -// the case gracefully. Even worse is a scenario where registration happens -// later during the runtime (e.g. upon loading some kind of plugin), where the -// panic could be triggered long after the code has been deployed to -// production. A possibility to panic should be explicitly called out by the -// Must… idiom, cf. prometheus.MustRegister. But adding a separate set of -// constructors in the prometheus package called MustRegisterNewCounterVec or -// similar would be quite unwieldy. Adding an extra MustRegister method to each -// metric, returning the registered metric, would result in nice code for those -// using the method, but would pollute every single metric interface for -// everybody avoiding the global registry. -// -// To address both issues, the problematic auto-registering and possibly -// panicking constructors are all in this package with a clear warning -// ahead. And whoever cares about avoiding global state and possibly panicking -// function calls can simply ignore the existence of the promauto package -// altogether. -// -// A final note: There is a similar case in the net/http package of the standard -// library. It has DefaultServeMux as a global instance of ServeMux, and the -// Handle function acts on it, panicking if a handler for the same pattern has -// already been registered. However, one might argue that the whole HTTP routing -// is usually set up closely together in the same package or file, while -// Prometheus metrics tend to be spread widely over the codebase, increasing the -// chance of surprising registration failures. Furthermore, the use of global -// state in net/http has been criticized widely, and some avoid it altogether. -package promauto - -import "github.com/prometheus/client_golang/prometheus" - -// NewCounter works like the function of the same name in the prometheus package -// but it automatically registers the Counter with the -// prometheus.DefaultRegisterer. If the registration fails, NewCounter panics. -func NewCounter(opts prometheus.CounterOpts) prometheus.Counter { - c := prometheus.NewCounter(opts) - prometheus.MustRegister(c) - return c -} - -// NewCounterVec works like the function of the same name in the prometheus -// package but it automatically registers the CounterVec with the -// prometheus.DefaultRegisterer. If the registration fails, NewCounterVec -// panics. -func NewCounterVec(opts prometheus.CounterOpts, labelNames []string) *prometheus.CounterVec { - c := prometheus.NewCounterVec(opts, labelNames) - prometheus.MustRegister(c) - return c -} - -// NewCounterFunc works like the function of the same name in the prometheus -// package but it automatically registers the CounterFunc with the -// prometheus.DefaultRegisterer. If the registration fails, NewCounterFunc -// panics. -func NewCounterFunc(opts prometheus.CounterOpts, function func() float64) prometheus.CounterFunc { - g := prometheus.NewCounterFunc(opts, function) - prometheus.MustRegister(g) - return g -} - -// NewGauge works like the function of the same name in the prometheus package -// but it automatically registers the Gauge with the -// prometheus.DefaultRegisterer. If the registration fails, NewGauge panics. -func NewGauge(opts prometheus.GaugeOpts) prometheus.Gauge { - g := prometheus.NewGauge(opts) - prometheus.MustRegister(g) - return g -} - -// NewGaugeVec works like the function of the same name in the prometheus -// package but it automatically registers the GaugeVec with the -// prometheus.DefaultRegisterer. If the registration fails, NewGaugeVec panics. -func NewGaugeVec(opts prometheus.GaugeOpts, labelNames []string) *prometheus.GaugeVec { - g := prometheus.NewGaugeVec(opts, labelNames) - prometheus.MustRegister(g) - return g -} - -// NewGaugeFunc works like the function of the same name in the prometheus -// package but it automatically registers the GaugeFunc with the -// prometheus.DefaultRegisterer. If the registration fails, NewGaugeFunc panics. -func NewGaugeFunc(opts prometheus.GaugeOpts, function func() float64) prometheus.GaugeFunc { - g := prometheus.NewGaugeFunc(opts, function) - prometheus.MustRegister(g) - return g -} - -// NewSummary works like the function of the same name in the prometheus package -// but it automatically registers the Summary with the -// prometheus.DefaultRegisterer. If the registration fails, NewSummary panics. -func NewSummary(opts prometheus.SummaryOpts) prometheus.Summary { - s := prometheus.NewSummary(opts) - prometheus.MustRegister(s) - return s -} - -// NewSummaryVec works like the function of the same name in the prometheus -// package but it automatically registers the SummaryVec with the -// prometheus.DefaultRegisterer. If the registration fails, NewSummaryVec -// panics. -func NewSummaryVec(opts prometheus.SummaryOpts, labelNames []string) *prometheus.SummaryVec { - s := prometheus.NewSummaryVec(opts, labelNames) - prometheus.MustRegister(s) - return s -} - -// NewHistogram works like the function of the same name in the prometheus -// package but it automatically registers the Histogram with the -// prometheus.DefaultRegisterer. If the registration fails, NewHistogram panics. -func NewHistogram(opts prometheus.HistogramOpts) prometheus.Histogram { - h := prometheus.NewHistogram(opts) - prometheus.MustRegister(h) - return h -} - -// NewHistogramVec works like the function of the same name in the prometheus -// package but it automatically registers the HistogramVec with the -// prometheus.DefaultRegisterer. If the registration fails, NewHistogramVec -// panics. -func NewHistogramVec(opts prometheus.HistogramOpts, labelNames []string) *prometheus.HistogramVec { - h := prometheus.NewHistogramVec(opts, labelNames) - prometheus.MustRegister(h) - return h -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go b/vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go deleted file mode 100644 index 3d62b5725..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/push/deprecated.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2018 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package push - -// This file contains only deprecated code. Remove after v0.9 is released. - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "os" - "strings" - - "github.com/prometheus/common/expfmt" - "github.com/prometheus/common/model" - - "github.com/prometheus/client_golang/prometheus" -) - -// FromGatherer triggers a metric collection by the provided Gatherer (which is -// usually implemented by a prometheus.Registry) and pushes all gathered metrics -// to the Pushgateway specified by url, using the provided job name and the -// (optional) further grouping labels (the grouping map may be nil). See the -// Pushgateway documentation for detailed implications of the job and other -// grouping labels. Neither the job name nor any grouping label value may -// contain a "/". The metrics pushed must not contain a job label of their own -// nor any of the grouping labels. -// -// You can use just host:port or ip:port as url, in which case 'http://' is -// added automatically. You can also include the schema in the URL. However, do -// not include the '/metrics/jobs/...' part. -// -// Note that all previously pushed metrics with the same job and other grouping -// labels will be replaced with the metrics pushed by this call. (It uses HTTP -// method 'PUT' to push to the Pushgateway.) -// -// Deprecated: Please use a Pusher created with New instead. -func FromGatherer(job string, grouping map[string]string, url string, g prometheus.Gatherer) error { - return push(job, grouping, url, g, "PUT") -} - -// AddFromGatherer works like FromGatherer, but only previously pushed metrics -// with the same name (and the same job and other grouping labels) will be -// replaced. (It uses HTTP method 'POST' to push to the Pushgateway.) -// -// Deprecated: Please use a Pusher created with New instead. -func AddFromGatherer(job string, grouping map[string]string, url string, g prometheus.Gatherer) error { - return push(job, grouping, url, g, "POST") -} - -func push(job string, grouping map[string]string, pushURL string, g prometheus.Gatherer, method string) error { - if !strings.Contains(pushURL, "://") { - pushURL = "http://" + pushURL - } - if strings.HasSuffix(pushURL, "/") { - pushURL = pushURL[:len(pushURL)-1] - } - - if strings.Contains(job, "/") { - return fmt.Errorf("job contains '/': %s", job) - } - urlComponents := []string{url.QueryEscape(job)} - for ln, lv := range grouping { - if !model.LabelName(ln).IsValid() { - return fmt.Errorf("grouping label has invalid name: %s", ln) - } - if strings.Contains(lv, "/") { - return fmt.Errorf("value of grouping label %s contains '/': %s", ln, lv) - } - urlComponents = append(urlComponents, ln, lv) - } - pushURL = fmt.Sprintf("%s/metrics/job/%s", pushURL, strings.Join(urlComponents, "/")) - - mfs, err := g.Gather() - if err != nil { - return err - } - buf := &bytes.Buffer{} - enc := expfmt.NewEncoder(buf, expfmt.FmtProtoDelim) - // Check for pre-existing grouping labels: - for _, mf := range mfs { - for _, m := range mf.GetMetric() { - for _, l := range m.GetLabel() { - if l.GetName() == "job" { - return fmt.Errorf("pushed metric %s (%s) already contains a job label", mf.GetName(), m) - } - if _, ok := grouping[l.GetName()]; ok { - return fmt.Errorf( - "pushed metric %s (%s) already contains grouping label %s", - mf.GetName(), m, l.GetName(), - ) - } - } - } - enc.Encode(mf) - } - req, err := http.NewRequest(method, pushURL, buf) - if err != nil { - return err - } - req.Header.Set(contentTypeHeader, string(expfmt.FmtProtoDelim)) - resp, err := http.DefaultClient.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - if resp.StatusCode != 202 { - body, _ := ioutil.ReadAll(resp.Body) // Ignore any further error as this is for an error message only. - return fmt.Errorf("unexpected status code %d while pushing to %s: %s", resp.StatusCode, pushURL, body) - } - return nil -} - -// Collectors works like FromGatherer, but it does not use a Gatherer. Instead, -// it collects from the provided collectors directly. It is a convenient way to -// push only a few metrics. -// -// Deprecated: Please use a Pusher created with New instead. -func Collectors(job string, grouping map[string]string, url string, collectors ...prometheus.Collector) error { - return pushCollectors(job, grouping, url, "PUT", collectors...) -} - -// AddCollectors works like AddFromGatherer, but it does not use a Gatherer. -// Instead, it collects from the provided collectors directly. It is a -// convenient way to push only a few metrics. -// -// Deprecated: Please use a Pusher created with New instead. -func AddCollectors(job string, grouping map[string]string, url string, collectors ...prometheus.Collector) error { - return pushCollectors(job, grouping, url, "POST", collectors...) -} - -func pushCollectors(job string, grouping map[string]string, url, method string, collectors ...prometheus.Collector) error { - r := prometheus.NewRegistry() - for _, collector := range collectors { - if err := r.Register(collector); err != nil { - return err - } - } - return push(job, grouping, url, r, method) -} - -// HostnameGroupingKey returns a label map with the only entry -// {instance=""}. This can be conveniently used as the grouping -// parameter if metrics should be pushed with the hostname as label. The -// returned map is created upon each call so that the caller is free to add more -// labels to the map. -// -// Deprecated: Usually, metrics pushed to the Pushgateway should not be -// host-centric. (You would use https://github.com/prometheus/node_exporter in -// that case.) If you have the need to add the hostname to the grouping key, you -// are probably doing something wrong. See -// https://prometheus.io/docs/practices/pushing/ for details. -func HostnameGroupingKey() map[string]string { - hostname, err := os.Hostname() - if err != nil { - return map[string]string{"instance": "unknown"} - } - return map[string]string{"instance": hostname} -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/push/push.go b/vendor/github.com/prometheus/client_golang/prometheus/push/push.go deleted file mode 100644 index 3721ff198..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/push/push.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2015 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package push provides functions to push metrics to a Pushgateway. It uses a -// builder approach. Create a Pusher with New and then add the various options -// by using its methods, finally calling Add or Push, like this: -// -// // Easy case: -// push.New("http://example.org/metrics", "my_job").Gatherer(myRegistry).Push() -// -// // Complex case: -// push.New("http://example.org/metrics", "my_job"). -// Collector(myCollector1). -// Collector(myCollector2). -// Grouping("zone", "xy"). -// Client(&myHTTPClient). -// BasicAuth("top", "secret"). -// Add() -// -// See the examples section for more detailed examples. -// -// See the documentation of the Pushgateway to understand the meaning of -// the grouping key and the differences between Push and Add: -// https://github.com/prometheus/pushgateway -package push - -import ( - "bytes" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "strings" - - "github.com/prometheus/common/expfmt" - "github.com/prometheus/common/model" - - "github.com/prometheus/client_golang/prometheus" -) - -const contentTypeHeader = "Content-Type" - -// Pusher manages a push to the Pushgateway. Use New to create one, configure it -// with its methods, and finally use the Add or Push method to push. -type Pusher struct { - error error - - url, job string - grouping map[string]string - - gatherers prometheus.Gatherers - registerer prometheus.Registerer - - client *http.Client - useBasicAuth bool - username, password string -} - -// New creates a new Pusher to push to the provided URL with the provided job -// name. You can use just host:port or ip:port as url, in which case “http://” -// is added automatically. Alternatively, include the schema in the -// URL. However, do not include the “/metrics/jobs/…” part. -// -// Note that until https://github.com/prometheus/pushgateway/issues/97 is -// resolved, a “/” character in the job name is prohibited. -func New(url, job string) *Pusher { - var ( - reg = prometheus.NewRegistry() - err error - ) - if !strings.Contains(url, "://") { - url = "http://" + url - } - if strings.HasSuffix(url, "/") { - url = url[:len(url)-1] - } - if strings.Contains(job, "/") { - err = fmt.Errorf("job contains '/': %s", job) - } - - return &Pusher{ - error: err, - url: url, - job: job, - grouping: map[string]string{}, - gatherers: prometheus.Gatherers{reg}, - registerer: reg, - client: &http.Client{}, - } -} - -// Push collects/gathers all metrics from all Collectors and Gatherers added to -// this Pusher. Then, it pushes them to the Pushgateway configured while -// creating this Pusher, using the configured job name and any added grouping -// labels as grouping key. All previously pushed metrics with the same job and -// other grouping labels will be replaced with the metrics pushed by this -// call. (It uses HTTP method “PUT” to push to the Pushgateway.) -// -// Push returns the first error encountered by any method call (including this -// one) in the lifetime of the Pusher. -func (p *Pusher) Push() error { - return p.push("PUT") -} - -// Add works like push, but only previously pushed metrics with the same name -// (and the same job and other grouping labels) will be replaced. (It uses HTTP -// method “POST” to push to the Pushgateway.) -func (p *Pusher) Add() error { - return p.push("POST") -} - -// Gatherer adds a Gatherer to the Pusher, from which metrics will be gathered -// to push them to the Pushgateway. The gathered metrics must not contain a job -// label of their own. -// -// For convenience, this method returns a pointer to the Pusher itself. -func (p *Pusher) Gatherer(g prometheus.Gatherer) *Pusher { - p.gatherers = append(p.gatherers, g) - return p -} - -// Collector adds a Collector to the Pusher, from which metrics will be -// collected to push them to the Pushgateway. The collected metrics must not -// contain a job label of their own. -// -// For convenience, this method returns a pointer to the Pusher itself. -func (p *Pusher) Collector(c prometheus.Collector) *Pusher { - if p.error == nil { - p.error = p.registerer.Register(c) - } - return p -} - -// Grouping adds a label pair to the grouping key of the Pusher, replacing any -// previously added label pair with the same label name. Note that setting any -// labels in the grouping key that are already contained in the metrics to push -// will lead to an error. -// -// For convenience, this method returns a pointer to the Pusher itself. -// -// Note that until https://github.com/prometheus/pushgateway/issues/97 is -// resolved, this method does not allow a “/” character in the label value. -func (p *Pusher) Grouping(name, value string) *Pusher { - if p.error == nil { - if !model.LabelName(name).IsValid() { - p.error = fmt.Errorf("grouping label has invalid name: %s", name) - return p - } - if strings.Contains(value, "/") { - p.error = fmt.Errorf("value of grouping label %s contains '/': %s", name, value) - return p - } - p.grouping[name] = value - } - return p -} - -// Client sets a custom HTTP client for the Pusher. For convenience, this method -// returns a pointer to the Pusher itself. -func (p *Pusher) Client(c *http.Client) *Pusher { - p.client = c - return p -} - -// BasicAuth configures the Pusher to use HTTP Basic Authentication with the -// provided username and password. For convenience, this method returns a -// pointer to the Pusher itself. -func (p *Pusher) BasicAuth(username, password string) *Pusher { - p.useBasicAuth = true - p.username = username - p.password = password - return p -} - -func (p *Pusher) push(method string) error { - if p.error != nil { - return p.error - } - urlComponents := []string{url.QueryEscape(p.job)} - for ln, lv := range p.grouping { - urlComponents = append(urlComponents, ln, lv) - } - pushURL := fmt.Sprintf("%s/metrics/job/%s", p.url, strings.Join(urlComponents, "/")) - - mfs, err := p.gatherers.Gather() - if err != nil { - return err - } - buf := &bytes.Buffer{} - enc := expfmt.NewEncoder(buf, expfmt.FmtProtoDelim) - // Check for pre-existing grouping labels: - for _, mf := range mfs { - for _, m := range mf.GetMetric() { - for _, l := range m.GetLabel() { - if l.GetName() == "job" { - return fmt.Errorf("pushed metric %s (%s) already contains a job label", mf.GetName(), m) - } - if _, ok := p.grouping[l.GetName()]; ok { - return fmt.Errorf( - "pushed metric %s (%s) already contains grouping label %s", - mf.GetName(), m, l.GetName(), - ) - } - } - } - enc.Encode(mf) - } - req, err := http.NewRequest(method, pushURL, buf) - if err != nil { - return err - } - if p.useBasicAuth { - req.SetBasicAuth(p.username, p.password) - } - req.Header.Set(contentTypeHeader, string(expfmt.FmtProtoDelim)) - resp, err := p.client.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - if resp.StatusCode != 202 { - body, _ := ioutil.ReadAll(resp.Body) // Ignore any further error as this is for an error message only. - return fmt.Errorf("unexpected status code %d while pushing to %s: %s", resp.StatusCode, pushURL, body) - } - return nil -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go b/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go deleted file mode 100644 index d148af9b8..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/testutil/testutil.go +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2018 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package testutil provides helpers to test code using the prometheus package -// of client_golang. -// -// While writing unit tests to verify correct instrumentation of your code, it's -// a common mistake to mostly test the instrumentation library instead of your -// own code. Rather than verifying that a prometheus.Counter's value has changed -// as expected or that it shows up in the exposition after registration, it is -// in general more robust and more faithful to the concept of unit tests to use -// mock implementations of the prometheus.Counter and prometheus.Registerer -// interfaces that simply assert that the Add or Register methods have been -// called with the expected arguments. However, this might be overkill in simple -// scenarios. The ToFloat64 function is provided for simple inspection of a -// single-value metric, but it has to be used with caution. -// -// End-to-end tests to verify all or larger parts of the metrics exposition can -// be implemented with the CollectAndCompare or GatherAndCompare functions. The -// most appropriate use is not so much testing instrumentation of your code, but -// testing custom prometheus.Collector implementations and in particular whole -// exporters, i.e. programs that retrieve telemetry data from a 3rd party source -// and convert it into Prometheus metrics. -package testutil - -import ( - "bytes" - "fmt" - "io" - "reflect" - - "github.com/prometheus/common/expfmt" - - dto "github.com/prometheus/client_model/go" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/internal" -) - -// ToFloat64 collects all Metrics from the provided Collector. It expects that -// this results in exactly one Metric being collected, which must be a Gauge, -// Counter, or Untyped. In all other cases, ToFloat64 panics. ToFloat64 returns -// the value of the collected Metric. -// -// The Collector provided is typically a simple instance of Gauge or Counter, or -// – less commonly – a GaugeVec or CounterVec with exactly one element. But any -// Collector fulfilling the prerequisites described above will do. -// -// Use this function with caution. It is computationally very expensive and thus -// not suited at all to read values from Metrics in regular code. This is really -// only for testing purposes, and even for testing, other approaches are often -// more appropriate (see this package's documentation). -// -// A clear anti-pattern would be to use a metric type from the prometheus -// package to track values that are also needed for something else than the -// exposition of Prometheus metrics. For example, you would like to track the -// number of items in a queue because your code should reject queuing further -// items if a certain limit is reached. It is tempting to track the number of -// items in a prometheus.Gauge, as it is then easily available as a metric for -// exposition, too. However, then you would need to call ToFloat64 in your -// regular code, potentially quite often. The recommended way is to track the -// number of items conventionally (in the way you would have done it without -// considering Prometheus metrics) and then expose the number with a -// prometheus.GaugeFunc. -func ToFloat64(c prometheus.Collector) float64 { - var ( - m prometheus.Metric - mCount int - mChan = make(chan prometheus.Metric) - done = make(chan struct{}) - ) - - go func() { - for m = range mChan { - mCount++ - } - close(done) - }() - - c.Collect(mChan) - close(mChan) - <-done - - if mCount != 1 { - panic(fmt.Errorf("collected %d metrics instead of exactly 1", mCount)) - } - - pb := &dto.Metric{} - m.Write(pb) - if pb.Gauge != nil { - return pb.Gauge.GetValue() - } - if pb.Counter != nil { - return pb.Counter.GetValue() - } - if pb.Untyped != nil { - return pb.Untyped.GetValue() - } - panic(fmt.Errorf("collected a non-gauge/counter/untyped metric: %s", pb)) -} - -// CollectAndCompare registers the provided Collector with a newly created -// pedantic Registry. It then does the same as GatherAndCompare, gathering the -// metrics from the pedantic Registry. -func CollectAndCompare(c prometheus.Collector, expected io.Reader, metricNames ...string) error { - reg := prometheus.NewPedanticRegistry() - if err := reg.Register(c); err != nil { - return fmt.Errorf("registering collector failed: %s", err) - } - return GatherAndCompare(reg, expected, metricNames...) -} - -// GatherAndCompare gathers all metrics from the provided Gatherer and compares -// it to an expected output read from the provided Reader in the Prometheus text -// exposition format. If any metricNames are provided, only metrics with those -// names are compared. -func GatherAndCompare(g prometheus.Gatherer, expected io.Reader, metricNames ...string) error { - metrics, err := g.Gather() - if err != nil { - return fmt.Errorf("gathering metrics failed: %s", err) - } - if metricNames != nil { - metrics = filterMetrics(metrics, metricNames) - } - var tp expfmt.TextParser - expectedMetrics, err := tp.TextToMetricFamilies(expected) - if err != nil { - return fmt.Errorf("parsing expected metrics failed: %s", err) - } - - if !reflect.DeepEqual(metrics, internal.NormalizeMetricFamilies(expectedMetrics)) { - // Encode the gathered output to the readable text format for comparison. - var buf1 bytes.Buffer - enc := expfmt.NewEncoder(&buf1, expfmt.FmtText) - for _, mf := range metrics { - if err := enc.Encode(mf); err != nil { - return fmt.Errorf("encoding result failed: %s", err) - } - } - // Encode normalized expected metrics again to generate them in the same ordering - // the registry does to spot differences more easily. - var buf2 bytes.Buffer - enc = expfmt.NewEncoder(&buf2, expfmt.FmtText) - for _, mf := range internal.NormalizeMetricFamilies(expectedMetrics) { - if err := enc.Encode(mf); err != nil { - return fmt.Errorf("encoding result failed: %s", err) - } - } - - return fmt.Errorf(` -metric output does not match expectation; want: - -%s - -got: - -%s -`, buf2.String(), buf1.String()) - } - return nil -} - -func filterMetrics(metrics []*dto.MetricFamily, names []string) []*dto.MetricFamily { - var filtered []*dto.MetricFamily - for _, m := range metrics { - for _, name := range names { - if m.GetName() == name { - filtered = append(filtered, m) - break - } - } - } - return filtered -} diff --git a/vendor/github.com/prometheus/client_model/go/LICENSE b/vendor/github.com/prometheus/client_model/LICENSE similarity index 100% rename from vendor/github.com/prometheus/client_model/go/LICENSE rename to vendor/github.com/prometheus/client_model/LICENSE diff --git a/vendor/github.com/prometheus/client_model/NOTICE b/vendor/github.com/prometheus/client_model/NOTICE new file mode 100644 index 000000000..20110e410 --- /dev/null +++ b/vendor/github.com/prometheus/client_model/NOTICE @@ -0,0 +1,5 @@ +Data model artifacts for Prometheus. +Copyright 2012-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/common/expfmt/LICENSE b/vendor/github.com/prometheus/common/LICENSE similarity index 100% rename from vendor/github.com/prometheus/common/expfmt/LICENSE rename to vendor/github.com/prometheus/common/LICENSE diff --git a/vendor/github.com/prometheus/common/NOTICE b/vendor/github.com/prometheus/common/NOTICE new file mode 100644 index 000000000..636a2c1a5 --- /dev/null +++ b/vendor/github.com/prometheus/common/NOTICE @@ -0,0 +1,5 @@ +Common libraries shared by Prometheus Go components. +Copyright 2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/LICENSE b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/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. diff --git a/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt new file mode 100644 index 000000000..7723656d5 --- /dev/null +++ b/vendor/github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg/README.txt @@ -0,0 +1,67 @@ +PACKAGE + +package goautoneg +import "bitbucket.org/ww/goautoneg" + +HTTP Content-Type Autonegotiation. + +The functions in this package implement the behaviour specified in +http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html + +Copyright (c) 2011, Open Knowledge Foundation Ltd. +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 the Open Knowledge Foundation Ltd. 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 +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +FUNCTIONS + +func Negotiate(header string, alternatives []string) (content_type string) +Negotiate the most appropriate content_type given the accept header +and a list of alternatives. + +func ParseAccept(header string) (accept []Accept) +Parse an Accept Header string returning a sorted list +of clauses + + +TYPES + +type Accept struct { + Type, SubType string + Q float32 + Params map[string]string +} +Structure to represent a clause in an HTTP Accept Header + + +SUBDIRECTORIES + + .hg diff --git a/vendor/github.com/prometheus/common/model/LICENSE b/vendor/github.com/prometheus/common/model/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/prometheus/common/model/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. diff --git a/vendor/github.com/prometheus/procfs/.travis.yml b/vendor/github.com/prometheus/procfs/.travis.yml new file mode 100644 index 000000000..0dc42122b --- /dev/null +++ b/vendor/github.com/prometheus/procfs/.travis.yml @@ -0,0 +1,9 @@ +sudo: false + +language: go + +go: +- 1.9.x +- 1.x + +go_import_path: github.com/prometheus/procfs diff --git a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md new file mode 100644 index 000000000..40503edbf --- /dev/null +++ b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Prometheus uses GitHub to manage reviews of pull requests. + +* If you have a trivial fix or improvement, go ahead and create a pull request, + addressing (with `@...`) the maintainer of this repository (see + [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. + +* If you plan to do something more involved, first discuss your ideas + on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). + This will avoid unnecessary work and surely give you and us a good deal + of inspiration. + +* Relevant coding style guidelines are the [Go Code Review + Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) + and the _Formatting and style_ section of Peter Bourgon's [Go: Best + Practices for Production + Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). diff --git a/vendor/github.com/prometheus/procfs/MAINTAINERS.md b/vendor/github.com/prometheus/procfs/MAINTAINERS.md new file mode 100644 index 000000000..35993c41c --- /dev/null +++ b/vendor/github.com/prometheus/procfs/MAINTAINERS.md @@ -0,0 +1 @@ +* Tobias Schmidt diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile new file mode 100644 index 000000000..dd48afdcd --- /dev/null +++ b/vendor/github.com/prometheus/procfs/Makefile @@ -0,0 +1,18 @@ +ci: fmt lint test + +fmt: + ! gofmt -l *.go | read nothing + go vet + +lint: + go get github.com/golang/lint/golint + golint *.go + +test: sysfs/fixtures/.unpacked + go test -v ./... + +sysfs/fixtures/.unpacked: sysfs/fixtures.ttar + ./ttar -C sysfs -x -f sysfs/fixtures.ttar + touch $@ + +.PHONY: fmt lint test ci diff --git a/vendor/github.com/prometheus/procfs/NOTICE b/vendor/github.com/prometheus/procfs/NOTICE new file mode 100644 index 000000000..53c5e9aa1 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/NOTICE @@ -0,0 +1,7 @@ +procfs provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +Copyright 2014-2015 The Prometheus Authors + +This product includes software developed at +SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/procfs/README.md b/vendor/github.com/prometheus/procfs/README.md new file mode 100644 index 000000000..209549471 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/README.md @@ -0,0 +1,11 @@ +# procfs + +This procfs package provides functions to retrieve system, kernel and process +metrics from the pseudo-filesystem proc. + +*WARNING*: This package is a work in progress. Its API may still break in +backwards-incompatible ways without warnings. Use it at your own risk. + +[![GoDoc](https://godoc.org/github.com/prometheus/procfs?status.png)](https://godoc.org/github.com/prometheus/procfs) +[![Build Status](https://travis-ci.org/prometheus/procfs.svg?branch=master)](https://travis-ci.org/prometheus/procfs) +[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/procfs)](https://goreportcard.com/report/github.com/prometheus/procfs) diff --git a/vendor/github.com/prometheus/procfs/bcache/bcache.go b/vendor/github.com/prometheus/procfs/bcache/bcache.go deleted file mode 100644 index 1db178cec..000000000 --- a/vendor/github.com/prometheus/procfs/bcache/bcache.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package bcache provides access to statistics exposed by the bcache (Linux -// block cache). -package bcache - -// Stats contains bcache runtime statistics, parsed from /sys/fs/bcache/. -// -// The names and meanings of each statistic were taken from bcache.txt and -// files in drivers/md/bcache in the Linux kernel source. Counters are uint64 -// (in-kernel counters are mostly unsigned long). -type Stats struct { - // The name of the bcache used to source these statistics. - Name string - Bcache BcacheStats - Bdevs []BdevStats - Caches []CacheStats -} - -// BcacheStats contains statistics tied to a bcache ID. -type BcacheStats struct { - AverageKeySize uint64 - BtreeCacheSize uint64 - CacheAvailablePercent uint64 - Congested uint64 - RootUsagePercent uint64 - TreeDepth uint64 - Internal InternalStats - FiveMin PeriodStats - Total PeriodStats -} - -// BdevStats contains statistics for one backing device. -type BdevStats struct { - Name string - DirtyData uint64 - FiveMin PeriodStats - Total PeriodStats -} - -// CacheStats contains statistics for one cache device. -type CacheStats struct { - Name string - IOErrors uint64 - MetadataWritten uint64 - Written uint64 - Priority PriorityStats -} - -// PriorityStats contains statistics from the priority_stats file. -type PriorityStats struct { - UnusedPercent uint64 - MetadataPercent uint64 -} - -// InternalStats contains internal bcache statistics. -type InternalStats struct { - ActiveJournalEntries uint64 - BtreeNodes uint64 - BtreeReadAverageDurationNanoSeconds uint64 - CacheReadRaces uint64 -} - -// PeriodStats contains statistics for a time period (5 min or total). -type PeriodStats struct { - Bypassed uint64 - CacheBypassHits uint64 - CacheBypassMisses uint64 - CacheHits uint64 - CacheMissCollisions uint64 - CacheMisses uint64 - CacheReadaheads uint64 -} diff --git a/vendor/github.com/prometheus/procfs/bcache/get.go b/vendor/github.com/prometheus/procfs/bcache/get.go deleted file mode 100644 index b6d97de15..000000000 --- a/vendor/github.com/prometheus/procfs/bcache/get.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package bcache - -import ( - "bufio" - "fmt" - "io/ioutil" - "os" - "path" - "path/filepath" - "strconv" - "strings" -) - -// ParsePseudoFloat parses the peculiar format produced by bcache's bch_hprint. -func parsePseudoFloat(str string) (float64, error) { - ss := strings.Split(str, ".") - - intPart, err := strconv.ParseFloat(ss[0], 64) - if err != nil { - return 0, err - } - - if len(ss) == 1 { - // Pure integers are fine. - return intPart, nil - } - fracPart, err := strconv.ParseFloat(ss[1], 64) - if err != nil { - return 0, err - } - // fracPart is a number between 0 and 1023 divided by 100; it is off - // by a small amount. Unexpected bumps in time lines may occur because - // for bch_hprint .1 != .10 and .10 > .9 (at least up to Linux - // v4.12-rc3). - - // Restore the proper order: - fracPart = fracPart / 10.24 - return intPart + fracPart, nil -} - -// Dehumanize converts a human-readable byte slice into a uint64. -func dehumanize(hbytes []byte) (uint64, error) { - ll := len(hbytes) - if ll == 0 { - return 0, fmt.Errorf("zero-length reply") - } - lastByte := hbytes[ll-1] - mul := float64(1) - var ( - mant float64 - err error - ) - // If lastByte is beyond the range of ASCII digits, it must be a - // multiplier. - if lastByte > 57 { - // Remove multiplier from slice. - hbytes = hbytes[:len(hbytes)-1] - - const ( - _ = 1 << (10 * iota) - KiB - MiB - GiB - TiB - PiB - EiB - ZiB - YiB - ) - - multipliers := map[rune]float64{ - // Source for conversion rules: - // linux-kernel/drivers/md/bcache/util.c:bch_hprint() - 'k': KiB, - 'M': MiB, - 'G': GiB, - 'T': TiB, - 'P': PiB, - 'E': EiB, - 'Z': ZiB, - 'Y': YiB, - } - mul = multipliers[rune(lastByte)] - mant, err = parsePseudoFloat(string(hbytes)) - if err != nil { - return 0, err - } - } else { - // Not humanized by bch_hprint - mant, err = strconv.ParseFloat(string(hbytes), 64) - if err != nil { - return 0, err - } - } - res := uint64(mant * mul) - return res, nil -} - -type parser struct { - uuidPath string - subDir string - currentDir string - err error -} - -func (p *parser) setSubDir(pathElements ...string) { - p.subDir = path.Join(pathElements...) - p.currentDir = path.Join(p.uuidPath, p.subDir) -} - -func (p *parser) readValue(fileName string) uint64 { - if p.err != nil { - return 0 - } - path := path.Join(p.currentDir, fileName) - byt, err := ioutil.ReadFile(path) - if err != nil { - p.err = fmt.Errorf("failed to read: %s", path) - return 0 - } - // Remove trailing newline. - byt = byt[:len(byt)-1] - res, err := dehumanize(byt) - p.err = err - return res -} - -// ParsePriorityStats parses lines from the priority_stats file. -func parsePriorityStats(line string, ps *PriorityStats) error { - var ( - value uint64 - err error - ) - switch { - case strings.HasPrefix(line, "Unused:"): - fields := strings.Fields(line) - rawValue := fields[len(fields)-1] - valueStr := strings.TrimSuffix(rawValue, "%") - value, err = strconv.ParseUint(valueStr, 10, 64) - if err != nil { - return err - } - ps.UnusedPercent = value - case strings.HasPrefix(line, "Metadata:"): - fields := strings.Fields(line) - rawValue := fields[len(fields)-1] - valueStr := strings.TrimSuffix(rawValue, "%") - value, err = strconv.ParseUint(valueStr, 10, 64) - if err != nil { - return err - } - ps.MetadataPercent = value - } - return nil -} - -func (p *parser) getPriorityStats() PriorityStats { - var res PriorityStats - - if p.err != nil { - return res - } - - path := path.Join(p.currentDir, "priority_stats") - - file, err := os.Open(path) - if err != nil { - p.err = fmt.Errorf("failed to read: %s", path) - return res - } - defer file.Close() - - scanner := bufio.NewScanner(file) - for scanner.Scan() { - err = parsePriorityStats(scanner.Text(), &res) - if err != nil { - p.err = fmt.Errorf("failed to parse: %s (%s)", path, err) - return res - } - } - if err := scanner.Err(); err != nil { - p.err = fmt.Errorf("failed to parse: %s (%s)", path, err) - return res - } - return res -} - -// GetStats collects from sysfs files data tied to one bcache ID. -func GetStats(uuidPath string) (*Stats, error) { - var bs Stats - - par := parser{uuidPath: uuidPath} - - // bcache stats - - // dir - par.setSubDir("") - bs.Bcache.AverageKeySize = par.readValue("average_key_size") - bs.Bcache.BtreeCacheSize = par.readValue("btree_cache_size") - bs.Bcache.CacheAvailablePercent = par.readValue("cache_available_percent") - bs.Bcache.Congested = par.readValue("congested") - bs.Bcache.RootUsagePercent = par.readValue("root_usage_percent") - bs.Bcache.TreeDepth = par.readValue("tree_depth") - - // bcache stats (internal) - - // dir /internal - par.setSubDir("internal") - bs.Bcache.Internal.ActiveJournalEntries = par.readValue("active_journal_entries") - bs.Bcache.Internal.BtreeNodes = par.readValue("btree_nodes") - bs.Bcache.Internal.BtreeReadAverageDurationNanoSeconds = par.readValue("btree_read_average_duration_us") - bs.Bcache.Internal.CacheReadRaces = par.readValue("cache_read_races") - - // bcache stats (period) - - // dir /stats_five_minute - par.setSubDir("stats_five_minute") - bs.Bcache.FiveMin.Bypassed = par.readValue("bypassed") - bs.Bcache.FiveMin.CacheHits = par.readValue("cache_hits") - - bs.Bcache.FiveMin.Bypassed = par.readValue("bypassed") - bs.Bcache.FiveMin.CacheBypassHits = par.readValue("cache_bypass_hits") - bs.Bcache.FiveMin.CacheBypassMisses = par.readValue("cache_bypass_misses") - bs.Bcache.FiveMin.CacheHits = par.readValue("cache_hits") - bs.Bcache.FiveMin.CacheMissCollisions = par.readValue("cache_miss_collisions") - bs.Bcache.FiveMin.CacheMisses = par.readValue("cache_misses") - bs.Bcache.FiveMin.CacheReadaheads = par.readValue("cache_readaheads") - - // dir /stats_total - par.setSubDir("stats_total") - bs.Bcache.Total.Bypassed = par.readValue("bypassed") - bs.Bcache.Total.CacheHits = par.readValue("cache_hits") - - bs.Bcache.Total.Bypassed = par.readValue("bypassed") - bs.Bcache.Total.CacheBypassHits = par.readValue("cache_bypass_hits") - bs.Bcache.Total.CacheBypassMisses = par.readValue("cache_bypass_misses") - bs.Bcache.Total.CacheHits = par.readValue("cache_hits") - bs.Bcache.Total.CacheMissCollisions = par.readValue("cache_miss_collisions") - bs.Bcache.Total.CacheMisses = par.readValue("cache_misses") - bs.Bcache.Total.CacheReadaheads = par.readValue("cache_readaheads") - - if par.err != nil { - return nil, par.err - } - - // bdev stats - - reg := path.Join(uuidPath, "bdev[0-9]*") - bdevDirs, err := filepath.Glob(reg) - if err != nil { - return nil, err - } - - bs.Bdevs = make([]BdevStats, len(bdevDirs)) - - for ii, bdevDir := range bdevDirs { - var bds = &bs.Bdevs[ii] - - bds.Name = filepath.Base(bdevDir) - - par.setSubDir(bds.Name) - bds.DirtyData = par.readValue("dirty_data") - - // dir //stats_five_minute - par.setSubDir(bds.Name, "stats_five_minute") - bds.FiveMin.Bypassed = par.readValue("bypassed") - bds.FiveMin.CacheBypassHits = par.readValue("cache_bypass_hits") - bds.FiveMin.CacheBypassMisses = par.readValue("cache_bypass_misses") - bds.FiveMin.CacheHits = par.readValue("cache_hits") - bds.FiveMin.CacheMissCollisions = par.readValue("cache_miss_collisions") - bds.FiveMin.CacheMisses = par.readValue("cache_misses") - bds.FiveMin.CacheReadaheads = par.readValue("cache_readaheads") - - // dir //stats_total - par.setSubDir("stats_total") - bds.Total.Bypassed = par.readValue("bypassed") - bds.Total.CacheBypassHits = par.readValue("cache_bypass_hits") - bds.Total.CacheBypassMisses = par.readValue("cache_bypass_misses") - bds.Total.CacheHits = par.readValue("cache_hits") - bds.Total.CacheMissCollisions = par.readValue("cache_miss_collisions") - bds.Total.CacheMisses = par.readValue("cache_misses") - bds.Total.CacheReadaheads = par.readValue("cache_readaheads") - } - - if par.err != nil { - return nil, par.err - } - - // cache stats - - reg = path.Join(uuidPath, "cache[0-9]*") - cacheDirs, err := filepath.Glob(reg) - if err != nil { - return nil, err - } - bs.Caches = make([]CacheStats, len(cacheDirs)) - - for ii, cacheDir := range cacheDirs { - var cs = &bs.Caches[ii] - cs.Name = filepath.Base(cacheDir) - - // dir is / - par.setSubDir(cs.Name) - cs.IOErrors = par.readValue("io_errors") - cs.MetadataWritten = par.readValue("metadata_written") - cs.Written = par.readValue("written") - - ps := par.getPriorityStats() - cs.Priority = ps - } - - if par.err != nil { - return nil, par.err - } - - return &bs, nil -} diff --git a/vendor/github.com/prometheus/procfs/sysfs/doc.go b/vendor/github.com/prometheus/procfs/sysfs/doc.go deleted file mode 100644 index 9a6c244e9..000000000 --- a/vendor/github.com/prometheus/procfs/sysfs/doc.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Package sysfs provides functions to retrieve system and kernel metrics -// from the pseudo-filesystem sys. -package sysfs diff --git a/vendor/github.com/prometheus/procfs/sysfs/fs.go b/vendor/github.com/prometheus/procfs/sysfs/fs.go deleted file mode 100644 index fb15d438a..000000000 --- a/vendor/github.com/prometheus/procfs/sysfs/fs.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2017 The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package sysfs - -import ( - "fmt" - "os" - "path/filepath" - - "github.com/prometheus/procfs/bcache" - "github.com/prometheus/procfs/xfs" -) - -// FS represents the pseudo-filesystem sys, which provides an interface to -// kernel data structures. -type FS string - -// DefaultMountPoint is the common mount point of the sys filesystem. -const DefaultMountPoint = "/sys" - -// NewFS returns a new FS mounted under the given mountPoint. It will error -// if the mount point can't be read. -func NewFS(mountPoint string) (FS, error) { - info, err := os.Stat(mountPoint) - if err != nil { - return "", fmt.Errorf("could not read %s: %s", mountPoint, err) - } - if !info.IsDir() { - return "", fmt.Errorf("mount point %s is not a directory", mountPoint) - } - - return FS(mountPoint), nil -} - -// Path returns the path of the given subsystem relative to the sys root. -func (fs FS) Path(p ...string) string { - return filepath.Join(append([]string{string(fs)}, p...)...) -} - -// XFSStats retrieves XFS filesystem runtime statistics for each mounted XFS -// filesystem. Only available on kernel 4.4+. On older kernels, an empty -// slice of *xfs.Stats will be returned. -func (fs FS) XFSStats() ([]*xfs.Stats, error) { - matches, err := filepath.Glob(fs.Path("fs/xfs/*/stats/stats")) - if err != nil { - return nil, err - } - - stats := make([]*xfs.Stats, 0, len(matches)) - for _, m := range matches { - f, err := os.Open(m) - if err != nil { - return nil, err - } - - // "*" used in glob above indicates the name of the filesystem. - name := filepath.Base(filepath.Dir(filepath.Dir(m))) - - // File must be closed after parsing, regardless of success or - // failure. Defer is not used because of the loop. - s, err := xfs.ParseStats(f) - _ = f.Close() - if err != nil { - return nil, err - } - - s.Name = name - stats = append(stats, s) - } - - return stats, nil -} - -// BcacheStats retrieves bcache runtime statistics for each bcache. -func (fs FS) BcacheStats() ([]*bcache.Stats, error) { - matches, err := filepath.Glob(fs.Path("fs/bcache/*-*")) - if err != nil { - return nil, err - } - - stats := make([]*bcache.Stats, 0, len(matches)) - for _, uuidPath := range matches { - // "*-*" in glob above indicates the name of the bcache. - name := filepath.Base(uuidPath) - - // stats - s, err := bcache.GetStats(uuidPath) - if err != nil { - return nil, err - } - - s.Name = name - stats = append(stats, s) - } - - return stats, nil -} diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar new file mode 100644 index 000000000..8227a4a37 --- /dev/null +++ b/vendor/github.com/prometheus/procfs/ttar @@ -0,0 +1,264 @@ +#!/usr/bin/env bash +# Purpose: plain text tar format +# Limitations: - only suitable for text files, directories, and symlinks +# - stores only filename, content, and mode +# - not designed for untrusted input + +# Note: must work with bash version 3.2 (macOS) + +set -o errexit -o nounset + +# Sanitize environment (for instance, standard sorting of glob matches) +export LC_ALL=C + +path="" +CMD="" + +function usage { + bname=$(basename "$0") + cat << USAGE +Usage: $bname [-C ] -c -f (create archive) + $bname -t -f (list archive contents) + $bname [-C ] -x -f (extract archive) + +Options: + -C (change directory) + +Example: Change to sysfs directory, create ttar file from fixtures directory + $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/ +USAGE +exit "$1" +} + +function vecho { + if [ "${VERBOSE:-}" == "yes" ]; then + echo >&7 "$@" + fi +} + +function set_cmd { + if [ -n "$CMD" ]; then + echo "ERROR: more than one command given" + echo + usage 2 + fi + CMD=$1 +} + +while getopts :cf:htxvC: opt; do + case $opt in + c) + set_cmd "create" + ;; + f) + ARCHIVE=$OPTARG + ;; + h) + usage 0 + ;; + t) + set_cmd "list" + ;; + x) + set_cmd "extract" + ;; + v) + VERBOSE=yes + exec 7>&1 + ;; + C) + CDIR=$OPTARG + ;; + *) + echo >&2 "ERROR: invalid option -$OPTARG" + echo + usage 1 + ;; + esac +done + +# Remove processed options from arguments +shift $(( OPTIND - 1 )); + +if [ "${CMD:-}" == "" ]; then + echo >&2 "ERROR: no command given" + echo + usage 1 +elif [ "${ARCHIVE:-}" == "" ]; then + echo >&2 "ERROR: no archive name given" + echo + usage 1 +fi + +function list { + local path="" + local size=0 + local line_no=0 + local ttar_file=$1 + if [ -n "${2:-}" ]; then + echo >&2 "ERROR: too many arguments." + echo + usage 1 + fi + if [ ! -e "$ttar_file" ]; then + echo >&2 "ERROR: file not found ($ttar_file)" + echo + usage 1 + fi + while read -r line; do + line_no=$(( line_no + 1 )) + if [ $size -gt 0 ]; then + size=$(( size - 1 )) + continue + fi + if [[ $line =~ ^Path:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + elif [[ $line =~ ^Lines:\ (.*)$ ]]; then + size=${BASH_REMATCH[1]} + echo "$path" + elif [[ $line =~ ^Directory:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + echo "$path/" + elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then + echo "$path -> ${BASH_REMATCH[1]}" + fi + done < "$ttar_file" +} + +function extract { + local path="" + local size=0 + local line_no=0 + local ttar_file=$1 + if [ -n "${2:-}" ]; then + echo >&2 "ERROR: too many arguments." + echo + usage 1 + fi + if [ ! -e "$ttar_file" ]; then + echo >&2 "ERROR: file not found ($ttar_file)" + echo + usage 1 + fi + while IFS= read -r line; do + line_no=$(( line_no + 1 )) + if [ "$size" -gt 0 ]; then + echo "$line" >> "$path" + size=$(( size - 1 )) + continue + fi + if [[ $line =~ ^Path:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + if [ -e "$path" ] || [ -L "$path" ]; then + rm "$path" + fi + elif [[ $line =~ ^Lines:\ (.*)$ ]]; then + size=${BASH_REMATCH[1]} + # Create file even if it is zero-length. + touch "$path" + vecho " $path" + elif [[ $line =~ ^Mode:\ (.*)$ ]]; then + mode=${BASH_REMATCH[1]} + chmod "$mode" "$path" + vecho "$mode" + elif [[ $line =~ ^Directory:\ (.*)$ ]]; then + path=${BASH_REMATCH[1]} + mkdir -p "$path" + vecho " $path/" + elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then + ln -s "${BASH_REMATCH[1]}" "$path" + vecho " $path -> ${BASH_REMATCH[1]}" + elif [[ $line =~ ^# ]]; then + # Ignore comments between files + continue + else + echo >&2 "ERROR: Unknown keyword on line $line_no: $line" + exit 1 + fi + done < "$ttar_file" +} + +function div { + echo "# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" \ + "- - - - - -" +} + +function get_mode { + local mfile=$1 + if [ -z "${STAT_OPTION:-}" ]; then + if stat -c '%a' "$mfile" >/dev/null 2>&1; then + STAT_OPTION='-c' + STAT_FORMAT='%a' + else + STAT_OPTION='-f' + STAT_FORMAT='%A' + fi + fi + stat "${STAT_OPTION}" "${STAT_FORMAT}" "$mfile" +} + +function _create { + shopt -s nullglob + local mode + while (( "$#" )); do + file=$1 + if [ -L "$file" ]; then + echo "Path: $file" + symlinkTo=$(readlink "$file") + echo "SymlinkTo: $symlinkTo" + vecho " $file -> $symlinkTo" + div + elif [ -d "$file" ]; then + # Strip trailing slash (if there is one) + file=${file%/} + echo "Directory: $file" + mode=$(get_mode "$file") + echo "Mode: $mode" + vecho "$mode $file/" + div + # Find all files and dirs, including hidden/dot files + for x in "$file/"{*,.[^.]*}; do + _create "$x" + done + elif [ -f "$file" ]; then + echo "Path: $file" + lines=$(wc -l "$file"|awk '{print $1}') + echo "Lines: $lines" + cat "$file" + mode=$(get_mode "$file") + echo "Mode: $mode" + vecho "$mode $file" + div + else + echo >&2 "ERROR: file not found ($file in $(pwd))" + exit 2 + fi + shift + done +} + +function create { + ttar_file=$1 + shift + if [ -z "${1:-}" ]; then + echo >&2 "ERROR: missing arguments." + echo + usage 1 + fi + if [ -e "$ttar_file" ]; then + rm "$ttar_file" + fi + exec > "$ttar_file" + _create "$@" +} + +if [ -n "${CDIR:-}" ]; then + if [[ "$ARCHIVE" != /* ]]; then + # Relative path: preserve the archive's location before changing + # directory + ARCHIVE="$(pwd)/$ARCHIVE" + fi + cd "$CDIR" +fi + +"$CMD" "$ARCHIVE" "$@" diff --git a/vendor/github.com/rcrowley/go-metrics/.gitignore b/vendor/github.com/rcrowley/go-metrics/.gitignore new file mode 100644 index 000000000..83c8f8237 --- /dev/null +++ b/vendor/github.com/rcrowley/go-metrics/.gitignore @@ -0,0 +1,9 @@ +*.[68] +*.a +*.out +*.swp +_obj +_testmain.go +cmd/metrics-bench/metrics-bench +cmd/metrics-example/metrics-example +cmd/never-read/never-read diff --git a/vendor/github.com/rcrowley/go-metrics/.travis.yml b/vendor/github.com/rcrowley/go-metrics/.travis.yml new file mode 100644 index 000000000..f8b3b2ed2 --- /dev/null +++ b/vendor/github.com/rcrowley/go-metrics/.travis.yml @@ -0,0 +1,18 @@ +language: go + +go: + - 1.2 + - 1.3 + - 1.4 + - 1.5 + - 1.6 + - 1.7 + - 1.8 + - 1.9 + +script: + - ./validate.sh + +# this should give us faster builds according to +# http://docs.travis-ci.com/user/migrating-from-legacy/ +sudo: false diff --git a/vendor/github.com/rcrowley/go-metrics/README.md b/vendor/github.com/rcrowley/go-metrics/README.md new file mode 100644 index 000000000..bc2a45a83 --- /dev/null +++ b/vendor/github.com/rcrowley/go-metrics/README.md @@ -0,0 +1,166 @@ +go-metrics +========== + +![travis build status](https://travis-ci.org/rcrowley/go-metrics.svg?branch=master) + +Go port of Coda Hale's Metrics library: . + +Documentation: . + +Usage +----- + +Create and update metrics: + +```go +c := metrics.NewCounter() +metrics.Register("foo", c) +c.Inc(47) + +g := metrics.NewGauge() +metrics.Register("bar", g) +g.Update(47) + +r := NewRegistry() +g := metrics.NewRegisteredFunctionalGauge("cache-evictions", r, func() int64 { return cache.getEvictionsCount() }) + +s := metrics.NewExpDecaySample(1028, 0.015) // or metrics.NewUniformSample(1028) +h := metrics.NewHistogram(s) +metrics.Register("baz", h) +h.Update(47) + +m := metrics.NewMeter() +metrics.Register("quux", m) +m.Mark(47) + +t := metrics.NewTimer() +metrics.Register("bang", t) +t.Time(func() {}) +t.Update(47) +``` + +Register() is not threadsafe. For threadsafe metric registration use +GetOrRegister: + +```go +t := metrics.GetOrRegisterTimer("account.create.latency", nil) +t.Time(func() {}) +t.Update(47) +``` + +**NOTE:** Be sure to unregister short-lived meters and timers otherwise they will +leak memory: + +```go +// Will call Stop() on the Meter to allow for garbage collection +metrics.Unregister("quux") +// Or similarly for a Timer that embeds a Meter +metrics.Unregister("bang") +``` + +Periodically log every metric in human-readable form to standard error: + +```go +go metrics.Log(metrics.DefaultRegistry, 5 * time.Second, log.New(os.Stderr, "metrics: ", log.Lmicroseconds)) +``` + +Periodically log every metric in slightly-more-parseable form to syslog: + +```go +w, _ := syslog.Dial("unixgram", "/dev/log", syslog.LOG_INFO, "metrics") +go metrics.Syslog(metrics.DefaultRegistry, 60e9, w) +``` + +Periodically emit every metric to Graphite using the [Graphite client](https://github.com/cyberdelia/go-metrics-graphite): + +```go + +import "github.com/cyberdelia/go-metrics-graphite" + +addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003") +go graphite.Graphite(metrics.DefaultRegistry, 10e9, "metrics", addr) +``` + +Periodically emit every metric into InfluxDB: + +**NOTE:** this has been pulled out of the library due to constant fluctuations +in the InfluxDB API. In fact, all client libraries are on their way out. see +issues [#121](https://github.com/rcrowley/go-metrics/issues/121) and +[#124](https://github.com/rcrowley/go-metrics/issues/124) for progress and details. + +```go +import "github.com/vrischmann/go-metrics-influxdb" + +go influxdb.InfluxDB(metrics.DefaultRegistry, + 10e9, + "127.0.0.1:8086", + "database-name", + "username", + "password" +) +``` + +Periodically upload every metric to Librato using the [Librato client](https://github.com/mihasya/go-metrics-librato): + +**Note**: the client included with this repository under the `librato` package +has been deprecated and moved to the repository linked above. + +```go +import "github.com/mihasya/go-metrics-librato" + +go librato.Librato(metrics.DefaultRegistry, + 10e9, // interval + "example@example.com", // account owner email address + "token", // Librato API token + "hostname", // source + []float64{0.95}, // percentiles to send + time.Millisecond, // time unit +) +``` + +Periodically emit every metric to StatHat: + +```go +import "github.com/rcrowley/go-metrics/stathat" + +go stathat.Stathat(metrics.DefaultRegistry, 10e9, "example@example.com") +``` + +Maintain all metrics along with expvars at `/debug/metrics`: + +This uses the same mechanism as [the official expvar](http://golang.org/pkg/expvar/) +but exposed under `/debug/metrics`, which shows a json representation of all your usual expvars +as well as all your go-metrics. + + +```go +import "github.com/rcrowley/go-metrics/exp" + +exp.Exp(metrics.DefaultRegistry) +``` + +Installation +------------ + +```sh +go get github.com/rcrowley/go-metrics +``` + +StatHat support additionally requires their Go client: + +```sh +go get github.com/stathat/go +``` + +Publishing Metrics +------------------ + +Clients are available for the following destinations: + +* Librato - https://github.com/mihasya/go-metrics-librato +* Graphite - https://github.com/cyberdelia/go-metrics-graphite +* InfluxDB - https://github.com/vrischmann/go-metrics-influxdb +* Ganglia - https://github.com/appscode/metlia +* Prometheus - https://github.com/deathowl/go-metrics-prometheus +* DataDog - https://github.com/syntaqx/go-metrics-datadog +* SignalFX - https://github.com/pascallouisperez/go-metrics-signalfx diff --git a/vendor/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go b/vendor/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go deleted file mode 100644 index dddaf4b12..000000000 --- a/vendor/github.com/rcrowley/go-metrics/cmd/metrics-bench/metrics-bench.go +++ /dev/null @@ -1,20 +0,0 @@ -package main - -import ( - "fmt" - "github.com/rcrowley/go-metrics" - "time" -) - -func main() { - r := metrics.NewRegistry() - for i := 0; i < 10000; i++ { - r.Register(fmt.Sprintf("counter-%d", i), metrics.NewCounter()) - r.Register(fmt.Sprintf("gauge-%d", i), metrics.NewGauge()) - r.Register(fmt.Sprintf("gaugefloat64-%d", i), metrics.NewGaugeFloat64()) - r.Register(fmt.Sprintf("histogram-uniform-%d", i), metrics.NewHistogram(metrics.NewUniformSample(1028))) - r.Register(fmt.Sprintf("histogram-exp-%d", i), metrics.NewHistogram(metrics.NewExpDecaySample(1028, 0.015))) - r.Register(fmt.Sprintf("meter-%d", i), metrics.NewMeter()) - } - time.Sleep(600e9) -} diff --git a/vendor/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go b/vendor/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go deleted file mode 100644 index 66f42c046..000000000 --- a/vendor/github.com/rcrowley/go-metrics/cmd/metrics-example/metrics-example.go +++ /dev/null @@ -1,154 +0,0 @@ -package main - -import ( - "errors" - "github.com/rcrowley/go-metrics" - // "github.com/rcrowley/go-metrics/stathat" - "log" - "math/rand" - "os" - // "syslog" - "time" -) - -const fanout = 10 - -func main() { - - r := metrics.NewRegistry() - - c := metrics.NewCounter() - r.Register("foo", c) - for i := 0; i < fanout; i++ { - go func() { - for { - c.Dec(19) - time.Sleep(300e6) - } - }() - go func() { - for { - c.Inc(47) - time.Sleep(400e6) - } - }() - } - - g := metrics.NewGauge() - r.Register("bar", g) - for i := 0; i < fanout; i++ { - go func() { - for { - g.Update(19) - time.Sleep(300e6) - } - }() - go func() { - for { - g.Update(47) - time.Sleep(400e6) - } - }() - } - - gf := metrics.NewGaugeFloat64() - r.Register("barfloat64", gf) - for i := 0; i < fanout; i++ { - go func() { - for { - g.Update(19.0) - time.Sleep(300e6) - } - }() - go func() { - for { - g.Update(47.0) - time.Sleep(400e6) - } - }() - } - - hc := metrics.NewHealthcheck(func(h metrics.Healthcheck) { - if 0 < rand.Intn(2) { - h.Healthy() - } else { - h.Unhealthy(errors.New("baz")) - } - }) - r.Register("baz", hc) - - s := metrics.NewExpDecaySample(1028, 0.015) - //s := metrics.NewUniformSample(1028) - h := metrics.NewHistogram(s) - r.Register("bang", h) - for i := 0; i < fanout; i++ { - go func() { - for { - h.Update(19) - time.Sleep(300e6) - } - }() - go func() { - for { - h.Update(47) - time.Sleep(400e6) - } - }() - } - - m := metrics.NewMeter() - r.Register("quux", m) - for i := 0; i < fanout; i++ { - go func() { - for { - m.Mark(19) - time.Sleep(300e6) - } - }() - go func() { - for { - m.Mark(47) - time.Sleep(400e6) - } - }() - } - - t := metrics.NewTimer() - r.Register("hooah", t) - for i := 0; i < fanout; i++ { - go func() { - for { - t.Time(func() { time.Sleep(300e6) }) - } - }() - go func() { - for { - t.Time(func() { time.Sleep(400e6) }) - } - }() - } - - metrics.RegisterDebugGCStats(r) - go metrics.CaptureDebugGCStats(r, 5e9) - - metrics.RegisterRuntimeMemStats(r) - go metrics.CaptureRuntimeMemStats(r, 5e9) - - metrics.Log(r, 60e9, log.New(os.Stderr, "metrics: ", log.Lmicroseconds)) - - /* - w, err := syslog.Dial("unixgram", "/dev/log", syslog.LOG_INFO, "metrics") - if nil != err { log.Fatalln(err) } - metrics.Syslog(r, 60e9, w) - */ - - /* - addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003") - metrics.Graphite(r, 10e9, "metrics", addr) - */ - - /* - stathat.Stathat(r, 10e9, "example@example.com") - */ - -} diff --git a/vendor/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go b/vendor/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go deleted file mode 100644 index dc175b778..000000000 --- a/vendor/github.com/rcrowley/go-metrics/cmd/never-read/never-read.go +++ /dev/null @@ -1,22 +0,0 @@ -package main - -import ( - "log" - "net" -) - -func main() { - addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003") - l, err := net.ListenTCP("tcp", addr) - if nil != err { - log.Fatalln(err) - } - log.Println("listening", l.Addr()) - for { - c, err := l.AcceptTCP() - if nil != err { - log.Fatalln(err) - } - log.Println("accepted", c.RemoteAddr()) - } -} diff --git a/vendor/github.com/rcrowley/go-metrics/exp/exp.go b/vendor/github.com/rcrowley/go-metrics/exp/exp.go deleted file mode 100644 index 11dd3f898..000000000 --- a/vendor/github.com/rcrowley/go-metrics/exp/exp.go +++ /dev/null @@ -1,156 +0,0 @@ -// Hook go-metrics into expvar -// on any /debug/metrics request, load all vars from the registry into expvar, and execute regular expvar handler -package exp - -import ( - "expvar" - "fmt" - "net/http" - "sync" - - "github.com/rcrowley/go-metrics" -) - -type exp struct { - expvarLock sync.Mutex // expvar panics if you try to register the same var twice, so we must probe it safely - registry metrics.Registry -} - -func (exp *exp) expHandler(w http.ResponseWriter, r *http.Request) { - // load our variables into expvar - exp.syncToExpvar() - - // now just run the official expvar handler code (which is not publicly callable, so pasted inline) - w.Header().Set("Content-Type", "application/json; charset=utf-8") - fmt.Fprintf(w, "{\n") - first := true - expvar.Do(func(kv expvar.KeyValue) { - if !first { - fmt.Fprintf(w, ",\n") - } - first = false - fmt.Fprintf(w, "%q: %s", kv.Key, kv.Value) - }) - fmt.Fprintf(w, "\n}\n") -} - -// Exp will register an expvar powered metrics handler with http.DefaultServeMux on "/debug/vars" -func Exp(r metrics.Registry) { - h := ExpHandler(r) - // this would cause a panic: - // panic: http: multiple registrations for /debug/vars - // http.HandleFunc("/debug/vars", e.expHandler) - // haven't found an elegant way, so just use a different endpoint - http.Handle("/debug/metrics", h) -} - -// ExpHandler will return an expvar powered metrics handler. -func ExpHandler(r metrics.Registry) http.Handler { - e := exp{sync.Mutex{}, r} - return http.HandlerFunc(e.expHandler) -} - -func (exp *exp) getInt(name string) *expvar.Int { - var v *expvar.Int - exp.expvarLock.Lock() - p := expvar.Get(name) - if p != nil { - v = p.(*expvar.Int) - } else { - v = new(expvar.Int) - expvar.Publish(name, v) - } - exp.expvarLock.Unlock() - return v -} - -func (exp *exp) getFloat(name string) *expvar.Float { - var v *expvar.Float - exp.expvarLock.Lock() - p := expvar.Get(name) - if p != nil { - v = p.(*expvar.Float) - } else { - v = new(expvar.Float) - expvar.Publish(name, v) - } - exp.expvarLock.Unlock() - return v -} - -func (exp *exp) publishCounter(name string, metric metrics.Counter) { - v := exp.getInt(name) - v.Set(metric.Count()) -} - -func (exp *exp) publishGauge(name string, metric metrics.Gauge) { - v := exp.getInt(name) - v.Set(metric.Value()) -} -func (exp *exp) publishGaugeFloat64(name string, metric metrics.GaugeFloat64) { - exp.getFloat(name).Set(metric.Value()) -} - -func (exp *exp) publishHistogram(name string, metric metrics.Histogram) { - h := metric.Snapshot() - ps := h.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999}) - exp.getInt(name + ".count").Set(h.Count()) - exp.getFloat(name + ".min").Set(float64(h.Min())) - exp.getFloat(name + ".max").Set(float64(h.Max())) - exp.getFloat(name + ".mean").Set(float64(h.Mean())) - exp.getFloat(name + ".std-dev").Set(float64(h.StdDev())) - exp.getFloat(name + ".50-percentile").Set(float64(ps[0])) - exp.getFloat(name + ".75-percentile").Set(float64(ps[1])) - exp.getFloat(name + ".95-percentile").Set(float64(ps[2])) - exp.getFloat(name + ".99-percentile").Set(float64(ps[3])) - exp.getFloat(name + ".999-percentile").Set(float64(ps[4])) -} - -func (exp *exp) publishMeter(name string, metric metrics.Meter) { - m := metric.Snapshot() - exp.getInt(name + ".count").Set(m.Count()) - exp.getFloat(name + ".one-minute").Set(float64(m.Rate1())) - exp.getFloat(name + ".five-minute").Set(float64(m.Rate5())) - exp.getFloat(name + ".fifteen-minute").Set(float64((m.Rate15()))) - exp.getFloat(name + ".mean").Set(float64(m.RateMean())) -} - -func (exp *exp) publishTimer(name string, metric metrics.Timer) { - t := metric.Snapshot() - ps := t.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999}) - exp.getInt(name + ".count").Set(t.Count()) - exp.getFloat(name + ".min").Set(float64(t.Min())) - exp.getFloat(name + ".max").Set(float64(t.Max())) - exp.getFloat(name + ".mean").Set(float64(t.Mean())) - exp.getFloat(name + ".std-dev").Set(float64(t.StdDev())) - exp.getFloat(name + ".50-percentile").Set(float64(ps[0])) - exp.getFloat(name + ".75-percentile").Set(float64(ps[1])) - exp.getFloat(name + ".95-percentile").Set(float64(ps[2])) - exp.getFloat(name + ".99-percentile").Set(float64(ps[3])) - exp.getFloat(name + ".999-percentile").Set(float64(ps[4])) - exp.getFloat(name + ".one-minute").Set(float64(t.Rate1())) - exp.getFloat(name + ".five-minute").Set(float64(t.Rate5())) - exp.getFloat(name + ".fifteen-minute").Set(float64((t.Rate15()))) - exp.getFloat(name + ".mean-rate").Set(float64(t.RateMean())) -} - -func (exp *exp) syncToExpvar() { - exp.registry.Each(func(name string, i interface{}) { - switch i.(type) { - case metrics.Counter: - exp.publishCounter(name, i.(metrics.Counter)) - case metrics.Gauge: - exp.publishGauge(name, i.(metrics.Gauge)) - case metrics.GaugeFloat64: - exp.publishGaugeFloat64(name, i.(metrics.GaugeFloat64)) - case metrics.Histogram: - exp.publishHistogram(name, i.(metrics.Histogram)) - case metrics.Meter: - exp.publishMeter(name, i.(metrics.Meter)) - case metrics.Timer: - exp.publishTimer(name, i.(metrics.Timer)) - default: - panic(fmt.Sprintf("unsupported type for '%s': %T", name, i)) - } - }) -} diff --git a/vendor/github.com/rcrowley/go-metrics/librato/client.go b/vendor/github.com/rcrowley/go-metrics/librato/client.go deleted file mode 100644 index 8c0c850e3..000000000 --- a/vendor/github.com/rcrowley/go-metrics/librato/client.go +++ /dev/null @@ -1,102 +0,0 @@ -package librato - -import ( - "bytes" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" -) - -const Operations = "operations" -const OperationsShort = "ops" - -type LibratoClient struct { - Email, Token string -} - -// property strings -const ( - // display attributes - Color = "color" - DisplayMax = "display_max" - DisplayMin = "display_min" - DisplayUnitsLong = "display_units_long" - DisplayUnitsShort = "display_units_short" - DisplayStacked = "display_stacked" - DisplayTransform = "display_transform" - // special gauge display attributes - SummarizeFunction = "summarize_function" - Aggregate = "aggregate" - - // metric keys - Name = "name" - Period = "period" - Description = "description" - DisplayName = "display_name" - Attributes = "attributes" - - // measurement keys - MeasureTime = "measure_time" - Source = "source" - Value = "value" - - // special gauge keys - Count = "count" - Sum = "sum" - Max = "max" - Min = "min" - SumSquares = "sum_squares" - - // batch keys - Counters = "counters" - Gauges = "gauges" - - MetricsPostUrl = "https://metrics-api.librato.com/v1/metrics" -) - -type Measurement map[string]interface{} -type Metric map[string]interface{} - -type Batch struct { - Gauges []Measurement `json:"gauges,omitempty"` - Counters []Measurement `json:"counters,omitempty"` - MeasureTime int64 `json:"measure_time"` - Source string `json:"source"` -} - -func (self *LibratoClient) PostMetrics(batch Batch) (err error) { - var ( - js []byte - req *http.Request - resp *http.Response - ) - - if len(batch.Counters) == 0 && len(batch.Gauges) == 0 { - return nil - } - - if js, err = json.Marshal(batch); err != nil { - return - } - - if req, err = http.NewRequest("POST", MetricsPostUrl, bytes.NewBuffer(js)); err != nil { - return - } - - req.Header.Set("Content-Type", "application/json") - req.SetBasicAuth(self.Email, self.Token) - - if resp, err = http.DefaultClient.Do(req); err != nil { - return - } - - if resp.StatusCode != http.StatusOK { - var body []byte - if body, err = ioutil.ReadAll(resp.Body); err != nil { - body = []byte(fmt.Sprintf("(could not fetch response body for error: %s)", err)) - } - err = fmt.Errorf("Unable to post to Librato: %d %s %s", resp.StatusCode, resp.Status, string(body)) - } - return -} diff --git a/vendor/github.com/rcrowley/go-metrics/librato/librato.go b/vendor/github.com/rcrowley/go-metrics/librato/librato.go deleted file mode 100644 index d7c057468..000000000 --- a/vendor/github.com/rcrowley/go-metrics/librato/librato.go +++ /dev/null @@ -1,235 +0,0 @@ -package librato - -import ( - "fmt" - "log" - "math" - "regexp" - "time" - - "github.com/rcrowley/go-metrics" -) - -// a regexp for extracting the unit from time.Duration.String -var unitRegexp = regexp.MustCompile("[^\\d]+$") - -// a helper that turns a time.Duration into librato display attributes for timer metrics -func translateTimerAttributes(d time.Duration) (attrs map[string]interface{}) { - attrs = make(map[string]interface{}) - attrs[DisplayTransform] = fmt.Sprintf("x/%d", int64(d)) - attrs[DisplayUnitsShort] = string(unitRegexp.Find([]byte(d.String()))) - return -} - -type Reporter struct { - Email, Token string - Namespace string - Source string - Interval time.Duration - Registry metrics.Registry - Percentiles []float64 // percentiles to report on histogram metrics - TimerAttributes map[string]interface{} // units in which timers will be displayed - intervalSec int64 -} - -func NewReporter(r metrics.Registry, d time.Duration, e string, t string, s string, p []float64, u time.Duration) *Reporter { - return &Reporter{e, t, "", s, d, r, p, translateTimerAttributes(u), int64(d / time.Second)} -} - -func Librato(r metrics.Registry, d time.Duration, e string, t string, s string, p []float64, u time.Duration) { - NewReporter(r, d, e, t, s, p, u).Run() -} - -func (self *Reporter) Run() { - log.Printf("WARNING: This client has been DEPRECATED! It has been moved to https://github.com/mihasya/go-metrics-librato and will be removed from rcrowley/go-metrics on August 5th 2015") - ticker := time.Tick(self.Interval) - metricsApi := &LibratoClient{self.Email, self.Token} - for now := range ticker { - var metrics Batch - var err error - if metrics, err = self.BuildRequest(now, self.Registry); err != nil { - log.Printf("ERROR constructing librato request body %s", err) - continue - } - if err := metricsApi.PostMetrics(metrics); err != nil { - log.Printf("ERROR sending metrics to librato %s", err) - continue - } - } -} - -// calculate sum of squares from data provided by metrics.Histogram -// see http://en.wikipedia.org/wiki/Standard_deviation#Rapid_calculation_methods -func sumSquares(s metrics.Sample) float64 { - count := float64(s.Count()) - sumSquared := math.Pow(count*s.Mean(), 2) - sumSquares := math.Pow(count*s.StdDev(), 2) + sumSquared/count - if math.IsNaN(sumSquares) { - return 0.0 - } - return sumSquares -} -func sumSquaresTimer(t metrics.Timer) float64 { - count := float64(t.Count()) - sumSquared := math.Pow(count*t.Mean(), 2) - sumSquares := math.Pow(count*t.StdDev(), 2) + sumSquared/count - if math.IsNaN(sumSquares) { - return 0.0 - } - return sumSquares -} - -func (self *Reporter) BuildRequest(now time.Time, r metrics.Registry) (snapshot Batch, err error) { - snapshot = Batch{ - // coerce timestamps to a stepping fn so that they line up in Librato graphs - MeasureTime: (now.Unix() / self.intervalSec) * self.intervalSec, - Source: self.Source, - } - snapshot.Gauges = make([]Measurement, 0) - snapshot.Counters = make([]Measurement, 0) - histogramGaugeCount := 1 + len(self.Percentiles) - r.Each(func(name string, metric interface{}) { - if self.Namespace != "" { - name = fmt.Sprintf("%s.%s", self.Namespace, name) - } - measurement := Measurement{} - measurement[Period] = self.Interval.Seconds() - switch m := metric.(type) { - case metrics.Counter: - if m.Count() > 0 { - measurement[Name] = fmt.Sprintf("%s.%s", name, "count") - measurement[Value] = float64(m.Count()) - measurement[Attributes] = map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - } - snapshot.Counters = append(snapshot.Counters, measurement) - } - case metrics.Gauge: - measurement[Name] = name - measurement[Value] = float64(m.Value()) - snapshot.Gauges = append(snapshot.Gauges, measurement) - case metrics.GaugeFloat64: - measurement[Name] = name - measurement[Value] = float64(m.Value()) - snapshot.Gauges = append(snapshot.Gauges, measurement) - case metrics.Histogram: - if m.Count() > 0 { - gauges := make([]Measurement, histogramGaugeCount, histogramGaugeCount) - s := m.Sample() - measurement[Name] = fmt.Sprintf("%s.%s", name, "hist") - measurement[Count] = uint64(s.Count()) - measurement[Max] = float64(s.Max()) - measurement[Min] = float64(s.Min()) - measurement[Sum] = float64(s.Sum()) - measurement[SumSquares] = sumSquares(s) - gauges[0] = measurement - for i, p := range self.Percentiles { - gauges[i+1] = Measurement{ - Name: fmt.Sprintf("%s.%.2f", measurement[Name], p), - Value: s.Percentile(p), - Period: measurement[Period], - } - } - snapshot.Gauges = append(snapshot.Gauges, gauges...) - } - case metrics.Meter: - measurement[Name] = name - measurement[Value] = float64(m.Count()) - snapshot.Counters = append(snapshot.Counters, measurement) - snapshot.Gauges = append(snapshot.Gauges, - Measurement{ - Name: fmt.Sprintf("%s.%s", name, "1min"), - Value: m.Rate1(), - Period: int64(self.Interval.Seconds()), - Attributes: map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - }, - }, - Measurement{ - Name: fmt.Sprintf("%s.%s", name, "5min"), - Value: m.Rate5(), - Period: int64(self.Interval.Seconds()), - Attributes: map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - }, - }, - Measurement{ - Name: fmt.Sprintf("%s.%s", name, "15min"), - Value: m.Rate15(), - Period: int64(self.Interval.Seconds()), - Attributes: map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - }, - }, - ) - case metrics.Timer: - measurement[Name] = name - measurement[Value] = float64(m.Count()) - snapshot.Counters = append(snapshot.Counters, measurement) - if m.Count() > 0 { - libratoName := fmt.Sprintf("%s.%s", name, "timer.mean") - gauges := make([]Measurement, histogramGaugeCount, histogramGaugeCount) - gauges[0] = Measurement{ - Name: libratoName, - Count: uint64(m.Count()), - Sum: m.Mean() * float64(m.Count()), - Max: float64(m.Max()), - Min: float64(m.Min()), - SumSquares: sumSquaresTimer(m), - Period: int64(self.Interval.Seconds()), - Attributes: self.TimerAttributes, - } - for i, p := range self.Percentiles { - gauges[i+1] = Measurement{ - Name: fmt.Sprintf("%s.timer.%2.0f", name, p*100), - Value: m.Percentile(p), - Period: int64(self.Interval.Seconds()), - Attributes: self.TimerAttributes, - } - } - snapshot.Gauges = append(snapshot.Gauges, gauges...) - snapshot.Gauges = append(snapshot.Gauges, - Measurement{ - Name: fmt.Sprintf("%s.%s", name, "rate.1min"), - Value: m.Rate1(), - Period: int64(self.Interval.Seconds()), - Attributes: map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - }, - }, - Measurement{ - Name: fmt.Sprintf("%s.%s", name, "rate.5min"), - Value: m.Rate5(), - Period: int64(self.Interval.Seconds()), - Attributes: map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - }, - }, - Measurement{ - Name: fmt.Sprintf("%s.%s", name, "rate.15min"), - Value: m.Rate15(), - Period: int64(self.Interval.Seconds()), - Attributes: map[string]interface{}{ - DisplayUnitsLong: Operations, - DisplayUnitsShort: OperationsShort, - DisplayMin: "0", - }, - }, - ) - } - } - }) - return -} diff --git a/vendor/github.com/rcrowley/go-metrics/memory.md b/vendor/github.com/rcrowley/go-metrics/memory.md new file mode 100644 index 000000000..47454f54b --- /dev/null +++ b/vendor/github.com/rcrowley/go-metrics/memory.md @@ -0,0 +1,285 @@ +Memory usage +============ + +(Highly unscientific.) + +Command used to gather static memory usage: + +```sh +grep ^Vm "/proc/$(ps fax | grep [m]etrics-bench | awk '{print $1}')/status" +``` + +Program used to gather baseline memory usage: + +```go +package main + +import "time" + +func main() { + time.Sleep(600e9) +} +``` + +Baseline +-------- + +``` +VmPeak: 42604 kB +VmSize: 42604 kB +VmLck: 0 kB +VmHWM: 1120 kB +VmRSS: 1120 kB +VmData: 35460 kB +VmStk: 136 kB +VmExe: 1020 kB +VmLib: 1848 kB +VmPTE: 36 kB +VmSwap: 0 kB +``` + +Program used to gather metric memory usage (with other metrics being similar): + +```go +package main + +import ( + "fmt" + "metrics" + "time" +) + +func main() { + fmt.Sprintf("foo") + metrics.NewRegistry() + time.Sleep(600e9) +} +``` + +1000 counters registered +------------------------ + +``` +VmPeak: 44016 kB +VmSize: 44016 kB +VmLck: 0 kB +VmHWM: 1928 kB +VmRSS: 1928 kB +VmData: 36868 kB +VmStk: 136 kB +VmExe: 1024 kB +VmLib: 1848 kB +VmPTE: 40 kB +VmSwap: 0 kB +``` + +**1.412 kB virtual, TODO 0.808 kB resident per counter.** + +100000 counters registered +-------------------------- + +``` +VmPeak: 55024 kB +VmSize: 55024 kB +VmLck: 0 kB +VmHWM: 12440 kB +VmRSS: 12440 kB +VmData: 47876 kB +VmStk: 136 kB +VmExe: 1024 kB +VmLib: 1848 kB +VmPTE: 64 kB +VmSwap: 0 kB +``` + +**0.1242 kB virtual, 0.1132 kB resident per counter.** + +1000 gauges registered +---------------------- + +``` +VmPeak: 44012 kB +VmSize: 44012 kB +VmLck: 0 kB +VmHWM: 1928 kB +VmRSS: 1928 kB +VmData: 36868 kB +VmStk: 136 kB +VmExe: 1020 kB +VmLib: 1848 kB +VmPTE: 40 kB +VmSwap: 0 kB +``` + +**1.408 kB virtual, 0.808 kB resident per counter.** + +100000 gauges registered +------------------------ + +``` +VmPeak: 55020 kB +VmSize: 55020 kB +VmLck: 0 kB +VmHWM: 12432 kB +VmRSS: 12432 kB +VmData: 47876 kB +VmStk: 136 kB +VmExe: 1020 kB +VmLib: 1848 kB +VmPTE: 60 kB +VmSwap: 0 kB +``` + +**0.12416 kB virtual, 0.11312 resident per gauge.** + +1000 histograms with a uniform sample size of 1028 +-------------------------------------------------- + +``` +VmPeak: 72272 kB +VmSize: 72272 kB +VmLck: 0 kB +VmHWM: 16204 kB +VmRSS: 16204 kB +VmData: 65100 kB +VmStk: 136 kB +VmExe: 1048 kB +VmLib: 1848 kB +VmPTE: 80 kB +VmSwap: 0 kB +``` + +**29.668 kB virtual, TODO 15.084 resident per histogram.** + +10000 histograms with a uniform sample size of 1028 +--------------------------------------------------- + +``` +VmPeak: 256912 kB +VmSize: 256912 kB +VmLck: 0 kB +VmHWM: 146204 kB +VmRSS: 146204 kB +VmData: 249740 kB +VmStk: 136 kB +VmExe: 1048 kB +VmLib: 1848 kB +VmPTE: 448 kB +VmSwap: 0 kB +``` + +**21.4308 kB virtual, 14.5084 kB resident per histogram.** + +50000 histograms with a uniform sample size of 1028 +--------------------------------------------------- + +``` +VmPeak: 908112 kB +VmSize: 908112 kB +VmLck: 0 kB +VmHWM: 645832 kB +VmRSS: 645588 kB +VmData: 900940 kB +VmStk: 136 kB +VmExe: 1048 kB +VmLib: 1848 kB +VmPTE: 1716 kB +VmSwap: 1544 kB +``` + +**17.31016 kB virtual, 12.88936 kB resident per histogram.** + +1000 histograms with an exponentially-decaying sample size of 1028 and alpha of 0.015 +------------------------------------------------------------------------------------- + +``` +VmPeak: 62480 kB +VmSize: 62480 kB +VmLck: 0 kB +VmHWM: 11572 kB +VmRSS: 11572 kB +VmData: 55308 kB +VmStk: 136 kB +VmExe: 1048 kB +VmLib: 1848 kB +VmPTE: 64 kB +VmSwap: 0 kB +``` + +**19.876 kB virtual, 10.452 kB resident per histogram.** + +10000 histograms with an exponentially-decaying sample size of 1028 and alpha of 0.015 +-------------------------------------------------------------------------------------- + +``` +VmPeak: 153296 kB +VmSize: 153296 kB +VmLck: 0 kB +VmHWM: 101176 kB +VmRSS: 101176 kB +VmData: 146124 kB +VmStk: 136 kB +VmExe: 1048 kB +VmLib: 1848 kB +VmPTE: 240 kB +VmSwap: 0 kB +``` + +**11.0692 kB virtual, 10.0056 kB resident per histogram.** + +50000 histograms with an exponentially-decaying sample size of 1028 and alpha of 0.015 +-------------------------------------------------------------------------------------- + +``` +VmPeak: 557264 kB +VmSize: 557264 kB +VmLck: 0 kB +VmHWM: 501056 kB +VmRSS: 501056 kB +VmData: 550092 kB +VmStk: 136 kB +VmExe: 1048 kB +VmLib: 1848 kB +VmPTE: 1032 kB +VmSwap: 0 kB +``` + +**10.2932 kB virtual, 9.99872 kB resident per histogram.** + +1000 meters +----------- + +``` +VmPeak: 74504 kB +VmSize: 74504 kB +VmLck: 0 kB +VmHWM: 24124 kB +VmRSS: 24124 kB +VmData: 67340 kB +VmStk: 136 kB +VmExe: 1040 kB +VmLib: 1848 kB +VmPTE: 92 kB +VmSwap: 0 kB +``` + +**31.9 kB virtual, 23.004 kB resident per meter.** + +10000 meters +------------ + +``` +VmPeak: 278920 kB +VmSize: 278920 kB +VmLck: 0 kB +VmHWM: 227300 kB +VmRSS: 227300 kB +VmData: 271756 kB +VmStk: 136 kB +VmExe: 1040 kB +VmLib: 1848 kB +VmPTE: 488 kB +VmSwap: 0 kB +``` + +**23.6316 kB virtual, 22.618 kB resident per meter.** diff --git a/vendor/github.com/rcrowley/go-metrics/stathat/stathat.go b/vendor/github.com/rcrowley/go-metrics/stathat/stathat.go deleted file mode 100644 index 0afcb4848..000000000 --- a/vendor/github.com/rcrowley/go-metrics/stathat/stathat.go +++ /dev/null @@ -1,69 +0,0 @@ -// Metrics output to StatHat. -package stathat - -import ( - "github.com/rcrowley/go-metrics" - "github.com/stathat/go" - "log" - "time" -) - -func Stathat(r metrics.Registry, d time.Duration, userkey string) { - for { - if err := sh(r, userkey); nil != err { - log.Println(err) - } - time.Sleep(d) - } -} - -func sh(r metrics.Registry, userkey string) error { - r.Each(func(name string, i interface{}) { - switch metric := i.(type) { - case metrics.Counter: - stathat.PostEZCount(name, userkey, int(metric.Count())) - case metrics.Gauge: - stathat.PostEZValue(name, userkey, float64(metric.Value())) - case metrics.GaugeFloat64: - stathat.PostEZValue(name, userkey, float64(metric.Value())) - case metrics.Histogram: - h := metric.Snapshot() - ps := h.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999}) - stathat.PostEZCount(name+".count", userkey, int(h.Count())) - stathat.PostEZValue(name+".min", userkey, float64(h.Min())) - stathat.PostEZValue(name+".max", userkey, float64(h.Max())) - stathat.PostEZValue(name+".mean", userkey, float64(h.Mean())) - stathat.PostEZValue(name+".std-dev", userkey, float64(h.StdDev())) - stathat.PostEZValue(name+".50-percentile", userkey, float64(ps[0])) - stathat.PostEZValue(name+".75-percentile", userkey, float64(ps[1])) - stathat.PostEZValue(name+".95-percentile", userkey, float64(ps[2])) - stathat.PostEZValue(name+".99-percentile", userkey, float64(ps[3])) - stathat.PostEZValue(name+".999-percentile", userkey, float64(ps[4])) - case metrics.Meter: - m := metric.Snapshot() - stathat.PostEZCount(name+".count", userkey, int(m.Count())) - stathat.PostEZValue(name+".one-minute", userkey, float64(m.Rate1())) - stathat.PostEZValue(name+".five-minute", userkey, float64(m.Rate5())) - stathat.PostEZValue(name+".fifteen-minute", userkey, float64(m.Rate15())) - stathat.PostEZValue(name+".mean", userkey, float64(m.RateMean())) - case metrics.Timer: - t := metric.Snapshot() - ps := t.Percentiles([]float64{0.5, 0.75, 0.95, 0.99, 0.999}) - stathat.PostEZCount(name+".count", userkey, int(t.Count())) - stathat.PostEZValue(name+".min", userkey, float64(t.Min())) - stathat.PostEZValue(name+".max", userkey, float64(t.Max())) - stathat.PostEZValue(name+".mean", userkey, float64(t.Mean())) - stathat.PostEZValue(name+".std-dev", userkey, float64(t.StdDev())) - stathat.PostEZValue(name+".50-percentile", userkey, float64(ps[0])) - stathat.PostEZValue(name+".75-percentile", userkey, float64(ps[1])) - stathat.PostEZValue(name+".95-percentile", userkey, float64(ps[2])) - stathat.PostEZValue(name+".99-percentile", userkey, float64(ps[3])) - stathat.PostEZValue(name+".999-percentile", userkey, float64(ps[4])) - stathat.PostEZValue(name+".one-minute", userkey, float64(t.Rate1())) - stathat.PostEZValue(name+".five-minute", userkey, float64(t.Rate5())) - stathat.PostEZValue(name+".fifteen-minute", userkey, float64(t.Rate15())) - stathat.PostEZValue(name+".mean-rate", userkey, float64(t.RateMean())) - } - }) - return nil -} diff --git a/vendor/github.com/rcrowley/go-metrics/validate.sh b/vendor/github.com/rcrowley/go-metrics/validate.sh new file mode 100644 index 000000000..c4ae91e64 --- /dev/null +++ b/vendor/github.com/rcrowley/go-metrics/validate.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +# check there are no formatting issues +GOFMT_LINES=`gofmt -l . | wc -l | xargs` +test $GOFMT_LINES -eq 0 || echo "gofmt needs to be run, ${GOFMT_LINES} files have issues" + +# run the tests for the root package +go test -race . diff --git a/vendor/github.com/sasha-s/go-deadlock/.travis.yml b/vendor/github.com/sasha-s/go-deadlock/.travis.yml new file mode 100644 index 000000000..aacc9a920 --- /dev/null +++ b/vendor/github.com/sasha-s/go-deadlock/.travis.yml @@ -0,0 +1,10 @@ +language: go + +go: + - 1.3.x + - 1.4.x + - 1.5.x + - 1.6.x + - 1.7.x + - 1.8.x + - master diff --git a/vendor/github.com/sasha-s/go-deadlock/Readme.md b/vendor/github.com/sasha-s/go-deadlock/Readme.md new file mode 100644 index 000000000..c8236a18a --- /dev/null +++ b/vendor/github.com/sasha-s/go-deadlock/Readme.md @@ -0,0 +1,117 @@ +# Online deadlock detection in go (golang). [Docs](https://godoc.org/github.com/sasha-s/go-deadlock). [![Build Status](https://travis-ci.org/sasha-s/go-deadlock.svg?branch=master)](https://travis-ci.org/sasha-s/go-deadlock) +## Why +Deadlocks happen and are painful to debug. + +## What +go-deadlock provides (RW)Mutex drop-in replacements for sync.(RW)Mutex. +It would not work if you create a spaghetti of channels. +Mutexes only. + +## Installation +```sh +go get github.com/sasha-s/go-deadlock/... +``` + +## Usage +```go +import "github.com/sasha-s/go-deadlock" +var mu deadlock.Mutex +// Use normally, it works exactly like sync.Mutex does. +mu.Lock() + +defer mu.Unlock() +// Or +var rw deadlock.RWMutex +rw.RLock() +defer rw.RUnlock() +``` + +### Deadlocks +One of the most common sources of deadlocks is inconsistent lock ordering: +say, you have two mutexes A and B, and in some goroutines you have +```go +A.Lock() // defer A.Unlock() or similar. +... +B.Lock() // defer B.Unlock() or similar. +``` +And in another goroutine the order of locks is reversed: +```go +B.Lock() // defer B.Unlock() or similar. +... +A.Lock() // defer A.Unlock() or similar. +``` + +Another common sources of deadlocs is duplicate take a lock in a goroutine: +``` +A.Rlock() or lock() + +A.lock() or A.RLock() +``` + +This does not guarantee a deadlock (maybe the goroutines above can never be running at the same time), but it usually a design flaw at least. + +go-deadlock can detect such cases (unless you cross goroutine boundary - say lock A, then spawn a goroutine, block until it is singals, and lock B inside of the goroutine), even if the deadlock itself happens very infrequently and is painful to reproduce! + +Each time go-deadlock sees a lock attempt for lock B, it records the order A before B, for each lock that is currently being held in the same goroutine, and it prints (and exits the program by default) when it sees the locking order being violated. + +In addition, if it sees that we are waiting on a lock for a long time (opts.DeadlockTimeout, 30 seconds by default), it reports a potential deadlock, also printing the stacktrace for a goroutine that is currently holding the lock we are desperately trying to grab. + + +## Sample output +####Inconsistent lock ordering: +``` +POTENTIAL DEADLOCK: Inconsistent locking. saw this ordering in one goroutine: +happened before +inmem.go:623 bttest.(*server).ReadModifyWriteRow { r.mu.Lock() } <<<<< +inmem_test.go:118 bttest.TestConcurrentMutationsReadModifyAndGC.func4 { _, _ = s.ReadModifyWriteRow(ctx, rmw()) } + +happened after +inmem.go:629 bttest.(*server).ReadModifyWriteRow { tbl.mu.RLock() } <<<<< +inmem_test.go:118 bttest.TestConcurrentMutationsReadModifyAndGC.func4 { _, _ = s.ReadModifyWriteRow(ctx, rmw()) } + +in another goroutine: happened before +inmem.go:799 bttest.(*table).gc { t.mu.RLock() } <<<<< +inmem_test.go:125 bttest.TestConcurrentMutationsReadModifyAndGC.func5 { tbl.gc() } + +happend after +inmem.go:814 bttest.(*table).gc { r.mu.Lock() } <<<<< +inmem_test.go:125 bttest.TestConcurrentMutationsReadModifyAndGC.func5 { tbl.gc() } +``` + +#### Waiting for a lock for a long time: + +``` +POTENTIAL DEADLOCK: +Previous place where the lock was grabbed +goroutine 240 lock 0xc820160440 +inmem.go:799 bttest.(*table).gc { t.mu.RLock() } <<<<< +inmem_test.go:125 bttest.TestConcurrentMutationsReadModifyAndGC.func5 { tbl.gc() } + +Have been trying to lock it again for more than 40ms +goroutine 68 lock 0xc820160440 +inmem.go:785 bttest.(*table).mutableRow { t.mu.Lock() } <<<<< +inmem.go:428 bttest.(*server).MutateRow { r := tbl.mutableRow(string(req.RowKey)) } +inmem_test.go:111 bttest.TestConcurrentMutationsReadModifyAndGC.func3 { s.MutateRow(ctx, req) } + + +Here is what goroutine 240 doing now +goroutine 240 [select]: +github.com/sasha-s/go-deadlock.lock(0xc82028ca10, 0x5189e0, 0xc82013a9b0) + /Users/sasha/go/src/github.com/sasha-s/go-deadlock/deadlock.go:163 +0x1640 +github.com/sasha-s/go-deadlock.(*Mutex).Lock(0xc82013a9b0) + /Users/sasha/go/src/github.com/sasha-s/go-deadlock/deadlock.go:54 +0x86 +google.golang.org/cloud/bigtable/bttest.(*table).gc(0xc820160440) + /Users/sasha/go/src/google.golang.org/cloud/bigtable/bttest/inmem.go:814 +0x28d +google.golang.org/cloud/bigtable/bttest.TestConcurrentMutationsReadModifyAndGC.func5(0xc82015c760, 0xc820160440) /Users/sasha/go/src/google.golang.org/cloud/bigtable/bttest/inmem_test.go:125 +0x48 +created by google.golang.org/cloud/bigtable/bttest.TestConcurrentMutationsReadModifyAndGC + /Users/sasha/go/src/google.golang.org/cloud/bigtable/bttest/inmem_test.go:126 +0xb6f +``` + +## Used in +[cockroachdb: Potential deadlock between Gossip.SetStorage and Node.gossipStores](https://github.com/cockroachdb/cockroach/issues/7972) + +[bigtable/bttest: A race between GC and row mutations](https://code-review.googlesource.com#/c/5301/) + +## Need a mutex that works with net.context? +I have [one](https://github.com/sasha-s/go-csync). + diff --git a/vendor/github.com/sirupsen/logrus/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE deleted file mode 100644 index f090cb42f..000000000 --- a/vendor/github.com/sirupsen/logrus/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Simon Eskildsen - -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/sirupsen/logrus/alt_exit.go b/vendor/github.com/sirupsen/logrus/alt_exit.go deleted file mode 100644 index 8af90637a..000000000 --- a/vendor/github.com/sirupsen/logrus/alt_exit.go +++ /dev/null @@ -1,64 +0,0 @@ -package logrus - -// The following code was sourced and modified from the -// https://github.com/tebeka/atexit package governed by the following license: -// -// Copyright (c) 2012 Miki Tebeka . -// -// 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. - -import ( - "fmt" - "os" -) - -var handlers = []func(){} - -func runHandler(handler func()) { - defer func() { - if err := recover(); err != nil { - fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err) - } - }() - - handler() -} - -func runHandlers() { - for _, handler := range handlers { - runHandler(handler) - } -} - -// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code) -func Exit(code int) { - runHandlers() - os.Exit(code) -} - -// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke -// all handlers. The handlers will also be invoked when any Fatal log entry is -// made. -// -// This method is useful when a caller wishes to use logrus to log a fatal -// message but also needs to gracefully shutdown. An example usecase could be -// closing database connections, or sending a alert that the application is -// closing. -func RegisterExitHandler(handler func()) { - handlers = append(handlers, handler) -} diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go deleted file mode 100644 index da67aba06..000000000 --- a/vendor/github.com/sirupsen/logrus/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Package logrus is a structured logger for Go, completely API compatible with the standard library logger. - - -The simplest way to use Logrus is simply the package-level exported logger: - - package main - - import ( - log "github.com/sirupsen/logrus" - ) - - func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "number": 1, - "size": 10, - }).Info("A walrus appears") - } - -Output: - time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 - -For a full guide visit https://github.com/sirupsen/logrus -*/ -package logrus diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go deleted file mode 100644 index 1fad45e08..000000000 --- a/vendor/github.com/sirupsen/logrus/entry.go +++ /dev/null @@ -1,279 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "os" - "sync" - "time" -) - -var bufferPool *sync.Pool - -func init() { - bufferPool = &sync.Pool{ - New: func() interface{} { - return new(bytes.Buffer) - }, - } -} - -// Defines the key when adding errors using WithError. -var ErrorKey = "error" - -// An entry is the final or intermediate Logrus logging entry. It contains all -// the fields passed with WithField{,s}. It's finally logged when Debug, Info, -// Warn, Error, Fatal or Panic is called on it. These objects can be reused and -// passed around as much as you wish to avoid field duplication. -type Entry struct { - Logger *Logger - - // Contains all the fields set by the user. - Data Fields - - // Time at which the log entry was created - Time time.Time - - // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic - // This field will be set on entry firing and the value will be equal to the one in Logger struct field. - Level Level - - // Message passed to Debug, Info, Warn, Error, Fatal or Panic - Message string - - // When formatter is called in entry.log(), an Buffer may be set to entry - Buffer *bytes.Buffer -} - -func NewEntry(logger *Logger) *Entry { - return &Entry{ - Logger: logger, - // Default is three fields, give a little extra room - Data: make(Fields, 5), - } -} - -// Returns the string representation from the reader and ultimately the -// formatter. -func (entry *Entry) String() (string, error) { - serialized, err := entry.Logger.Formatter.Format(entry) - if err != nil { - return "", err - } - str := string(serialized) - return str, nil -} - -// Add an error as single field (using the key defined in ErrorKey) to the Entry. -func (entry *Entry) WithError(err error) *Entry { - return entry.WithField(ErrorKey, err) -} - -// Add a single field to the Entry. -func (entry *Entry) WithField(key string, value interface{}) *Entry { - return entry.WithFields(Fields{key: value}) -} - -// Add a map of fields to the Entry. -func (entry *Entry) WithFields(fields Fields) *Entry { - data := make(Fields, len(entry.Data)+len(fields)) - for k, v := range entry.Data { - data[k] = v - } - for k, v := range fields { - data[k] = v - } - return &Entry{Logger: entry.Logger, Data: data} -} - -// This function is not declared with a pointer value because otherwise -// race conditions will occur when using multiple goroutines -func (entry Entry) log(level Level, msg string) { - var buffer *bytes.Buffer - entry.Time = time.Now() - entry.Level = level - entry.Message = msg - - entry.Logger.mu.Lock() - err := entry.Logger.Hooks.Fire(level, &entry) - entry.Logger.mu.Unlock() - if err != nil { - entry.Logger.mu.Lock() - fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err) - entry.Logger.mu.Unlock() - } - buffer = bufferPool.Get().(*bytes.Buffer) - buffer.Reset() - defer bufferPool.Put(buffer) - entry.Buffer = buffer - serialized, err := entry.Logger.Formatter.Format(&entry) - entry.Buffer = nil - if err != nil { - entry.Logger.mu.Lock() - fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) - entry.Logger.mu.Unlock() - } else { - entry.Logger.mu.Lock() - _, err = entry.Logger.Out.Write(serialized) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) - } - entry.Logger.mu.Unlock() - } - - // To avoid Entry#log() returning a value that only would make sense for - // panic() to use in Entry#Panic(), we avoid the allocation by checking - // directly here. - if level <= PanicLevel { - panic(&entry) - } -} - -func (entry *Entry) Debug(args ...interface{}) { - if entry.Logger.level() >= DebugLevel { - entry.log(DebugLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Print(args ...interface{}) { - entry.Info(args...) -} - -func (entry *Entry) Info(args ...interface{}) { - if entry.Logger.level() >= InfoLevel { - entry.log(InfoLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Warn(args ...interface{}) { - if entry.Logger.level() >= WarnLevel { - entry.log(WarnLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Warning(args ...interface{}) { - entry.Warn(args...) -} - -func (entry *Entry) Error(args ...interface{}) { - if entry.Logger.level() >= ErrorLevel { - entry.log(ErrorLevel, fmt.Sprint(args...)) - } -} - -func (entry *Entry) Fatal(args ...interface{}) { - if entry.Logger.level() >= FatalLevel { - entry.log(FatalLevel, fmt.Sprint(args...)) - } - Exit(1) -} - -func (entry *Entry) Panic(args ...interface{}) { - if entry.Logger.level() >= PanicLevel { - entry.log(PanicLevel, fmt.Sprint(args...)) - } - panic(fmt.Sprint(args...)) -} - -// Entry Printf family functions - -func (entry *Entry) Debugf(format string, args ...interface{}) { - if entry.Logger.level() >= DebugLevel { - entry.Debug(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Infof(format string, args ...interface{}) { - if entry.Logger.level() >= InfoLevel { - entry.Info(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Printf(format string, args ...interface{}) { - entry.Infof(format, args...) -} - -func (entry *Entry) Warnf(format string, args ...interface{}) { - if entry.Logger.level() >= WarnLevel { - entry.Warn(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Warningf(format string, args ...interface{}) { - entry.Warnf(format, args...) -} - -func (entry *Entry) Errorf(format string, args ...interface{}) { - if entry.Logger.level() >= ErrorLevel { - entry.Error(fmt.Sprintf(format, args...)) - } -} - -func (entry *Entry) Fatalf(format string, args ...interface{}) { - if entry.Logger.level() >= FatalLevel { - entry.Fatal(fmt.Sprintf(format, args...)) - } - Exit(1) -} - -func (entry *Entry) Panicf(format string, args ...interface{}) { - if entry.Logger.level() >= PanicLevel { - entry.Panic(fmt.Sprintf(format, args...)) - } -} - -// Entry Println family functions - -func (entry *Entry) Debugln(args ...interface{}) { - if entry.Logger.level() >= DebugLevel { - entry.Debug(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Infoln(args ...interface{}) { - if entry.Logger.level() >= InfoLevel { - entry.Info(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Println(args ...interface{}) { - entry.Infoln(args...) -} - -func (entry *Entry) Warnln(args ...interface{}) { - if entry.Logger.level() >= WarnLevel { - entry.Warn(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Warningln(args ...interface{}) { - entry.Warnln(args...) -} - -func (entry *Entry) Errorln(args ...interface{}) { - if entry.Logger.level() >= ErrorLevel { - entry.Error(entry.sprintlnn(args...)) - } -} - -func (entry *Entry) Fatalln(args ...interface{}) { - if entry.Logger.level() >= FatalLevel { - entry.Fatal(entry.sprintlnn(args...)) - } - Exit(1) -} - -func (entry *Entry) Panicln(args ...interface{}) { - if entry.Logger.level() >= PanicLevel { - entry.Panic(entry.sprintlnn(args...)) - } -} - -// Sprintlnn => Sprint no newline. This is to get the behavior of how -// fmt.Sprintln where spaces are always added between operands, regardless of -// their type. Instead of vendoring the Sprintln implementation to spare a -// string allocation, we do the simplest thing. -func (entry *Entry) sprintlnn(args ...interface{}) string { - msg := fmt.Sprintln(args...) - return msg[:len(msg)-1] -} diff --git a/vendor/github.com/sirupsen/logrus/exported.go b/vendor/github.com/sirupsen/logrus/exported.go deleted file mode 100644 index 013183eda..000000000 --- a/vendor/github.com/sirupsen/logrus/exported.go +++ /dev/null @@ -1,193 +0,0 @@ -package logrus - -import ( - "io" -) - -var ( - // std is the name of the standard logger in stdlib `log` - std = New() -) - -func StandardLogger() *Logger { - return std -} - -// SetOutput sets the standard logger output. -func SetOutput(out io.Writer) { - std.mu.Lock() - defer std.mu.Unlock() - std.Out = out -} - -// SetFormatter sets the standard logger formatter. -func SetFormatter(formatter Formatter) { - std.mu.Lock() - defer std.mu.Unlock() - std.Formatter = formatter -} - -// SetLevel sets the standard logger level. -func SetLevel(level Level) { - std.mu.Lock() - defer std.mu.Unlock() - std.SetLevel(level) -} - -// GetLevel returns the standard logger level. -func GetLevel() Level { - std.mu.Lock() - defer std.mu.Unlock() - return std.level() -} - -// AddHook adds a hook to the standard logger hooks. -func AddHook(hook Hook) { - std.mu.Lock() - defer std.mu.Unlock() - std.Hooks.Add(hook) -} - -// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key. -func WithError(err error) *Entry { - return std.WithField(ErrorKey, err) -} - -// WithField creates an entry from the standard logger and adds a field to -// it. If you want multiple fields, use `WithFields`. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithField(key string, value interface{}) *Entry { - return std.WithField(key, value) -} - -// WithFields creates an entry from the standard logger and adds multiple -// fields to it. This is simply a helper for `WithField`, invoking it -// once for each field. -// -// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal -// or Panic on the Entry it returns. -func WithFields(fields Fields) *Entry { - return std.WithFields(fields) -} - -// Debug logs a message at level Debug on the standard logger. -func Debug(args ...interface{}) { - std.Debug(args...) -} - -// Print logs a message at level Info on the standard logger. -func Print(args ...interface{}) { - std.Print(args...) -} - -// Info logs a message at level Info on the standard logger. -func Info(args ...interface{}) { - std.Info(args...) -} - -// Warn logs a message at level Warn on the standard logger. -func Warn(args ...interface{}) { - std.Warn(args...) -} - -// Warning logs a message at level Warn on the standard logger. -func Warning(args ...interface{}) { - std.Warning(args...) -} - -// Error logs a message at level Error on the standard logger. -func Error(args ...interface{}) { - std.Error(args...) -} - -// Panic logs a message at level Panic on the standard logger. -func Panic(args ...interface{}) { - std.Panic(args...) -} - -// Fatal logs a message at level Fatal on the standard logger. -func Fatal(args ...interface{}) { - std.Fatal(args...) -} - -// Debugf logs a message at level Debug on the standard logger. -func Debugf(format string, args ...interface{}) { - std.Debugf(format, args...) -} - -// Printf logs a message at level Info on the standard logger. -func Printf(format string, args ...interface{}) { - std.Printf(format, args...) -} - -// Infof logs a message at level Info on the standard logger. -func Infof(format string, args ...interface{}) { - std.Infof(format, args...) -} - -// Warnf logs a message at level Warn on the standard logger. -func Warnf(format string, args ...interface{}) { - std.Warnf(format, args...) -} - -// Warningf logs a message at level Warn on the standard logger. -func Warningf(format string, args ...interface{}) { - std.Warningf(format, args...) -} - -// Errorf logs a message at level Error on the standard logger. -func Errorf(format string, args ...interface{}) { - std.Errorf(format, args...) -} - -// Panicf logs a message at level Panic on the standard logger. -func Panicf(format string, args ...interface{}) { - std.Panicf(format, args...) -} - -// Fatalf logs a message at level Fatal on the standard logger. -func Fatalf(format string, args ...interface{}) { - std.Fatalf(format, args...) -} - -// Debugln logs a message at level Debug on the standard logger. -func Debugln(args ...interface{}) { - std.Debugln(args...) -} - -// Println logs a message at level Info on the standard logger. -func Println(args ...interface{}) { - std.Println(args...) -} - -// Infoln logs a message at level Info on the standard logger. -func Infoln(args ...interface{}) { - std.Infoln(args...) -} - -// Warnln logs a message at level Warn on the standard logger. -func Warnln(args ...interface{}) { - std.Warnln(args...) -} - -// Warningln logs a message at level Warn on the standard logger. -func Warningln(args ...interface{}) { - std.Warningln(args...) -} - -// Errorln logs a message at level Error on the standard logger. -func Errorln(args ...interface{}) { - std.Errorln(args...) -} - -// Panicln logs a message at level Panic on the standard logger. -func Panicln(args ...interface{}) { - std.Panicln(args...) -} - -// Fatalln logs a message at level Fatal on the standard logger. -func Fatalln(args ...interface{}) { - std.Fatalln(args...) -} diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go deleted file mode 100644 index b183ff5b1..000000000 --- a/vendor/github.com/sirupsen/logrus/formatter.go +++ /dev/null @@ -1,45 +0,0 @@ -package logrus - -import "time" - -const defaultTimestampFormat = time.RFC3339 - -// The Formatter interface is used to implement a custom Formatter. It takes an -// `Entry`. It exposes all the fields, including the default ones: -// -// * `entry.Data["msg"]`. The message passed from Info, Warn, Error .. -// * `entry.Data["time"]`. The timestamp. -// * `entry.Data["level"]. The level the entry was logged at. -// -// Any additional fields added with `WithField` or `WithFields` are also in -// `entry.Data`. Format is expected to return an array of bytes which are then -// logged to `logger.Out`. -type Formatter interface { - Format(*Entry) ([]byte, error) -} - -// This is to not silently overwrite `time`, `msg` and `level` fields when -// dumping it. If this code wasn't there doing: -// -// logrus.WithField("level", 1).Info("hello") -// -// Would just silently drop the user provided level. Instead with this code -// it'll logged as: -// -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} -// -// It's not exported because it's still using Data in an opinionated way. It's to -// avoid code duplication between the two default formatters. -func prefixFieldClashes(data Fields) { - if t, ok := data["time"]; ok { - data["fields.time"] = t - } - - if m, ok := data["msg"]; ok { - data["fields.msg"] = m - } - - if l, ok := data["level"]; ok { - data["fields.level"] = l - } -} diff --git a/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go deleted file mode 100644 index 3f151cdc3..000000000 --- a/vendor/github.com/sirupsen/logrus/hooks.go +++ /dev/null @@ -1,34 +0,0 @@ -package logrus - -// A hook to be fired when logging on the logging levels returned from -// `Levels()` on your implementation of the interface. Note that this is not -// fired in a goroutine or a channel with workers, you should handle such -// functionality yourself if your call is non-blocking and you don't wish for -// the logging calls for levels returned from `Levels()` to block. -type Hook interface { - Levels() []Level - Fire(*Entry) error -} - -// Internal type for storing the hooks on a logger instance. -type LevelHooks map[Level][]Hook - -// Add a hook to an instance of logger. This is called with -// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface. -func (hooks LevelHooks) Add(hook Hook) { - for _, level := range hook.Levels() { - hooks[level] = append(hooks[level], hook) - } -} - -// Fire all the hooks for the passed level. Used by `entry.log` to fire -// appropriate hooks for a log entry. -func (hooks LevelHooks) Fire(level Level, entry *Entry) error { - for _, hook := range hooks[level] { - if err := hook.Fire(entry); err != nil { - return err - } - } - - return nil -} diff --git a/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go b/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go deleted file mode 100644 index 329ce0d60..000000000 --- a/vendor/github.com/sirupsen/logrus/hooks/syslog/syslog.go +++ /dev/null @@ -1,55 +0,0 @@ -// +build !windows,!nacl,!plan9 - -package syslog - -import ( - "fmt" - "log/syslog" - "os" - - "github.com/sirupsen/logrus" -) - -// SyslogHook to send logs via syslog. -type SyslogHook struct { - Writer *syslog.Writer - SyslogNetwork string - SyslogRaddr string -} - -// Creates a hook to be added to an instance of logger. This is called with -// `hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_DEBUG, "")` -// `if err == nil { log.Hooks.Add(hook) }` -func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error) { - w, err := syslog.Dial(network, raddr, priority, tag) - return &SyslogHook{w, network, raddr}, err -} - -func (hook *SyslogHook) Fire(entry *logrus.Entry) error { - line, err := entry.String() - if err != nil { - fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err) - return err - } - - switch entry.Level { - case logrus.PanicLevel: - return hook.Writer.Crit(line) - case logrus.FatalLevel: - return hook.Writer.Crit(line) - case logrus.ErrorLevel: - return hook.Writer.Err(line) - case logrus.WarnLevel: - return hook.Writer.Warning(line) - case logrus.InfoLevel: - return hook.Writer.Info(line) - case logrus.DebugLevel: - return hook.Writer.Debug(line) - default: - return nil - } -} - -func (hook *SyslogHook) Levels() []logrus.Level { - return logrus.AllLevels -} diff --git a/vendor/github.com/sirupsen/logrus/hooks/test/test.go b/vendor/github.com/sirupsen/logrus/hooks/test/test.go deleted file mode 100644 index 62c4845df..000000000 --- a/vendor/github.com/sirupsen/logrus/hooks/test/test.go +++ /dev/null @@ -1,95 +0,0 @@ -// The Test package is used for testing logrus. It is here for backwards -// compatibility from when logrus' organization was upper-case. Please use -// lower-case logrus and the `null` package instead of this one. -package test - -import ( - "io/ioutil" - "sync" - - "github.com/sirupsen/logrus" -) - -// Hook is a hook designed for dealing with logs in test scenarios. -type Hook struct { - // Entries is an array of all entries that have been received by this hook. - // For safe access, use the AllEntries() method, rather than reading this - // value directly. - Entries []*logrus.Entry - mu sync.RWMutex -} - -// NewGlobal installs a test hook for the global logger. -func NewGlobal() *Hook { - - hook := new(Hook) - logrus.AddHook(hook) - - return hook - -} - -// NewLocal installs a test hook for a given local logger. -func NewLocal(logger *logrus.Logger) *Hook { - - hook := new(Hook) - logger.Hooks.Add(hook) - - return hook - -} - -// NewNullLogger creates a discarding logger and installs the test hook. -func NewNullLogger() (*logrus.Logger, *Hook) { - - logger := logrus.New() - logger.Out = ioutil.Discard - - return logger, NewLocal(logger) - -} - -func (t *Hook) Fire(e *logrus.Entry) error { - t.mu.Lock() - defer t.mu.Unlock() - t.Entries = append(t.Entries, e) - return nil -} - -func (t *Hook) Levels() []logrus.Level { - return logrus.AllLevels -} - -// LastEntry returns the last entry that was logged or nil. -func (t *Hook) LastEntry() *logrus.Entry { - t.mu.RLock() - defer t.mu.RUnlock() - i := len(t.Entries) - 1 - if i < 0 { - return nil - } - // Make a copy, for safety - e := *t.Entries[i] - return &e -} - -// AllEntries returns all entries that were logged. -func (t *Hook) AllEntries() []*logrus.Entry { - t.mu.RLock() - defer t.mu.RUnlock() - // Make a copy so the returned value won't race with future log requests - entries := make([]*logrus.Entry, len(t.Entries)) - for i, entry := range t.Entries { - // Make a copy, for safety - e := *entry - entries[i] = &e - } - return entries -} - -// Reset removes all Entries from this test hook. -func (t *Hook) Reset() { - t.mu.Lock() - defer t.mu.Unlock() - t.Entries = make([]*logrus.Entry, 0) -} diff --git a/vendor/github.com/sirupsen/logrus/json_formatter.go b/vendor/github.com/sirupsen/logrus/json_formatter.go deleted file mode 100644 index fb01c1b10..000000000 --- a/vendor/github.com/sirupsen/logrus/json_formatter.go +++ /dev/null @@ -1,79 +0,0 @@ -package logrus - -import ( - "encoding/json" - "fmt" -) - -type fieldKey string - -// FieldMap allows customization of the key names for default fields. -type FieldMap map[fieldKey]string - -// Default key names for the default fields -const ( - FieldKeyMsg = "msg" - FieldKeyLevel = "level" - FieldKeyTime = "time" -) - -func (f FieldMap) resolve(key fieldKey) string { - if k, ok := f[key]; ok { - return k - } - - return string(key) -} - -// JSONFormatter formats logs into parsable json -type JSONFormatter struct { - // TimestampFormat sets the format used for marshaling timestamps. - TimestampFormat string - - // DisableTimestamp allows disabling automatic timestamps in output - DisableTimestamp bool - - // FieldMap allows users to customize the names of keys for default fields. - // As an example: - // formatter := &JSONFormatter{ - // FieldMap: FieldMap{ - // FieldKeyTime: "@timestamp", - // FieldKeyLevel: "@level", - // FieldKeyMsg: "@message", - // }, - // } - FieldMap FieldMap -} - -// Format renders a single log entry -func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { - data := make(Fields, len(entry.Data)+3) - for k, v := range entry.Data { - switch v := v.(type) { - case error: - // Otherwise errors are ignored by `encoding/json` - // https://github.com/sirupsen/logrus/issues/137 - data[k] = v.Error() - default: - data[k] = v - } - } - prefixFieldClashes(data) - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - - if !f.DisableTimestamp { - data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat) - } - data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message - data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String() - - serialized, err := json.Marshal(data) - if err != nil { - return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err) - } - return append(serialized, '\n'), nil -} diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go deleted file mode 100644 index fdaf8a653..000000000 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ /dev/null @@ -1,323 +0,0 @@ -package logrus - -import ( - "io" - "os" - "sync" - "sync/atomic" -) - -type Logger struct { - // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a - // file, or leave it default which is `os.Stderr`. You can also set this to - // something more adventorous, such as logging to Kafka. - Out io.Writer - // Hooks for the logger instance. These allow firing events based on logging - // levels and log entries. For example, to send errors to an error tracking - // service, log to StatsD or dump the core on fatal errors. - Hooks LevelHooks - // All log entries pass through the formatter before logged to Out. The - // included formatters are `TextFormatter` and `JSONFormatter` for which - // TextFormatter is the default. In development (when a TTY is attached) it - // logs with colors, but to a file it wouldn't. You can easily implement your - // own that implements the `Formatter` interface, see the `README` or included - // formatters for examples. - Formatter Formatter - // The logging level the logger should log at. This is typically (and defaults - // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be - // logged. - Level Level - // Used to sync writing to the log. Locking is enabled by Default - mu MutexWrap - // Reusable empty entry - entryPool sync.Pool -} - -type MutexWrap struct { - lock sync.Mutex - disabled bool -} - -func (mw *MutexWrap) Lock() { - if !mw.disabled { - mw.lock.Lock() - } -} - -func (mw *MutexWrap) Unlock() { - if !mw.disabled { - mw.lock.Unlock() - } -} - -func (mw *MutexWrap) Disable() { - mw.disabled = true -} - -// Creates a new logger. Configuration should be set by changing `Formatter`, -// `Out` and `Hooks` directly on the default logger instance. You can also just -// instantiate your own: -// -// var log = &Logger{ -// Out: os.Stderr, -// Formatter: new(JSONFormatter), -// Hooks: make(LevelHooks), -// Level: logrus.DebugLevel, -// } -// -// It's recommended to make this a global instance called `log`. -func New() *Logger { - return &Logger{ - Out: os.Stderr, - Formatter: new(TextFormatter), - Hooks: make(LevelHooks), - Level: InfoLevel, - } -} - -func (logger *Logger) newEntry() *Entry { - entry, ok := logger.entryPool.Get().(*Entry) - if ok { - return entry - } - return NewEntry(logger) -} - -func (logger *Logger) releaseEntry(entry *Entry) { - logger.entryPool.Put(entry) -} - -// Adds a field to the log entry, note that it doesn't log until you call -// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry. -// If you want multiple fields, use `WithFields`. -func (logger *Logger) WithField(key string, value interface{}) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithField(key, value) -} - -// Adds a struct of fields to the log entry. All it does is call `WithField` for -// each `Field`. -func (logger *Logger) WithFields(fields Fields) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithFields(fields) -} - -// Add an error as single field to the log entry. All it does is call -// `WithError` for the given `error`. -func (logger *Logger) WithError(err error) *Entry { - entry := logger.newEntry() - defer logger.releaseEntry(entry) - return entry.WithError(err) -} - -func (logger *Logger) Debugf(format string, args ...interface{}) { - if logger.level() >= DebugLevel { - entry := logger.newEntry() - entry.Debugf(format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Infof(format string, args ...interface{}) { - if logger.level() >= InfoLevel { - entry := logger.newEntry() - entry.Infof(format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Printf(format string, args ...interface{}) { - entry := logger.newEntry() - entry.Printf(format, args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warnf(format string, args ...interface{}) { - if logger.level() >= WarnLevel { - entry := logger.newEntry() - entry.Warnf(format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Warningf(format string, args ...interface{}) { - if logger.level() >= WarnLevel { - entry := logger.newEntry() - entry.Warnf(format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Errorf(format string, args ...interface{}) { - if logger.level() >= ErrorLevel { - entry := logger.newEntry() - entry.Errorf(format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Fatalf(format string, args ...interface{}) { - if logger.level() >= FatalLevel { - entry := logger.newEntry() - entry.Fatalf(format, args...) - logger.releaseEntry(entry) - } - Exit(1) -} - -func (logger *Logger) Panicf(format string, args ...interface{}) { - if logger.level() >= PanicLevel { - entry := logger.newEntry() - entry.Panicf(format, args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Debug(args ...interface{}) { - if logger.level() >= DebugLevel { - entry := logger.newEntry() - entry.Debug(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Info(args ...interface{}) { - if logger.level() >= InfoLevel { - entry := logger.newEntry() - entry.Info(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Print(args ...interface{}) { - entry := logger.newEntry() - entry.Info(args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warn(args ...interface{}) { - if logger.level() >= WarnLevel { - entry := logger.newEntry() - entry.Warn(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Warning(args ...interface{}) { - if logger.level() >= WarnLevel { - entry := logger.newEntry() - entry.Warn(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Error(args ...interface{}) { - if logger.level() >= ErrorLevel { - entry := logger.newEntry() - entry.Error(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Fatal(args ...interface{}) { - if logger.level() >= FatalLevel { - entry := logger.newEntry() - entry.Fatal(args...) - logger.releaseEntry(entry) - } - Exit(1) -} - -func (logger *Logger) Panic(args ...interface{}) { - if logger.level() >= PanicLevel { - entry := logger.newEntry() - entry.Panic(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Debugln(args ...interface{}) { - if logger.level() >= DebugLevel { - entry := logger.newEntry() - entry.Debugln(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Infoln(args ...interface{}) { - if logger.level() >= InfoLevel { - entry := logger.newEntry() - entry.Infoln(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Println(args ...interface{}) { - entry := logger.newEntry() - entry.Println(args...) - logger.releaseEntry(entry) -} - -func (logger *Logger) Warnln(args ...interface{}) { - if logger.level() >= WarnLevel { - entry := logger.newEntry() - entry.Warnln(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Warningln(args ...interface{}) { - if logger.level() >= WarnLevel { - entry := logger.newEntry() - entry.Warnln(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Errorln(args ...interface{}) { - if logger.level() >= ErrorLevel { - entry := logger.newEntry() - entry.Errorln(args...) - logger.releaseEntry(entry) - } -} - -func (logger *Logger) Fatalln(args ...interface{}) { - if logger.level() >= FatalLevel { - entry := logger.newEntry() - entry.Fatalln(args...) - logger.releaseEntry(entry) - } - Exit(1) -} - -func (logger *Logger) Panicln(args ...interface{}) { - if logger.level() >= PanicLevel { - entry := logger.newEntry() - entry.Panicln(args...) - logger.releaseEntry(entry) - } -} - -//When file is opened with appending mode, it's safe to -//write concurrently to a file (within 4k message on Linux). -//In these cases user can choose to disable the lock. -func (logger *Logger) SetNoLock() { - logger.mu.Disable() -} - -func (logger *Logger) level() Level { - return Level(atomic.LoadUint32((*uint32)(&logger.Level))) -} - -func (logger *Logger) SetLevel(level Level) { - atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) -} - -func (logger *Logger) AddHook(hook Hook) { - logger.mu.Lock() - defer logger.mu.Unlock() - logger.Hooks.Add(hook) -} diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go deleted file mode 100644 index dd3899974..000000000 --- a/vendor/github.com/sirupsen/logrus/logrus.go +++ /dev/null @@ -1,143 +0,0 @@ -package logrus - -import ( - "fmt" - "log" - "strings" -) - -// Fields type, used to pass to `WithFields`. -type Fields map[string]interface{} - -// Level type -type Level uint32 - -// Convert the Level to a string. E.g. PanicLevel becomes "panic". -func (level Level) String() string { - switch level { - case DebugLevel: - return "debug" - case InfoLevel: - return "info" - case WarnLevel: - return "warning" - case ErrorLevel: - return "error" - case FatalLevel: - return "fatal" - case PanicLevel: - return "panic" - } - - return "unknown" -} - -// ParseLevel takes a string level and returns the Logrus log level constant. -func ParseLevel(lvl string) (Level, error) { - switch strings.ToLower(lvl) { - case "panic": - return PanicLevel, nil - case "fatal": - return FatalLevel, nil - case "error": - return ErrorLevel, nil - case "warn", "warning": - return WarnLevel, nil - case "info": - return InfoLevel, nil - case "debug": - return DebugLevel, nil - } - - var l Level - return l, fmt.Errorf("not a valid logrus Level: %q", lvl) -} - -// A constant exposing all logging levels -var AllLevels = []Level{ - PanicLevel, - FatalLevel, - ErrorLevel, - WarnLevel, - InfoLevel, - DebugLevel, -} - -// These are the different logging levels. You can set the logging level to log -// on your instance of logger, obtained with `logrus.New()`. -const ( - // PanicLevel level, highest level of severity. Logs and then calls panic with the - // message passed to Debug, Info, ... - PanicLevel Level = iota - // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the - // logging level is set to Panic. - FatalLevel - // ErrorLevel level. Logs. Used for errors that should definitely be noted. - // Commonly used for hooks to send errors to an error tracking service. - ErrorLevel - // WarnLevel level. Non-critical entries that deserve eyes. - WarnLevel - // InfoLevel level. General operational entries about what's going on inside the - // application. - InfoLevel - // DebugLevel level. Usually only enabled when debugging. Very verbose logging. - DebugLevel -) - -// Won't compile if StdLogger can't be realized by a log.Logger -var ( - _ StdLogger = &log.Logger{} - _ StdLogger = &Entry{} - _ StdLogger = &Logger{} -) - -// StdLogger is what your logrus-enabled library should take, that way -// it'll accept a stdlib logger and a logrus logger. There's no standard -// interface, this is the closest we get, unfortunately. -type StdLogger interface { - Print(...interface{}) - Printf(string, ...interface{}) - Println(...interface{}) - - Fatal(...interface{}) - Fatalf(string, ...interface{}) - Fatalln(...interface{}) - - Panic(...interface{}) - Panicf(string, ...interface{}) - Panicln(...interface{}) -} - -// The FieldLogger interface generalizes the Entry and Logger types -type FieldLogger interface { - WithField(key string, value interface{}) *Entry - WithFields(fields Fields) *Entry - WithError(err error) *Entry - - Debugf(format string, args ...interface{}) - Infof(format string, args ...interface{}) - Printf(format string, args ...interface{}) - Warnf(format string, args ...interface{}) - Warningf(format string, args ...interface{}) - Errorf(format string, args ...interface{}) - Fatalf(format string, args ...interface{}) - Panicf(format string, args ...interface{}) - - Debug(args ...interface{}) - Info(args ...interface{}) - Print(args ...interface{}) - Warn(args ...interface{}) - Warning(args ...interface{}) - Error(args ...interface{}) - Fatal(args ...interface{}) - Panic(args ...interface{}) - - Debugln(args ...interface{}) - Infoln(args ...interface{}) - Println(args ...interface{}) - Warnln(args ...interface{}) - Warningln(args ...interface{}) - Errorln(args ...interface{}) - Fatalln(args ...interface{}) - Panicln(args ...interface{}) -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_bsd.go deleted file mode 100644 index d7b3893f3..000000000 --- a/vendor/github.com/sirupsen/logrus/terminal_bsd.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build darwin freebsd openbsd netbsd dragonfly -// +build !appengine - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TIOCGETA - -type Termios unix.Termios diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go deleted file mode 100644 index 2403de981..000000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build appengine - -package logrus - -import ( - "io" -) - -func checkIfTerminal(w io.Writer) bool { - return true -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go deleted file mode 100644 index 116bcb4e3..000000000 --- a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !appengine - -package logrus - -import ( - "io" - "os" - - "golang.org/x/crypto/ssh/terminal" -) - -func checkIfTerminal(w io.Writer) bool { - switch v := w.(type) { - case *os.File: - return terminal.IsTerminal(int(v.Fd())) - default: - return false - } -} diff --git a/vendor/github.com/sirupsen/logrus/terminal_linux.go b/vendor/github.com/sirupsen/logrus/terminal_linux.go deleted file mode 100644 index 88d7298e2..000000000 --- a/vendor/github.com/sirupsen/logrus/terminal_linux.go +++ /dev/null @@ -1,14 +0,0 @@ -// Based on ssh/terminal: -// 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 !appengine - -package logrus - -import "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TCGETS - -type Termios unix.Termios diff --git a/vendor/github.com/sirupsen/logrus/text_formatter.go b/vendor/github.com/sirupsen/logrus/text_formatter.go deleted file mode 100644 index 61b21caea..000000000 --- a/vendor/github.com/sirupsen/logrus/text_formatter.go +++ /dev/null @@ -1,178 +0,0 @@ -package logrus - -import ( - "bytes" - "fmt" - "sort" - "strings" - "sync" - "time" -) - -const ( - nocolor = 0 - red = 31 - green = 32 - yellow = 33 - blue = 36 - gray = 37 -) - -var ( - baseTimestamp time.Time -) - -func init() { - baseTimestamp = time.Now() -} - -// TextFormatter formats logs into text -type TextFormatter struct { - // Set to true to bypass checking for a TTY before outputting colors. - ForceColors bool - - // Force disabling colors. - DisableColors bool - - // Disable timestamp logging. useful when output is redirected to logging - // system that already adds timestamps. - DisableTimestamp bool - - // Enable logging the full timestamp when a TTY is attached instead of just - // the time passed since beginning of execution. - FullTimestamp bool - - // TimestampFormat to use for display when a full timestamp is printed - TimestampFormat string - - // The fields are sorted by default for a consistent output. For applications - // that log extremely frequently and don't use the JSON formatter this may not - // be desired. - DisableSorting bool - - // QuoteEmptyFields will wrap empty fields in quotes if true - QuoteEmptyFields bool - - // Whether the logger's out is to a terminal - isTerminal bool - - sync.Once -} - -func (f *TextFormatter) init(entry *Entry) { - if entry.Logger != nil { - f.isTerminal = checkIfTerminal(entry.Logger.Out) - } -} - -// Format renders a single log entry -func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { - var b *bytes.Buffer - keys := make([]string, 0, len(entry.Data)) - for k := range entry.Data { - keys = append(keys, k) - } - - if !f.DisableSorting { - sort.Strings(keys) - } - if entry.Buffer != nil { - b = entry.Buffer - } else { - b = &bytes.Buffer{} - } - - prefixFieldClashes(entry.Data) - - f.Do(func() { f.init(entry) }) - - isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors - - timestampFormat := f.TimestampFormat - if timestampFormat == "" { - timestampFormat = defaultTimestampFormat - } - if isColored { - f.printColored(b, entry, keys, timestampFormat) - } else { - if !f.DisableTimestamp { - f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat)) - } - f.appendKeyValue(b, "level", entry.Level.String()) - if entry.Message != "" { - f.appendKeyValue(b, "msg", entry.Message) - } - for _, key := range keys { - f.appendKeyValue(b, key, entry.Data[key]) - } - } - - b.WriteByte('\n') - return b.Bytes(), nil -} - -func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) { - var levelColor int - switch entry.Level { - case DebugLevel: - levelColor = gray - case WarnLevel: - levelColor = yellow - case ErrorLevel, FatalLevel, PanicLevel: - levelColor = red - default: - levelColor = blue - } - - levelText := strings.ToUpper(entry.Level.String())[0:4] - - if f.DisableTimestamp { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message) - } else if !f.FullTimestamp { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message) - } else { - fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message) - } - for _, k := range keys { - v := entry.Data[k] - fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k) - f.appendValue(b, v) - } -} - -func (f *TextFormatter) needsQuoting(text string) bool { - if f.QuoteEmptyFields && len(text) == 0 { - return true - } - for _, ch := range text { - if !((ch >= 'a' && ch <= 'z') || - (ch >= 'A' && ch <= 'Z') || - (ch >= '0' && ch <= '9') || - ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') { - return true - } - } - return false -} - -func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) { - if b.Len() > 0 { - b.WriteByte(' ') - } - b.WriteString(key) - b.WriteByte('=') - f.appendValue(b, value) -} - -func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) { - stringVal, ok := value.(string) - if !ok { - stringVal = fmt.Sprint(value) - } - - if !f.needsQuoting(stringVal) { - b.WriteString(stringVal) - } else { - b.WriteString(fmt.Sprintf("%q", stringVal)) - } -} diff --git a/vendor/github.com/sirupsen/logrus/writer.go b/vendor/github.com/sirupsen/logrus/writer.go deleted file mode 100644 index 7bdebedc6..000000000 --- a/vendor/github.com/sirupsen/logrus/writer.go +++ /dev/null @@ -1,62 +0,0 @@ -package logrus - -import ( - "bufio" - "io" - "runtime" -) - -func (logger *Logger) Writer() *io.PipeWriter { - return logger.WriterLevel(InfoLevel) -} - -func (logger *Logger) WriterLevel(level Level) *io.PipeWriter { - return NewEntry(logger).WriterLevel(level) -} - -func (entry *Entry) Writer() *io.PipeWriter { - return entry.WriterLevel(InfoLevel) -} - -func (entry *Entry) WriterLevel(level Level) *io.PipeWriter { - reader, writer := io.Pipe() - - var printFunc func(args ...interface{}) - - switch level { - case DebugLevel: - printFunc = entry.Debug - case InfoLevel: - printFunc = entry.Info - case WarnLevel: - printFunc = entry.Warn - case ErrorLevel: - printFunc = entry.Error - case FatalLevel: - printFunc = entry.Fatal - case PanicLevel: - printFunc = entry.Panic - default: - printFunc = entry.Print - } - - go entry.writerScanner(reader, printFunc) - runtime.SetFinalizer(writer, writerFinalizer) - - return writer -} - -func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) { - scanner := bufio.NewScanner(reader) - for scanner.Scan() { - printFunc(scanner.Text()) - } - if err := scanner.Err(); err != nil { - entry.Errorf("Error while reading from Writer: %s", err) - } - reader.Close() -} - -func writerFinalizer(writer *io.PipeWriter) { - writer.Close() -} diff --git a/vendor/github.com/stathat/go/LICENSE b/vendor/github.com/stathat/go/LICENSE deleted file mode 100644 index 814c09c66..000000000 --- a/vendor/github.com/stathat/go/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2012 Numerotron 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/github.com/stathat/go/stathat.go b/vendor/github.com/stathat/go/stathat.go deleted file mode 100644 index fa001b23f..000000000 --- a/vendor/github.com/stathat/go/stathat.go +++ /dev/null @@ -1,605 +0,0 @@ -// Copyright (C) 2012 Numerotron Inc. -// Use of this source code is governed by an MIT-style license -// that can be found in the LICENSE file. - -// Copyright 2012 Numerotron Inc. -// Use of this source code is governed by an MIT-style license -// that can be found in the LICENSE file. -// -// Developed at www.stathat.com by Patrick Crosby -// Contact us on twitter with any questions: twitter.com/stat_hat - -// The stathat package makes it easy to post any values to your StatHat -// account. -package stathat - -import ( - "fmt" - "io" - "io/ioutil" - "log" - "net/http" - "net/url" - "strconv" - "sync" - "time" -) - -const hostname = "api.stathat.com" - -type statKind int - -const ( - _ = iota - kcounter statKind = iota - kvalue -) - -func (sk statKind) classicPath() string { - switch sk { - case kcounter: - return "/c" - case kvalue: - return "/v" - } - return "" -} - -type apiKind int - -const ( - _ = iota - classic apiKind = iota - ez -) - -func (ak apiKind) path(sk statKind) string { - switch ak { - case ez: - return "/ez" - case classic: - return sk.classicPath() - } - return "" -} - -type statReport struct { - StatKey string - UserKey string - Value float64 - Timestamp int64 - statType statKind - apiType apiKind -} - -// Reporter describes an interface for communicating with the StatHat API -type Reporter interface { - PostCount(statKey, userKey string, count int) error - PostCountTime(statKey, userKey string, count int, timestamp int64) error - PostCountOne(statKey, userKey string) error - PostValue(statKey, userKey string, value float64) error - PostValueTime(statKey, userKey string, value float64, timestamp int64) error - PostEZCountOne(statName, ezkey string) error - PostEZCount(statName, ezkey string, count int) error - PostEZCountTime(statName, ezkey string, count int, timestamp int64) error - PostEZValue(statName, ezkey string, value float64) error - PostEZValueTime(statName, ezkey string, value float64, timestamp int64) error - WaitUntilFinished(timeout time.Duration) bool -} - -// BasicReporter is a StatHat client that can report stat values/counts to the servers. -type BasicReporter struct { - reports chan *statReport - done chan bool - client *http.Client - wg *sync.WaitGroup -} - -// NewReporter returns a new Reporter. You must specify the channel bufferSize and the -// goroutine poolSize. You can pass in nil for the transport and it will create an -// http transport with MaxIdleConnsPerHost set to the goroutine poolSize. Note if you -// pass in your own transport, it's a good idea to have its MaxIdleConnsPerHost be set -// to at least the poolSize to allow for effective connection reuse. -func NewReporter(bufferSize, poolSize int, transport http.RoundTripper) Reporter { - r := new(BasicReporter) - if transport == nil { - transport = &http.Transport{ - // Allow for an idle connection per goroutine. - MaxIdleConnsPerHost: poolSize, - } - } - r.client = &http.Client{Transport: transport} - r.reports = make(chan *statReport, bufferSize) - r.done = make(chan bool) - r.wg = new(sync.WaitGroup) - for i := 0; i < poolSize; i++ { - r.wg.Add(1) - go r.processReports() - } - return r -} - -type statCache struct { - counterStats map[string]int - valueStats map[string][]float64 -} - -func (sc *statCache) AverageValue(statName string) float64 { - total := 0.0 - values := sc.valueStats[statName] - if len(values) == 0 { - return total - } - for _, value := range values { - total += value - } - return total / float64(len(values)) -} - -// BatchReporter wraps an existing Reporter in order to implement sending stats -// to the StatHat server in batch. The flow is only available for the EZ API. -// The following describes how stats are sent: -// 1.) PostEZCountOne is called and adds the stat request to a queue. -// 2.) PostEZCountOne is called again on the same stat, the value in the queue is incremented. -// 3.) After batchInterval amount of time, all stat requests from the queue are -// sent to the server. -type BatchReporter struct { - sync.Mutex - r Reporter - batchInterval time.Duration - caches map[string]*statCache - shutdownBatchCh chan struct{} -} - -// DefaultReporter is the default instance of *Reporter. -var DefaultReporter = NewReporter(100000, 10, nil) - -var testingEnv = false - -type testPost struct { - url string - values url.Values -} - -var testPostChannel chan *testPost - -// The Verbose flag determines if the package should write verbose output to stdout. -var Verbose = false - -func setTesting() { - testingEnv = true - testPostChannel = make(chan *testPost) -} - -func newEZStatCount(statName, ezkey string, count int) *statReport { - return &statReport{StatKey: statName, - UserKey: ezkey, - Value: float64(count), - statType: kcounter, - apiType: ez} -} - -func newEZStatValue(statName, ezkey string, value float64) *statReport { - return &statReport{StatKey: statName, - UserKey: ezkey, - Value: value, - statType: kvalue, - apiType: ez} -} - -func newClassicStatCount(statKey, userKey string, count int) *statReport { - return &statReport{StatKey: statKey, - UserKey: userKey, - Value: float64(count), - statType: kcounter, - apiType: classic} -} - -func newClassicStatValue(statKey, userKey string, value float64) *statReport { - return &statReport{StatKey: statKey, - UserKey: userKey, - Value: value, - statType: kvalue, - apiType: classic} -} - -func (sr *statReport) values() url.Values { - switch sr.apiType { - case ez: - return sr.ezValues() - case classic: - return sr.classicValues() - } - - return nil -} - -func (sr *statReport) ezValues() url.Values { - switch sr.statType { - case kcounter: - return sr.ezCounterValues() - case kvalue: - return sr.ezValueValues() - } - return nil -} - -func (sr *statReport) classicValues() url.Values { - switch sr.statType { - case kcounter: - return sr.classicCounterValues() - case kvalue: - return sr.classicValueValues() - } - return nil -} - -func (sr *statReport) ezCommonValues() url.Values { - result := make(url.Values) - result.Set("stat", sr.StatKey) - result.Set("ezkey", sr.UserKey) - if sr.Timestamp > 0 { - result.Set("t", sr.timeString()) - } - return result -} - -func (sr *statReport) classicCommonValues() url.Values { - result := make(url.Values) - result.Set("key", sr.StatKey) - result.Set("ukey", sr.UserKey) - if sr.Timestamp > 0 { - result.Set("t", sr.timeString()) - } - return result -} - -func (sr *statReport) ezCounterValues() url.Values { - result := sr.ezCommonValues() - result.Set("count", sr.valueString()) - return result -} - -func (sr *statReport) ezValueValues() url.Values { - result := sr.ezCommonValues() - result.Set("value", sr.valueString()) - return result -} - -func (sr *statReport) classicCounterValues() url.Values { - result := sr.classicCommonValues() - result.Set("count", sr.valueString()) - return result -} - -func (sr *statReport) classicValueValues() url.Values { - result := sr.classicCommonValues() - result.Set("value", sr.valueString()) - return result -} - -func (sr *statReport) valueString() string { - return strconv.FormatFloat(sr.Value, 'g', -1, 64) -} - -func (sr *statReport) timeString() string { - return strconv.FormatInt(sr.Timestamp, 10) -} - -func (sr *statReport) path() string { - return sr.apiType.path(sr.statType) -} - -func (sr *statReport) url() string { - return fmt.Sprintf("https://%s%s", hostname, sr.path()) -} - -// Using the classic API, posts a count to a stat using DefaultReporter. -func PostCount(statKey, userKey string, count int) error { - return DefaultReporter.PostCount(statKey, userKey, count) -} - -// Using the classic API, posts a count to a stat using DefaultReporter at a specific -// time. -func PostCountTime(statKey, userKey string, count int, timestamp int64) error { - return DefaultReporter.PostCountTime(statKey, userKey, count, timestamp) -} - -// Using the classic API, posts a count of 1 to a stat using DefaultReporter. -func PostCountOne(statKey, userKey string) error { - return DefaultReporter.PostCountOne(statKey, userKey) -} - -// Using the classic API, posts a value to a stat using DefaultReporter. -func PostValue(statKey, userKey string, value float64) error { - return DefaultReporter.PostValue(statKey, userKey, value) -} - -// Using the classic API, posts a value to a stat at a specific time using DefaultReporter. -func PostValueTime(statKey, userKey string, value float64, timestamp int64) error { - return DefaultReporter.PostValueTime(statKey, userKey, value, timestamp) -} - -// Using the EZ API, posts a count of 1 to a stat using DefaultReporter. -func PostEZCountOne(statName, ezkey string) error { - return DefaultReporter.PostEZCountOne(statName, ezkey) -} - -// Using the EZ API, posts a count to a stat using DefaultReporter. -func PostEZCount(statName, ezkey string, count int) error { - return DefaultReporter.PostEZCount(statName, ezkey, count) -} - -// Using the EZ API, posts a count to a stat at a specific time using DefaultReporter. -func PostEZCountTime(statName, ezkey string, count int, timestamp int64) error { - return DefaultReporter.PostEZCountTime(statName, ezkey, count, timestamp) -} - -// Using the EZ API, posts a value to a stat using DefaultReporter. -func PostEZValue(statName, ezkey string, value float64) error { - return DefaultReporter.PostEZValue(statName, ezkey, value) -} - -// Using the EZ API, posts a value to a stat at a specific time using DefaultReporter. -func PostEZValueTime(statName, ezkey string, value float64, timestamp int64) error { - return DefaultReporter.PostEZValueTime(statName, ezkey, value, timestamp) -} - -// Wait for all stats to be sent, or until timeout. Useful for simple command- -// line apps to defer a call to this in main() -func WaitUntilFinished(timeout time.Duration) bool { - return DefaultReporter.WaitUntilFinished(timeout) -} - -// Using the classic API, posts a count to a stat. -func (r *BasicReporter) PostCount(statKey, userKey string, count int) error { - r.add(newClassicStatCount(statKey, userKey, count)) - return nil -} - -// Using the classic API, posts a count to a stat at a specific time. -func (r *BasicReporter) PostCountTime(statKey, userKey string, count int, timestamp int64) error { - x := newClassicStatCount(statKey, userKey, count) - x.Timestamp = timestamp - r.add(x) - return nil -} - -// Using the classic API, posts a count of 1 to a stat. -func (r *BasicReporter) PostCountOne(statKey, userKey string) error { - return r.PostCount(statKey, userKey, 1) -} - -// Using the classic API, posts a value to a stat. -func (r *BasicReporter) PostValue(statKey, userKey string, value float64) error { - r.add(newClassicStatValue(statKey, userKey, value)) - return nil -} - -// Using the classic API, posts a value to a stat at a specific time. -func (r *BasicReporter) PostValueTime(statKey, userKey string, value float64, timestamp int64) error { - x := newClassicStatValue(statKey, userKey, value) - x.Timestamp = timestamp - r.add(x) - return nil -} - -// Using the EZ API, posts a count of 1 to a stat. -func (r *BasicReporter) PostEZCountOne(statName, ezkey string) error { - return r.PostEZCount(statName, ezkey, 1) -} - -// Using the EZ API, posts a count to a stat. -func (r *BasicReporter) PostEZCount(statName, ezkey string, count int) error { - r.add(newEZStatCount(statName, ezkey, count)) - return nil -} - -// Using the EZ API, posts a count to a stat at a specific time. -func (r *BasicReporter) PostEZCountTime(statName, ezkey string, count int, timestamp int64) error { - x := newEZStatCount(statName, ezkey, count) - x.Timestamp = timestamp - r.add(x) - return nil -} - -// Using the EZ API, posts a value to a stat. -func (r *BasicReporter) PostEZValue(statName, ezkey string, value float64) error { - r.add(newEZStatValue(statName, ezkey, value)) - return nil -} - -// Using the EZ API, posts a value to a stat at a specific time. -func (r *BasicReporter) PostEZValueTime(statName, ezkey string, value float64, timestamp int64) error { - x := newEZStatValue(statName, ezkey, value) - x.Timestamp = timestamp - r.add(x) - return nil -} - -func (r *BasicReporter) processReports() { - for sr := range r.reports { - if Verbose { - log.Printf("posting stat to stathat: %s, %v", sr.url(), sr.values()) - } - - if testingEnv { - if Verbose { - log.Printf("in test mode, putting stat on testPostChannel") - } - testPostChannel <- &testPost{sr.url(), sr.values()} - continue - } - - resp, err := r.client.PostForm(sr.url(), sr.values()) - if err != nil { - log.Printf("error posting stat to stathat: %s", err) - continue - } - - if Verbose { - body, _ := ioutil.ReadAll(resp.Body) - log.Printf("stathat post result: %s", body) - } else { - // Read the body even if we don't intend to use it. Otherwise golang won't pool the connection. - // See also: http://stackoverflow.com/questions/17948827/reusing-http-connections-in-golang/17953506#17953506 - io.Copy(ioutil.Discard, resp.Body) - } - - resp.Body.Close() - } - r.wg.Done() -} - -func (r *BasicReporter) add(rep *statReport) { - select { - case r.reports <- rep: - default: - } -} - -func (r *BasicReporter) finish() { - close(r.reports) - r.wg.Wait() - r.done <- true -} - -// Wait for all stats to be sent, or until timeout. Useful for simple command- -// line apps to defer a call to this in main() -func (r *BasicReporter) WaitUntilFinished(timeout time.Duration) bool { - go r.finish() - select { - case <-r.done: - return true - case <-time.After(timeout): - return false - } -} - -// NewBatchReporter creates a batching stat reporter. The interval parameter -// specifies how often stats should be posted to the StatHat server. -func NewBatchReporter(reporter Reporter, interval time.Duration) Reporter { - - br := &BatchReporter{ - r: reporter, - batchInterval: interval, - caches: make(map[string]*statCache), - shutdownBatchCh: make(chan struct{}), - } - - go br.batchLoop() - - return br -} - -func (br *BatchReporter) getEZCache(ezkey string) *statCache { - var cache *statCache - var ok bool - - // Fetch ezkey cache - if cache, ok = br.caches[ezkey]; !ok { - cache = &statCache{ - counterStats: make(map[string]int), - valueStats: make(map[string][]float64), - } - br.caches[ezkey] = cache - } - - return cache -} - -func (br *BatchReporter) PostEZCount(statName, ezkey string, count int) error { - br.Lock() - defer br.Unlock() - - // Increment stat by count - br.getEZCache(ezkey).counterStats[statName] += count - - return nil -} - -func (br *BatchReporter) PostEZCountOne(statName, ezkey string) error { - return br.PostEZCount(statName, ezkey, 1) -} - -func (br *BatchReporter) PostEZValue(statName, ezkey string, value float64) error { - br.Lock() - defer br.Unlock() - - // Update value cache - cache := br.getEZCache(ezkey) - cache.valueStats[statName] = append(cache.valueStats[statName], value) - - return nil -} - -func (br *BatchReporter) batchPost() { - - // Copy and clear cache - br.Lock() - caches := br.caches - br.caches = make(map[string]*statCache) - br.Unlock() - - // Post stats - for ezkey, cache := range caches { - // Post counters - for statName, count := range cache.counterStats { - br.r.PostEZCount(statName, ezkey, count) - } - - // Post values - for statName := range cache.valueStats { - br.r.PostEZValue(statName, ezkey, cache.AverageValue(statName)) - } - } -} - -func (br *BatchReporter) batchLoop() { - for { - select { - case <-br.shutdownBatchCh: - return - case <-time.After(br.batchInterval): - br.batchPost() - } - } -} - -func (br *BatchReporter) PostCount(statKey, userKey string, count int) error { - return br.r.PostCount(statKey, userKey, count) -} - -func (br *BatchReporter) PostCountTime(statKey, userKey string, count int, timestamp int64) error { - return br.r.PostCountTime(statKey, userKey, count, timestamp) -} - -func (br *BatchReporter) PostCountOne(statKey, userKey string) error { - return br.r.PostCountOne(statKey, userKey) -} - -func (br *BatchReporter) PostValue(statKey, userKey string, value float64) error { - return br.r.PostValue(statKey, userKey, value) -} - -func (br *BatchReporter) PostValueTime(statKey, userKey string, value float64, timestamp int64) error { - return br.r.PostValueTime(statKey, userKey, value, timestamp) -} - -func (br *BatchReporter) PostEZCountTime(statName, ezkey string, count int, timestamp int64) error { - return br.r.PostEZCountTime(statName, ezkey, count, timestamp) -} - -func (br *BatchReporter) PostEZValueTime(statName, ezkey string, value float64, timestamp int64) error { - return br.r.PostEZValueTime(statName, ezkey, value, timestamp) -} - -func (br *BatchReporter) WaitUntilFinished(timeout time.Duration) bool { - // Shut down batch loop - close(br.shutdownBatchCh) - - // One last post - br.batchPost() - - return br.r.WaitUntilFinished(timeout) -} diff --git a/vendor/github.com/syncthing/notify/.gitignore b/vendor/github.com/syncthing/notify/.gitignore new file mode 100644 index 000000000..32c6eb987 --- /dev/null +++ b/vendor/github.com/syncthing/notify/.gitignore @@ -0,0 +1,92 @@ +# Created by https://www.gitignore.io + +### OSX ### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Windows ### +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### Linux ### +*~ + +# KDE directory preferences +.directory + + +### Go ### +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + + +### vim ### +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist +*~ + +### JetBrains files ### +.idea/ +*.iml \ No newline at end of file diff --git a/vendor/github.com/syncthing/notify/.travis.yml b/vendor/github.com/syncthing/notify/.travis.yml new file mode 100644 index 000000000..720f6613c --- /dev/null +++ b/vendor/github.com/syncthing/notify/.travis.yml @@ -0,0 +1,32 @@ +language: go + +go: + - 1.10.x + - 1.11.x + - master + +os: + - linux + - osx + +matrix: + include: + - os: osx + go: 1.7.5 + env: + - GOFLAGS="-tags kqueue" + allow_failures: + - go: tip + +env: + global: + - GOBIN=$HOME/bin + - PATH=$HOME/bin:$PATH + +install: + - go get -t -v ./... + +script: + - "(go version | grep -q 1.4) || go tool vet -all ." + - go install $GOFLAGS ./... + - go test -v -timeout 60s -race $GOFLAGS ./... diff --git a/vendor/github.com/syncthing/notify/AUTHORS b/vendor/github.com/syncthing/notify/AUTHORS new file mode 100644 index 000000000..9262eae69 --- /dev/null +++ b/vendor/github.com/syncthing/notify/AUTHORS @@ -0,0 +1,10 @@ +# List of individuals who contributed to the Notify package. +# +# The up-to-date list of the authors one may obtain with: +# +# ~ $ git shortlog -es | cut -f2 | rev | uniq -f1 | rev +# + +Pawel Blaszczyk +Pawel Knap +Rafal Jeczalik diff --git a/vendor/github.com/syncthing/notify/README.md b/vendor/github.com/syncthing/notify/README.md new file mode 100644 index 000000000..ad743b2a2 --- /dev/null +++ b/vendor/github.com/syncthing/notify/README.md @@ -0,0 +1,22 @@ +notify [![GoDoc](https://godoc.org/github.com/rjeczalik/notify?status.svg)](https://godoc.org/github.com/rjeczalik/notify) [![Build Status](https://img.shields.io/travis/rjeczalik/notify/master.svg)](https://travis-ci.org/rjeczalik/notify "inotify + FSEvents + kqueue") [![Build status](https://img.shields.io/appveyor/ci/rjeczalik/notify-246.svg)](https://ci.appveyor.com/project/rjeczalik/notify-246 "ReadDirectoryChangesW") [![Coverage Status](https://img.shields.io/coveralls/rjeczalik/notify/master.svg)](https://coveralls.io/r/rjeczalik/notify?branch=master) +====== + +Filesystem event notification library on steroids. (under active development) + +*Documentation* + +[godoc.org/github.com/rjeczalik/notify](https://godoc.org/github.com/rjeczalik/notify) + +*Installation* + +``` +~ $ go get -u github.com/rjeczalik/notify +``` + +*Projects using notify* + +- [github.com/rjeczalik/cmd/notify](https://godoc.org/github.com/rjeczalik/cmd/notify) +- [github.com/cortesi/devd](https://github.com/cortesi/devd) +- [github.com/cortesi/modd](https://github.com/cortesi/modd) +- [github.com/syncthing/syncthing-inotify](https://github.com/syncthing/syncthing-inotify) +- [github.com/OrlovEvgeny/TinyJPG](https://github.com/OrlovEvgeny/TinyJPG) diff --git a/vendor/github.com/syncthing/notify/appveyor.yml b/vendor/github.com/syncthing/notify/appveyor.yml new file mode 100644 index 000000000..a0bdc37a3 --- /dev/null +++ b/vendor/github.com/syncthing/notify/appveyor.yml @@ -0,0 +1,27 @@ +version: "{build}" + +os: Windows Server 2012 R2 + +clone_folder: c:\projects\src\github.com\rjeczalik\notify + +environment: + PATH: c:\projects\bin;%PATH% + GOPATH: c:\projects + NOTIFY_TIMEOUT: 10s + GOVERSION: 1.10.3 + +install: + - rmdir c:\go /s /q + - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip + - 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL + + - cd %APPVEYOR_BUILD_FOLDER% + - go version + +build_script: + - go build ./... + - go test -v -timeout 120s -race ./... + +test: off + +deploy: off diff --git a/vendor/github.com/syncthing/notify/go.mod b/vendor/github.com/syncthing/notify/go.mod new file mode 100644 index 000000000..68df5f7b6 --- /dev/null +++ b/vendor/github.com/syncthing/notify/go.mod @@ -0,0 +1,3 @@ +module github.com/syncthing/notify + +require golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7 diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/LICENSE b/vendor/github.com/syndtr/goleveldb/LICENSE similarity index 100% rename from vendor/github.com/syndtr/goleveldb/leveldb/LICENSE rename to vendor/github.com/syndtr/goleveldb/LICENSE diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/db.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/db.go deleted file mode 100644 index ec3f177a1..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/db.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package testutil - -import ( - "fmt" - "math/rand" - - . "github.com/onsi/gomega" - - "github.com/syndtr/goleveldb/leveldb/errors" - "github.com/syndtr/goleveldb/leveldb/iterator" - "github.com/syndtr/goleveldb/leveldb/util" -) - -type DB interface{} - -type Put interface { - TestPut(key []byte, value []byte) error -} - -type Delete interface { - TestDelete(key []byte) error -} - -type Find interface { - TestFind(key []byte) (rkey, rvalue []byte, err error) -} - -type Get interface { - TestGet(key []byte) (value []byte, err error) -} - -type Has interface { - TestHas(key []byte) (ret bool, err error) -} - -type NewIterator interface { - TestNewIterator(slice *util.Range) iterator.Iterator -} - -type DBAct int - -func (a DBAct) String() string { - switch a { - case DBNone: - return "none" - case DBPut: - return "put" - case DBOverwrite: - return "overwrite" - case DBDelete: - return "delete" - case DBDeleteNA: - return "delete_na" - } - return "unknown" -} - -const ( - DBNone DBAct = iota - DBPut - DBOverwrite - DBDelete - DBDeleteNA -) - -type DBTesting struct { - Rand *rand.Rand - DB interface { - Get - Put - Delete - } - PostFn func(t *DBTesting) - Deleted, Present KeyValue - Act, LastAct DBAct - ActKey, LastActKey []byte -} - -func (t *DBTesting) post() { - if t.PostFn != nil { - t.PostFn(t) - } -} - -func (t *DBTesting) setAct(act DBAct, key []byte) { - t.LastAct, t.Act = t.Act, act - t.LastActKey, t.ActKey = t.ActKey, key -} - -func (t *DBTesting) text() string { - return fmt.Sprintf("last action was <%v> %q, <%v> %q", t.LastAct, t.LastActKey, t.Act, t.ActKey) -} - -func (t *DBTesting) Text() string { - return "DBTesting " + t.text() -} - -func (t *DBTesting) TestPresentKV(key, value []byte) { - rvalue, err := t.DB.TestGet(key) - Expect(err).ShouldNot(HaveOccurred(), "Get on key %q, %s", key, t.text()) - Expect(rvalue).Should(Equal(value), "Value for key %q, %s", key, t.text()) -} - -func (t *DBTesting) TestAllPresent() { - t.Present.IterateShuffled(t.Rand, func(i int, key, value []byte) { - t.TestPresentKV(key, value) - }) -} - -func (t *DBTesting) TestDeletedKey(key []byte) { - _, err := t.DB.TestGet(key) - Expect(err).Should(Equal(errors.ErrNotFound), "Get on deleted key %q, %s", key, t.text()) -} - -func (t *DBTesting) TestAllDeleted() { - t.Deleted.IterateShuffled(t.Rand, func(i int, key, value []byte) { - t.TestDeletedKey(key) - }) -} - -func (t *DBTesting) TestAll() { - dn := t.Deleted.Len() - pn := t.Present.Len() - ShuffledIndex(t.Rand, dn+pn, 1, func(i int) { - if i >= dn { - key, value := t.Present.Index(i - dn) - t.TestPresentKV(key, value) - } else { - t.TestDeletedKey(t.Deleted.KeyAt(i)) - } - }) -} - -func (t *DBTesting) Put(key, value []byte) { - if new := t.Present.PutU(key, value); new { - t.setAct(DBPut, key) - } else { - t.setAct(DBOverwrite, key) - } - t.Deleted.Delete(key) - err := t.DB.TestPut(key, value) - Expect(err).ShouldNot(HaveOccurred(), t.Text()) - t.TestPresentKV(key, value) - t.post() -} - -func (t *DBTesting) PutRandom() bool { - if t.Deleted.Len() > 0 { - i := t.Rand.Intn(t.Deleted.Len()) - key, value := t.Deleted.Index(i) - t.Put(key, value) - return true - } - return false -} - -func (t *DBTesting) Delete(key []byte) { - if exist, value := t.Present.Delete(key); exist { - t.setAct(DBDelete, key) - t.Deleted.PutU(key, value) - } else { - t.setAct(DBDeleteNA, key) - } - err := t.DB.TestDelete(key) - Expect(err).ShouldNot(HaveOccurred(), t.Text()) - t.TestDeletedKey(key) - t.post() -} - -func (t *DBTesting) DeleteRandom() bool { - if t.Present.Len() > 0 { - i := t.Rand.Intn(t.Present.Len()) - t.Delete(t.Present.KeyAt(i)) - return true - } - return false -} - -func (t *DBTesting) RandomAct(round int) { - for i := 0; i < round; i++ { - if t.Rand.Int()%2 == 0 { - t.PutRandom() - } else { - t.DeleteRandom() - } - } -} - -func DoDBTesting(t *DBTesting) { - if t.Rand == nil { - t.Rand = NewRand() - } - - t.DeleteRandom() - t.PutRandom() - t.DeleteRandom() - t.DeleteRandom() - for i := t.Deleted.Len() / 2; i >= 0; i-- { - t.PutRandom() - } - t.RandomAct((t.Deleted.Len() + t.Present.Len()) * 10) - - // Additional iterator testing - if db, ok := t.DB.(NewIterator); ok { - iter := db.TestNewIterator(nil) - Expect(iter.Error()).NotTo(HaveOccurred()) - - it := IteratorTesting{ - KeyValue: t.Present, - Iter: iter, - } - - DoIteratorTesting(&it) - iter.Release() - } -} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/ginkgo.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/ginkgo.go deleted file mode 100644 index 82f3d0e81..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/ginkgo.go +++ /dev/null @@ -1,21 +0,0 @@ -package testutil - -import ( - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" -) - -func RunSuite(t GinkgoTestingT, name string) { - RunDefer() - - SynchronizedBeforeSuite(func() []byte { - RunDefer("setup") - return nil - }, func(data []byte) {}) - SynchronizedAfterSuite(func() { - RunDefer("teardown") - }, func() {}) - - RegisterFailHandler(Fail) - RunSpecs(t, name) -} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/iter.go deleted file mode 100644 index df6d9db6a..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/iter.go +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package testutil - -import ( - "fmt" - "math/rand" - - . "github.com/onsi/gomega" - - "github.com/syndtr/goleveldb/leveldb/iterator" -) - -type IterAct int - -func (a IterAct) String() string { - switch a { - case IterNone: - return "none" - case IterFirst: - return "first" - case IterLast: - return "last" - case IterPrev: - return "prev" - case IterNext: - return "next" - case IterSeek: - return "seek" - case IterSOI: - return "soi" - case IterEOI: - return "eoi" - } - return "unknown" -} - -const ( - IterNone IterAct = iota - IterFirst - IterLast - IterPrev - IterNext - IterSeek - IterSOI - IterEOI -) - -type IteratorTesting struct { - KeyValue - Iter iterator.Iterator - Rand *rand.Rand - PostFn func(t *IteratorTesting) - Pos int - Act, LastAct IterAct - - once bool -} - -func (t *IteratorTesting) init() { - if !t.once { - t.Pos = -1 - t.once = true - } -} - -func (t *IteratorTesting) post() { - if t.PostFn != nil { - t.PostFn(t) - } -} - -func (t *IteratorTesting) setAct(act IterAct) { - t.LastAct, t.Act = t.Act, act -} - -func (t *IteratorTesting) text() string { - return fmt.Sprintf("at pos %d and last action was <%v> -> <%v>", t.Pos, t.LastAct, t.Act) -} - -func (t *IteratorTesting) Text() string { - return "IteratorTesting is " + t.text() -} - -func (t *IteratorTesting) IsFirst() bool { - t.init() - return t.Len() > 0 && t.Pos == 0 -} - -func (t *IteratorTesting) IsLast() bool { - t.init() - return t.Len() > 0 && t.Pos == t.Len()-1 -} - -func (t *IteratorTesting) TestKV() { - t.init() - key, value := t.Index(t.Pos) - Expect(t.Iter.Key()).NotTo(BeNil()) - Expect(t.Iter.Key()).Should(Equal(key), "Key is invalid, %s", t.text()) - Expect(t.Iter.Value()).Should(Equal(value), "Value for key %q, %s", key, t.text()) -} - -func (t *IteratorTesting) First() { - t.init() - t.setAct(IterFirst) - - ok := t.Iter.First() - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - if t.Len() > 0 { - t.Pos = 0 - Expect(ok).Should(BeTrue(), t.Text()) - t.TestKV() - } else { - t.Pos = -1 - Expect(ok).ShouldNot(BeTrue(), t.Text()) - } - t.post() -} - -func (t *IteratorTesting) Last() { - t.init() - t.setAct(IterLast) - - ok := t.Iter.Last() - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - if t.Len() > 0 { - t.Pos = t.Len() - 1 - Expect(ok).Should(BeTrue(), t.Text()) - t.TestKV() - } else { - t.Pos = 0 - Expect(ok).ShouldNot(BeTrue(), t.Text()) - } - t.post() -} - -func (t *IteratorTesting) Next() { - t.init() - t.setAct(IterNext) - - ok := t.Iter.Next() - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - if t.Pos < t.Len()-1 { - t.Pos++ - Expect(ok).Should(BeTrue(), t.Text()) - t.TestKV() - } else { - t.Pos = t.Len() - Expect(ok).ShouldNot(BeTrue(), t.Text()) - } - t.post() -} - -func (t *IteratorTesting) Prev() { - t.init() - t.setAct(IterPrev) - - ok := t.Iter.Prev() - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - if t.Pos > 0 { - t.Pos-- - Expect(ok).Should(BeTrue(), t.Text()) - t.TestKV() - } else { - t.Pos = -1 - Expect(ok).ShouldNot(BeTrue(), t.Text()) - } - t.post() -} - -func (t *IteratorTesting) Seek(i int) { - t.init() - t.setAct(IterSeek) - - key, _ := t.Index(i) - oldKey, _ := t.IndexOrNil(t.Pos) - - ok := t.Iter.Seek(key) - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - Expect(ok).Should(BeTrue(), fmt.Sprintf("Seek from key %q to %q, to pos %d, %s", oldKey, key, i, t.text())) - - t.Pos = i - t.TestKV() - t.post() -} - -func (t *IteratorTesting) SeekInexact(i int) { - t.init() - t.setAct(IterSeek) - var key0 []byte - key1, _ := t.Index(i) - if i > 0 { - key0, _ = t.Index(i - 1) - } - key := BytesSeparator(key0, key1) - oldKey, _ := t.IndexOrNil(t.Pos) - - ok := t.Iter.Seek(key) - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - Expect(ok).Should(BeTrue(), fmt.Sprintf("Seek from key %q to %q (%q), to pos %d, %s", oldKey, key, key1, i, t.text())) - - t.Pos = i - t.TestKV() - t.post() -} - -func (t *IteratorTesting) SeekKey(key []byte) { - t.init() - t.setAct(IterSeek) - oldKey, _ := t.IndexOrNil(t.Pos) - i := t.Search(key) - - ok := t.Iter.Seek(key) - Expect(t.Iter.Error()).ShouldNot(HaveOccurred()) - if i < t.Len() { - key_, _ := t.Index(i) - Expect(ok).Should(BeTrue(), fmt.Sprintf("Seek from key %q to %q (%q), to pos %d, %s", oldKey, key, key_, i, t.text())) - t.Pos = i - t.TestKV() - } else { - Expect(ok).ShouldNot(BeTrue(), fmt.Sprintf("Seek from key %q to %q, %s", oldKey, key, t.text())) - } - - t.Pos = i - t.post() -} - -func (t *IteratorTesting) SOI() { - t.init() - t.setAct(IterSOI) - Expect(t.Pos).Should(BeNumerically("<=", 0), t.Text()) - for i := 0; i < 3; i++ { - t.Prev() - } - t.post() -} - -func (t *IteratorTesting) EOI() { - t.init() - t.setAct(IterEOI) - Expect(t.Pos).Should(BeNumerically(">=", t.Len()-1), t.Text()) - for i := 0; i < 3; i++ { - t.Next() - } - t.post() -} - -func (t *IteratorTesting) WalkPrev(fn func(t *IteratorTesting)) { - t.init() - for old := t.Pos; t.Pos > 0; old = t.Pos { - fn(t) - Expect(t.Pos).Should(BeNumerically("<", old), t.Text()) - } -} - -func (t *IteratorTesting) WalkNext(fn func(t *IteratorTesting)) { - t.init() - for old := t.Pos; t.Pos < t.Len()-1; old = t.Pos { - fn(t) - Expect(t.Pos).Should(BeNumerically(">", old), t.Text()) - } -} - -func (t *IteratorTesting) PrevAll() { - t.WalkPrev(func(t *IteratorTesting) { - t.Prev() - }) -} - -func (t *IteratorTesting) NextAll() { - t.WalkNext(func(t *IteratorTesting) { - t.Next() - }) -} - -func DoIteratorTesting(t *IteratorTesting) { - if t.Rand == nil { - t.Rand = NewRand() - } - t.SOI() - t.NextAll() - t.First() - t.SOI() - t.NextAll() - t.EOI() - t.PrevAll() - t.Last() - t.EOI() - t.PrevAll() - t.SOI() - - t.NextAll() - t.PrevAll() - t.NextAll() - t.Last() - t.PrevAll() - t.First() - t.NextAll() - t.EOI() - - ShuffledIndex(t.Rand, t.Len(), 1, func(i int) { - t.Seek(i) - }) - - ShuffledIndex(t.Rand, t.Len(), 1, func(i int) { - t.SeekInexact(i) - }) - - ShuffledIndex(t.Rand, t.Len(), 1, func(i int) { - t.Seek(i) - if i%2 != 0 { - t.PrevAll() - t.SOI() - } else { - t.NextAll() - t.EOI() - } - }) - - for _, key := range []string{"", "foo", "bar", "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"} { - t.SeekKey([]byte(key)) - } -} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/kv.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/kv.go deleted file mode 100644 index 608cbf372..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/kv.go +++ /dev/null @@ -1,352 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package testutil - -import ( - "fmt" - "math/rand" - "sort" - "strings" - - "github.com/syndtr/goleveldb/leveldb/util" -) - -type KeyValueEntry struct { - key, value []byte -} - -type KeyValue struct { - entries []KeyValueEntry - nbytes int -} - -func (kv *KeyValue) Put(key, value []byte) { - if n := len(kv.entries); n > 0 && cmp.Compare(kv.entries[n-1].key, key) >= 0 { - panic(fmt.Sprintf("Put: keys are not in increasing order: %q, %q", kv.entries[n-1].key, key)) - } - kv.entries = append(kv.entries, KeyValueEntry{key, value}) - kv.nbytes += len(key) + len(value) -} - -func (kv *KeyValue) PutString(key, value string) { - kv.Put([]byte(key), []byte(value)) -} - -func (kv *KeyValue) PutU(key, value []byte) bool { - if i, exist := kv.Get(key); !exist { - if i < kv.Len() { - kv.entries = append(kv.entries[:i+1], kv.entries[i:]...) - kv.entries[i] = KeyValueEntry{key, value} - } else { - kv.entries = append(kv.entries, KeyValueEntry{key, value}) - } - kv.nbytes += len(key) + len(value) - return true - } else { - kv.nbytes += len(value) - len(kv.ValueAt(i)) - kv.entries[i].value = value - } - return false -} - -func (kv *KeyValue) PutUString(key, value string) bool { - return kv.PutU([]byte(key), []byte(value)) -} - -func (kv *KeyValue) Delete(key []byte) (exist bool, value []byte) { - i, exist := kv.Get(key) - if exist { - value = kv.entries[i].value - kv.DeleteIndex(i) - } - return -} - -func (kv *KeyValue) DeleteIndex(i int) bool { - if i < kv.Len() { - kv.nbytes -= len(kv.KeyAt(i)) + len(kv.ValueAt(i)) - kv.entries = append(kv.entries[:i], kv.entries[i+1:]...) - return true - } - return false -} - -func (kv KeyValue) Len() int { - return len(kv.entries) -} - -func (kv *KeyValue) Size() int { - return kv.nbytes -} - -func (kv KeyValue) KeyAt(i int) []byte { - return kv.entries[i].key -} - -func (kv KeyValue) ValueAt(i int) []byte { - return kv.entries[i].value -} - -func (kv KeyValue) Index(i int) (key, value []byte) { - if i < 0 || i >= len(kv.entries) { - panic(fmt.Sprintf("Index #%d: out of range", i)) - } - return kv.entries[i].key, kv.entries[i].value -} - -func (kv KeyValue) IndexInexact(i int) (key_, key, value []byte) { - key, value = kv.Index(i) - var key0 []byte - var key1 = kv.KeyAt(i) - if i > 0 { - key0 = kv.KeyAt(i - 1) - } - key_ = BytesSeparator(key0, key1) - return -} - -func (kv KeyValue) IndexOrNil(i int) (key, value []byte) { - if i >= 0 && i < len(kv.entries) { - return kv.entries[i].key, kv.entries[i].value - } - return nil, nil -} - -func (kv KeyValue) IndexString(i int) (key, value string) { - key_, _value := kv.Index(i) - return string(key_), string(_value) -} - -func (kv KeyValue) Search(key []byte) int { - return sort.Search(kv.Len(), func(i int) bool { - return cmp.Compare(kv.KeyAt(i), key) >= 0 - }) -} - -func (kv KeyValue) SearchString(key string) int { - return kv.Search([]byte(key)) -} - -func (kv KeyValue) Get(key []byte) (i int, exist bool) { - i = kv.Search(key) - if i < kv.Len() && cmp.Compare(kv.KeyAt(i), key) == 0 { - exist = true - } - return -} - -func (kv KeyValue) GetString(key string) (i int, exist bool) { - return kv.Get([]byte(key)) -} - -func (kv KeyValue) Iterate(fn func(i int, key, value []byte)) { - for i, x := range kv.entries { - fn(i, x.key, x.value) - } -} - -func (kv KeyValue) IterateString(fn func(i int, key, value string)) { - kv.Iterate(func(i int, key, value []byte) { - fn(i, string(key), string(value)) - }) -} - -func (kv KeyValue) IterateShuffled(rnd *rand.Rand, fn func(i int, key, value []byte)) { - ShuffledIndex(rnd, kv.Len(), 1, func(i int) { - fn(i, kv.entries[i].key, kv.entries[i].value) - }) -} - -func (kv KeyValue) IterateShuffledString(rnd *rand.Rand, fn func(i int, key, value string)) { - kv.IterateShuffled(rnd, func(i int, key, value []byte) { - fn(i, string(key), string(value)) - }) -} - -func (kv KeyValue) IterateInexact(fn func(i int, key_, key, value []byte)) { - for i := range kv.entries { - key_, key, value := kv.IndexInexact(i) - fn(i, key_, key, value) - } -} - -func (kv KeyValue) IterateInexactString(fn func(i int, key_, key, value string)) { - kv.IterateInexact(func(i int, key_, key, value []byte) { - fn(i, string(key_), string(key), string(value)) - }) -} - -func (kv KeyValue) Clone() KeyValue { - return KeyValue{append([]KeyValueEntry{}, kv.entries...), kv.nbytes} -} - -func (kv KeyValue) Slice(start, limit int) KeyValue { - if start < 0 || limit > kv.Len() { - panic(fmt.Sprintf("Slice %d .. %d: out of range", start, limit)) - } else if limit < start { - panic(fmt.Sprintf("Slice %d .. %d: invalid range", start, limit)) - } - return KeyValue{append([]KeyValueEntry{}, kv.entries[start:limit]...), kv.nbytes} -} - -func (kv KeyValue) SliceKey(start, limit []byte) KeyValue { - start_ := 0 - limit_ := kv.Len() - if start != nil { - start_ = kv.Search(start) - } - if limit != nil { - limit_ = kv.Search(limit) - } - return kv.Slice(start_, limit_) -} - -func (kv KeyValue) SliceKeyString(start, limit string) KeyValue { - return kv.SliceKey([]byte(start), []byte(limit)) -} - -func (kv KeyValue) SliceRange(r *util.Range) KeyValue { - if r != nil { - return kv.SliceKey(r.Start, r.Limit) - } - return kv.Clone() -} - -func (kv KeyValue) Range(start, limit int) (r util.Range) { - if kv.Len() > 0 { - if start == kv.Len() { - r.Start = BytesAfter(kv.KeyAt(start - 1)) - } else { - r.Start = kv.KeyAt(start) - } - } - if limit < kv.Len() { - r.Limit = kv.KeyAt(limit) - } - return -} - -func KeyValue_EmptyKey() *KeyValue { - kv := &KeyValue{} - kv.PutString("", "v") - return kv -} - -func KeyValue_EmptyValue() *KeyValue { - kv := &KeyValue{} - kv.PutString("abc", "") - kv.PutString("abcd", "") - return kv -} - -func KeyValue_OneKeyValue() *KeyValue { - kv := &KeyValue{} - kv.PutString("abc", "v") - return kv -} - -func KeyValue_BigValue() *KeyValue { - kv := &KeyValue{} - kv.PutString("big1", strings.Repeat("1", 200000)) - return kv -} - -func KeyValue_SpecialKey() *KeyValue { - kv := &KeyValue{} - kv.PutString("\xff\xff", "v3") - return kv -} - -func KeyValue_MultipleKeyValue() *KeyValue { - kv := &KeyValue{} - kv.PutString("a", "v") - kv.PutString("aa", "v1") - kv.PutString("aaa", "v2") - kv.PutString("aaacccccccccc", "v2") - kv.PutString("aaaccccccccccd", "v3") - kv.PutString("aaaccccccccccf", "v4") - kv.PutString("aaaccccccccccfg", "v5") - kv.PutString("ab", "v6") - kv.PutString("abc", "v7") - kv.PutString("abcd", "v8") - kv.PutString("accccccccccccccc", "v9") - kv.PutString("b", "v10") - kv.PutString("bb", "v11") - kv.PutString("bc", "v12") - kv.PutString("c", "v13") - kv.PutString("c1", "v13") - kv.PutString("czzzzzzzzzzzzzz", "v14") - kv.PutString("fffffffffffffff", "v15") - kv.PutString("g11", "v15") - kv.PutString("g111", "v15") - kv.PutString("g111\xff", "v15") - kv.PutString("zz", "v16") - kv.PutString("zzzzzzz", "v16") - kv.PutString("zzzzzzzzzzzzzzzz", "v16") - return kv -} - -var keymap = []byte("012345678ABCDEFGHIJKLMNOPQRSTUVWXYabcdefghijklmnopqrstuvwxy") - -func KeyValue_Generate(rnd *rand.Rand, n, incr, minlen, maxlen, vminlen, vmaxlen int) *KeyValue { - if rnd == nil { - rnd = NewRand() - } - if maxlen < minlen { - panic("max len should >= min len") - } - - rrand := func(min, max int) int { - if min == max { - return max - } - return rnd.Intn(max-min) + min - } - - kv := &KeyValue{} - endC := byte(len(keymap) - incr) - gen := make([]byte, 0, maxlen) - for i := 0; i < n; i++ { - m := rrand(minlen, maxlen) - last := gen - retry: - gen = last[:m] - if k := len(last); m > k { - for j := k; j < m; j++ { - gen[j] = 0 - } - } else { - for j := m - 1; j >= 0; j-- { - c := last[j] - if c == endC { - continue - } - gen[j] = c + byte(incr) - for j++; j < m; j++ { - gen[j] = 0 - } - goto ok - } - if m < maxlen { - m++ - goto retry - } - panic(fmt.Sprintf("only able to generate %d keys out of %d keys, try increasing max len", kv.Len(), n)) - ok: - } - key := make([]byte, m) - for j := 0; j < m; j++ { - key[j] = keymap[gen[j]] - } - value := make([]byte, rrand(vminlen, vmaxlen)) - for n := copy(value, []byte(fmt.Sprintf("v%d", i))); n < len(value); n++ { - value[n] = 'x' - } - kv.Put(key, value) - } - return kv -} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/kvtest.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/kvtest.go deleted file mode 100644 index f7563dc89..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/kvtest.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package testutil - -import ( - "fmt" - "math/rand" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - - "github.com/syndtr/goleveldb/leveldb/errors" - "github.com/syndtr/goleveldb/leveldb/util" -) - -func TestFind(db Find, kv KeyValue) { - ShuffledIndex(nil, kv.Len(), 1, func(i int) { - key_, key, value := kv.IndexInexact(i) - - // Using exact key. - rkey, rvalue, err := db.TestFind(key) - Expect(err).ShouldNot(HaveOccurred(), "Error for exact key %q", key) - Expect(rkey).Should(Equal(key), "Key") - Expect(rvalue).Should(Equal(value), "Value for exact key %q", key) - - // Using inexact key. - rkey, rvalue, err = db.TestFind(key_) - Expect(err).ShouldNot(HaveOccurred(), "Error for inexact key %q (%q)", key_, key) - Expect(rkey).Should(Equal(key), "Key for inexact key %q (%q)", key_, key) - Expect(rvalue).Should(Equal(value), "Value for inexact key %q (%q)", key_, key) - }) -} - -func TestFindAfterLast(db Find, kv KeyValue) { - var key []byte - if kv.Len() > 0 { - key_, _ := kv.Index(kv.Len() - 1) - key = BytesAfter(key_) - } - rkey, _, err := db.TestFind(key) - Expect(err).Should(HaveOccurred(), "Find for key %q yield key %q", key, rkey) - Expect(err).Should(Equal(errors.ErrNotFound)) -} - -func TestGet(db Get, kv KeyValue) { - ShuffledIndex(nil, kv.Len(), 1, func(i int) { - key_, key, value := kv.IndexInexact(i) - - // Using exact key. - rvalue, err := db.TestGet(key) - Expect(err).ShouldNot(HaveOccurred(), "Error for key %q", key) - Expect(rvalue).Should(Equal(value), "Value for key %q", key) - - // Using inexact key. - if len(key_) > 0 { - _, err = db.TestGet(key_) - Expect(err).Should(HaveOccurred(), "Error for key %q", key_) - Expect(err).Should(Equal(errors.ErrNotFound)) - } - }) -} - -func TestHas(db Has, kv KeyValue) { - ShuffledIndex(nil, kv.Len(), 1, func(i int) { - key_, key, _ := kv.IndexInexact(i) - - // Using exact key. - ret, err := db.TestHas(key) - Expect(err).ShouldNot(HaveOccurred(), "Error for key %q", key) - Expect(ret).Should(BeTrue(), "False for key %q", key) - - // Using inexact key. - if len(key_) > 0 { - ret, err = db.TestHas(key_) - Expect(err).ShouldNot(HaveOccurred(), "Error for key %q", key_) - Expect(ret).ShouldNot(BeTrue(), "True for key %q", key) - } - }) -} - -func TestIter(db NewIterator, r *util.Range, kv KeyValue) { - iter := db.TestNewIterator(r) - Expect(iter.Error()).ShouldNot(HaveOccurred()) - - t := IteratorTesting{ - KeyValue: kv, - Iter: iter, - } - - DoIteratorTesting(&t) - iter.Release() -} - -func KeyValueTesting(rnd *rand.Rand, kv KeyValue, p DB, setup func(KeyValue) DB, teardown func(DB)) { - if rnd == nil { - rnd = NewRand() - } - - if p == nil { - BeforeEach(func() { - p = setup(kv) - }) - if teardown != nil { - AfterEach(func() { - teardown(p) - }) - } - } - - It("Should find all keys with Find", func() { - if db, ok := p.(Find); ok { - TestFind(db, kv) - } - }) - - It("Should return error if Find on key after the last", func() { - if db, ok := p.(Find); ok { - TestFindAfterLast(db, kv) - } - }) - - It("Should only find exact key with Get", func() { - if db, ok := p.(Get); ok { - TestGet(db, kv) - } - }) - - It("Should only find present key with Has", func() { - if db, ok := p.(Has); ok { - TestHas(db, kv) - } - }) - - It("Should iterates and seeks correctly", func(done Done) { - if db, ok := p.(NewIterator); ok { - TestIter(db, nil, kv.Clone()) - } - done <- true - }, 30.0) - - It("Should iterates and seeks slice correctly", func(done Done) { - if db, ok := p.(NewIterator); ok { - RandomIndex(rnd, kv.Len(), Min(kv.Len(), 50), func(i int) { - type slice struct { - r *util.Range - start, limit int - } - - key_, _, _ := kv.IndexInexact(i) - for _, x := range []slice{ - {&util.Range{Start: key_, Limit: nil}, i, kv.Len()}, - {&util.Range{Start: nil, Limit: key_}, 0, i}, - } { - By(fmt.Sprintf("Random index of %d .. %d", x.start, x.limit), func() { - TestIter(db, x.r, kv.Slice(x.start, x.limit)) - }) - } - }) - } - done <- true - }, 200.0) - - It("Should iterates and seeks slice correctly", func(done Done) { - if db, ok := p.(NewIterator); ok { - RandomRange(rnd, kv.Len(), Min(kv.Len(), 50), func(start, limit int) { - By(fmt.Sprintf("Random range of %d .. %d", start, limit), func() { - r := kv.Range(start, limit) - TestIter(db, &r, kv.Slice(start, limit)) - }) - }) - } - done <- true - }, 200.0) -} - -func AllKeyValueTesting(rnd *rand.Rand, body, setup func(KeyValue) DB, teardown func(DB)) { - Test := func(kv *KeyValue) func() { - return func() { - var p DB - if setup != nil { - Defer("setup", func() { - p = setup(*kv) - }) - } - if teardown != nil { - Defer("teardown", func() { - teardown(p) - }) - } - if body != nil { - p = body(*kv) - } - KeyValueTesting(rnd, *kv, p, func(KeyValue) DB { - return p - }, nil) - } - } - - Describe("with no key/value (empty)", Test(&KeyValue{})) - Describe("with empty key", Test(KeyValue_EmptyKey())) - Describe("with empty value", Test(KeyValue_EmptyValue())) - Describe("with one key/value", Test(KeyValue_OneKeyValue())) - Describe("with big value", Test(KeyValue_BigValue())) - Describe("with special key", Test(KeyValue_SpecialKey())) - Describe("with multiple key/value", Test(KeyValue_MultipleKeyValue())) - Describe("with generated key/value 2-incr", Test(KeyValue_Generate(nil, 120, 2, 1, 50, 10, 120))) - Describe("with generated key/value 3-incr", Test(KeyValue_Generate(nil, 120, 3, 1, 50, 10, 120))) -} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/storage.go deleted file mode 100644 index 581daf314..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/storage.go +++ /dev/null @@ -1,693 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package testutil - -import ( - "bytes" - "fmt" - "io" - "math/rand" - "os" - "path/filepath" - "runtime" - "strings" - "sync" - - . "github.com/onsi/gomega" - - "github.com/syndtr/goleveldb/leveldb/storage" -) - -var ( - storageMu sync.Mutex - storageUseFS = true - storageKeepFS = false - storageNum int -) - -type StorageMode int - -const ( - ModeOpen StorageMode = 1 << iota - ModeCreate - ModeRemove - ModeRename - ModeRead - ModeWrite - ModeSync - ModeClose -) - -const ( - modeOpen = iota - modeCreate - modeRemove - modeRename - modeRead - modeWrite - modeSync - modeClose - - modeCount -) - -const ( - typeManifest = iota - typeJournal - typeTable - typeTemp - - typeCount -) - -const flattenCount = modeCount * typeCount - -func flattenType(m StorageMode, t storage.FileType) int { - var x int - switch m { - case ModeOpen: - x = modeOpen - case ModeCreate: - x = modeCreate - case ModeRemove: - x = modeRemove - case ModeRename: - x = modeRename - case ModeRead: - x = modeRead - case ModeWrite: - x = modeWrite - case ModeSync: - x = modeSync - case ModeClose: - x = modeClose - default: - panic("invalid storage mode") - } - x *= typeCount - switch t { - case storage.TypeManifest: - return x + typeManifest - case storage.TypeJournal: - return x + typeJournal - case storage.TypeTable: - return x + typeTable - case storage.TypeTemp: - return x + typeTemp - default: - panic("invalid file type") - } -} - -func listFlattenType(m StorageMode, t storage.FileType) []int { - ret := make([]int, 0, flattenCount) - add := func(x int) { - x *= typeCount - switch { - case t&storage.TypeManifest != 0: - ret = append(ret, x+typeManifest) - case t&storage.TypeJournal != 0: - ret = append(ret, x+typeJournal) - case t&storage.TypeTable != 0: - ret = append(ret, x+typeTable) - case t&storage.TypeTemp != 0: - ret = append(ret, x+typeTemp) - } - } - switch { - case m&ModeOpen != 0: - add(modeOpen) - case m&ModeCreate != 0: - add(modeCreate) - case m&ModeRemove != 0: - add(modeRemove) - case m&ModeRename != 0: - add(modeRename) - case m&ModeRead != 0: - add(modeRead) - case m&ModeWrite != 0: - add(modeWrite) - case m&ModeSync != 0: - add(modeSync) - case m&ModeClose != 0: - add(modeClose) - } - return ret -} - -func packFile(fd storage.FileDesc) uint64 { - if fd.Num>>(63-typeCount) != 0 { - panic("overflow") - } - return uint64(fd.Num<> typeCount)} -} - -type emulatedError struct { - err error -} - -func (err emulatedError) Error() string { - return fmt.Sprintf("emulated storage error: %v", err.err) -} - -type storageLock struct { - s *Storage - l storage.Locker -} - -func (l storageLock) Unlock() { - l.l.Unlock() - l.s.logI("storage lock released") -} - -type reader struct { - s *Storage - fd storage.FileDesc - storage.Reader -} - -func (r *reader) Read(p []byte) (n int, err error) { - err = r.s.emulateError(ModeRead, r.fd.Type) - if err == nil { - r.s.stall(ModeRead, r.fd.Type) - n, err = r.Reader.Read(p) - } - r.s.count(ModeRead, r.fd.Type, n) - if err != nil && err != io.EOF { - r.s.logI("read error, fd=%s n=%d err=%v", r.fd, n, err) - } - return -} - -func (r *reader) ReadAt(p []byte, off int64) (n int, err error) { - err = r.s.emulateError(ModeRead, r.fd.Type) - if err == nil { - r.s.stall(ModeRead, r.fd.Type) - n, err = r.Reader.ReadAt(p, off) - } - r.s.count(ModeRead, r.fd.Type, n) - if err != nil && err != io.EOF { - r.s.logI("readAt error, fd=%s offset=%d n=%d err=%v", r.fd, off, n, err) - } - return -} - -func (r *reader) Close() (err error) { - return r.s.fileClose(r.fd, r.Reader) -} - -type writer struct { - s *Storage - fd storage.FileDesc - storage.Writer -} - -func (w *writer) Write(p []byte) (n int, err error) { - err = w.s.emulateError(ModeWrite, w.fd.Type) - if err == nil { - w.s.stall(ModeWrite, w.fd.Type) - n, err = w.Writer.Write(p) - } - w.s.count(ModeWrite, w.fd.Type, n) - if err != nil && err != io.EOF { - w.s.logI("write error, fd=%s n=%d err=%v", w.fd, n, err) - } - return -} - -func (w *writer) Sync() (err error) { - err = w.s.emulateError(ModeSync, w.fd.Type) - if err == nil { - w.s.stall(ModeSync, w.fd.Type) - err = w.Writer.Sync() - } - w.s.count(ModeSync, w.fd.Type, 0) - if err != nil { - w.s.logI("sync error, fd=%s err=%v", w.fd, err) - } - return -} - -func (w *writer) Close() (err error) { - return w.s.fileClose(w.fd, w.Writer) -} - -type Storage struct { - storage.Storage - path string - onClose func() (preserve bool, err error) - onLog func(str string) - - lmu sync.Mutex - lb bytes.Buffer - - mu sync.Mutex - rand *rand.Rand - // Open files, true=writer, false=reader - opens map[uint64]bool - counters [flattenCount]int - bytesCounter [flattenCount]int64 - emulatedError [flattenCount]error - emulatedErrorOnce [flattenCount]bool - emulatedRandomError [flattenCount]error - emulatedRandomErrorProb [flattenCount]float64 - stallCond sync.Cond - stalled [flattenCount]bool -} - -func (s *Storage) log(skip int, str string) { - s.lmu.Lock() - defer s.lmu.Unlock() - _, file, line, ok := runtime.Caller(skip + 2) - if ok { - // Truncate file name at last file name separator. - if index := strings.LastIndex(file, "/"); index >= 0 { - file = file[index+1:] - } else if index = strings.LastIndex(file, "\\"); index >= 0 { - file = file[index+1:] - } - } else { - file = "???" - line = 1 - } - fmt.Fprintf(&s.lb, "%s:%d: ", file, line) - lines := strings.Split(str, "\n") - if l := len(lines); l > 1 && lines[l-1] == "" { - lines = lines[:l-1] - } - for i, line := range lines { - if i > 0 { - s.lb.WriteString("\n\t") - } - s.lb.WriteString(line) - } - if s.onLog != nil { - s.onLog(s.lb.String()) - s.lb.Reset() - } else { - s.lb.WriteByte('\n') - } -} - -func (s *Storage) logISkip(skip int, format string, args ...interface{}) { - pc, _, _, ok := runtime.Caller(skip + 1) - if ok { - if f := runtime.FuncForPC(pc); f != nil { - fname := f.Name() - if index := strings.LastIndex(fname, "."); index >= 0 { - fname = fname[index+1:] - } - format = fname + ": " + format - } - } - s.log(skip+1, fmt.Sprintf(format, args...)) -} - -func (s *Storage) logI(format string, args ...interface{}) { - s.logISkip(1, format, args...) -} - -func (s *Storage) OnLog(onLog func(log string)) { - s.lmu.Lock() - s.onLog = onLog - if s.lb.Len() != 0 { - log := s.lb.String() - s.onLog(log[:len(log)-1]) - s.lb.Reset() - } - s.lmu.Unlock() -} - -func (s *Storage) Log(str string) { - s.log(1, "Log: "+str) - s.Storage.Log(str) -} - -func (s *Storage) Lock() (l storage.Locker, err error) { - l, err = s.Storage.Lock() - if err != nil { - s.logI("storage locking failed, err=%v", err) - } else { - s.logI("storage locked") - l = storageLock{s, l} - } - return -} - -func (s *Storage) List(t storage.FileType) (fds []storage.FileDesc, err error) { - fds, err = s.Storage.List(t) - if err != nil { - s.logI("list failed, err=%v", err) - return - } - s.logI("list, type=0x%x count=%d", int(t), len(fds)) - return -} - -func (s *Storage) GetMeta() (fd storage.FileDesc, err error) { - fd, err = s.Storage.GetMeta() - if err != nil { - if !os.IsNotExist(err) { - s.logI("get meta failed, err=%v", err) - } - return - } - s.logI("get meta, fd=%s", fd) - return -} - -func (s *Storage) SetMeta(fd storage.FileDesc) error { - ExpectWithOffset(1, fd.Type).To(Equal(storage.TypeManifest)) - err := s.Storage.SetMeta(fd) - if err != nil { - s.logI("set meta failed, fd=%s err=%v", fd, err) - } else { - s.logI("set meta, fd=%s", fd) - } - return err -} - -func (s *Storage) fileClose(fd storage.FileDesc, closer io.Closer) (err error) { - err = s.emulateError(ModeClose, fd.Type) - if err == nil { - s.stall(ModeClose, fd.Type) - } - x := packFile(fd) - s.mu.Lock() - defer s.mu.Unlock() - if err == nil { - ExpectWithOffset(2, s.opens).To(HaveKey(x), "File closed, fd=%s", fd) - err = closer.Close() - } - s.countNB(ModeClose, fd.Type, 0) - writer := s.opens[x] - if err != nil { - s.logISkip(1, "file close failed, fd=%s writer=%v err=%v", fd, writer, err) - } else { - s.logISkip(1, "file closed, fd=%s writer=%v", fd, writer) - delete(s.opens, x) - } - return -} - -func (s *Storage) assertOpen(fd storage.FileDesc) { - x := packFile(fd) - ExpectWithOffset(2, s.opens).NotTo(HaveKey(x), "File open, fd=%s writer=%v", fd, s.opens[x]) -} - -func (s *Storage) Open(fd storage.FileDesc) (r storage.Reader, err error) { - err = s.emulateError(ModeOpen, fd.Type) - if err == nil { - s.stall(ModeOpen, fd.Type) - } - s.mu.Lock() - defer s.mu.Unlock() - if err == nil { - s.assertOpen(fd) - s.countNB(ModeOpen, fd.Type, 0) - r, err = s.Storage.Open(fd) - } - if err != nil { - s.logI("file open failed, fd=%s err=%v", fd, err) - } else { - s.logI("file opened, fd=%s", fd) - s.opens[packFile(fd)] = false - r = &reader{s, fd, r} - } - return -} - -func (s *Storage) Create(fd storage.FileDesc) (w storage.Writer, err error) { - err = s.emulateError(ModeCreate, fd.Type) - if err == nil { - s.stall(ModeCreate, fd.Type) - } - s.mu.Lock() - defer s.mu.Unlock() - if err == nil { - s.assertOpen(fd) - s.countNB(ModeCreate, fd.Type, 0) - w, err = s.Storage.Create(fd) - } - if err != nil { - s.logI("file create failed, fd=%s err=%v", fd, err) - } else { - s.logI("file created, fd=%s", fd) - s.opens[packFile(fd)] = true - w = &writer{s, fd, w} - } - return -} - -func (s *Storage) Remove(fd storage.FileDesc) (err error) { - err = s.emulateError(ModeRemove, fd.Type) - if err == nil { - s.stall(ModeRemove, fd.Type) - } - s.mu.Lock() - defer s.mu.Unlock() - if err == nil { - s.assertOpen(fd) - s.countNB(ModeRemove, fd.Type, 0) - err = s.Storage.Remove(fd) - } - if err != nil { - s.logI("file remove failed, fd=%s err=%v", fd, err) - } else { - s.logI("file removed, fd=%s", fd) - } - return -} - -func (s *Storage) ForceRemove(fd storage.FileDesc) (err error) { - s.countNB(ModeRemove, fd.Type, 0) - if err = s.Storage.Remove(fd); err != nil { - s.logI("file remove failed (forced), fd=%s err=%v", fd, err) - } else { - s.logI("file removed (forced), fd=%s", fd) - } - return -} - -func (s *Storage) Rename(oldfd, newfd storage.FileDesc) (err error) { - err = s.emulateError(ModeRename, oldfd.Type) - if err == nil { - s.stall(ModeRename, oldfd.Type) - } - s.mu.Lock() - defer s.mu.Unlock() - if err == nil { - s.assertOpen(oldfd) - s.assertOpen(newfd) - s.countNB(ModeRename, oldfd.Type, 0) - err = s.Storage.Rename(oldfd, newfd) - } - if err != nil { - s.logI("file rename failed, oldfd=%s newfd=%s err=%v", oldfd, newfd, err) - } else { - s.logI("file renamed, oldfd=%s newfd=%s", oldfd, newfd) - } - return -} - -func (s *Storage) ForceRename(oldfd, newfd storage.FileDesc) (err error) { - s.countNB(ModeRename, oldfd.Type, 0) - if err = s.Storage.Rename(oldfd, newfd); err != nil { - s.logI("file rename failed (forced), oldfd=%s newfd=%s err=%v", oldfd, newfd, err) - } else { - s.logI("file renamed (forced), oldfd=%s newfd=%s", oldfd, newfd) - } - return -} - -func (s *Storage) openFiles() string { - out := "Open files:" - for x, writer := range s.opens { - fd := unpackFile(x) - out += fmt.Sprintf("\n · fd=%s writer=%v", fd, writer) - } - return out -} - -func (s *Storage) CloseCheck() { - s.mu.Lock() - defer s.mu.Unlock() - ExpectWithOffset(1, s.opens).To(BeEmpty(), s.openFiles()) -} - -func (s *Storage) OnClose(onClose func() (preserve bool, err error)) { - s.mu.Lock() - s.onClose = onClose - s.mu.Unlock() -} - -func (s *Storage) Close() error { - s.mu.Lock() - defer s.mu.Unlock() - ExpectWithOffset(1, s.opens).To(BeEmpty(), s.openFiles()) - err := s.Storage.Close() - if err != nil { - s.logI("storage closing failed, err=%v", err) - } else { - s.logI("storage closed") - } - var preserve bool - if s.onClose != nil { - var err0 error - if preserve, err0 = s.onClose(); err0 != nil { - s.logI("onClose error, err=%v", err0) - } - } - if s.path != "" { - if storageKeepFS || preserve { - s.logI("storage is preserved, path=%v", s.path) - } else { - if err1 := os.RemoveAll(s.path); err1 != nil { - s.logI("cannot remove storage, err=%v", err1) - } else { - s.logI("storage has been removed") - } - } - } - return err -} - -func (s *Storage) countNB(m StorageMode, t storage.FileType, n int) { - s.counters[flattenType(m, t)]++ - s.bytesCounter[flattenType(m, t)] += int64(n) -} - -func (s *Storage) count(m StorageMode, t storage.FileType, n int) { - s.mu.Lock() - defer s.mu.Unlock() - s.countNB(m, t, n) -} - -func (s *Storage) ResetCounter(m StorageMode, t storage.FileType) { - for _, x := range listFlattenType(m, t) { - s.counters[x] = 0 - s.bytesCounter[x] = 0 - } -} - -func (s *Storage) Counter(m StorageMode, t storage.FileType) (count int, bytes int64) { - for _, x := range listFlattenType(m, t) { - count += s.counters[x] - bytes += s.bytesCounter[x] - } - return -} - -func (s *Storage) emulateError(m StorageMode, t storage.FileType) error { - s.mu.Lock() - defer s.mu.Unlock() - x := flattenType(m, t) - if err := s.emulatedError[x]; err != nil { - if s.emulatedErrorOnce[x] { - s.emulatedError[x] = nil - } - return emulatedError{err} - } - if err := s.emulatedRandomError[x]; err != nil && s.rand.Float64() < s.emulatedRandomErrorProb[x] { - return emulatedError{err} - } - return nil -} - -func (s *Storage) EmulateError(m StorageMode, t storage.FileType, err error) { - s.mu.Lock() - defer s.mu.Unlock() - for _, x := range listFlattenType(m, t) { - s.emulatedError[x] = err - s.emulatedErrorOnce[x] = false - } -} - -func (s *Storage) EmulateErrorOnce(m StorageMode, t storage.FileType, err error) { - s.mu.Lock() - defer s.mu.Unlock() - for _, x := range listFlattenType(m, t) { - s.emulatedError[x] = err - s.emulatedErrorOnce[x] = true - } -} - -func (s *Storage) EmulateRandomError(m StorageMode, t storage.FileType, prob float64, err error) { - s.mu.Lock() - defer s.mu.Unlock() - for _, x := range listFlattenType(m, t) { - s.emulatedRandomError[x] = err - s.emulatedRandomErrorProb[x] = prob - } -} - -func (s *Storage) stall(m StorageMode, t storage.FileType) { - x := flattenType(m, t) - s.mu.Lock() - defer s.mu.Unlock() - for s.stalled[x] { - s.stallCond.Wait() - } -} - -func (s *Storage) Stall(m StorageMode, t storage.FileType) { - s.mu.Lock() - defer s.mu.Unlock() - for _, x := range listFlattenType(m, t) { - s.stalled[x] = true - } -} - -func (s *Storage) Release(m StorageMode, t storage.FileType) { - s.mu.Lock() - defer s.mu.Unlock() - for _, x := range listFlattenType(m, t) { - s.stalled[x] = false - } - s.stallCond.Broadcast() -} - -func NewStorage() *Storage { - var ( - stor storage.Storage - path string - ) - if storageUseFS { - for { - storageMu.Lock() - num := storageNum - storageNum++ - storageMu.Unlock() - path = filepath.Join(os.TempDir(), fmt.Sprintf("goleveldb-test%d0%d0%d", os.Getuid(), os.Getpid(), num)) - if _, err := os.Stat(path); os.IsNotExist(err) { - stor, err = storage.OpenFile(path, false) - ExpectWithOffset(1, err).NotTo(HaveOccurred(), "creating storage at %s", path) - break - } - } - } else { - stor = storage.NewMemStorage() - } - s := &Storage{ - Storage: stor, - path: path, - rand: NewRand(), - opens: make(map[uint64]bool), - } - s.stallCond.L = &s.mu - if s.path != "" { - s.logI("using FS storage") - s.logI("storage path: %s", s.path) - } else { - s.logI("using MEM storage") - } - return s -} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/util.go b/vendor/github.com/syndtr/goleveldb/leveldb/testutil/util.go deleted file mode 100644 index 97c5294b1..000000000 --- a/vendor/github.com/syndtr/goleveldb/leveldb/testutil/util.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) 2014, Suryandaru Triandana -// All rights reserved. -// -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -package testutil - -import ( - "bytes" - "flag" - "math/rand" - "reflect" - "sync" - - "github.com/onsi/ginkgo/config" - - "github.com/syndtr/goleveldb/leveldb/comparer" -) - -var ( - runfn = make(map[string][]func()) - runmu sync.Mutex -) - -func Defer(args ...interface{}) bool { - var ( - group string - fn func() - ) - for _, arg := range args { - v := reflect.ValueOf(arg) - switch v.Kind() { - case reflect.String: - group = v.String() - case reflect.Func: - r := reflect.ValueOf(&fn).Elem() - r.Set(v) - } - } - if fn != nil { - runmu.Lock() - runfn[group] = append(runfn[group], fn) - runmu.Unlock() - } - return true -} - -func RunDefer(groups ...string) bool { - if len(groups) == 0 { - groups = append(groups, "") - } - runmu.Lock() - var runfn_ []func() - for _, group := range groups { - runfn_ = append(runfn_, runfn[group]...) - delete(runfn, group) - } - runmu.Unlock() - for _, fn := range runfn_ { - fn() - } - return runfn_ != nil -} - -func RandomSeed() int64 { - if !flag.Parsed() { - panic("random seed not initialized") - } - return config.GinkgoConfig.RandomSeed -} - -func NewRand() *rand.Rand { - return rand.New(rand.NewSource(RandomSeed())) -} - -var cmp = comparer.DefaultComparer - -func BytesSeparator(a, b []byte) []byte { - if bytes.Equal(a, b) { - return b - } - i, n := 0, len(a) - if n > len(b) { - n = len(b) - } - for ; i < n && (a[i] == b[i]); i++ { - } - x := append([]byte{}, a[:i]...) - if i < n { - if c := a[i] + 1; c < b[i] { - return append(x, c) - } - x = append(x, a[i]) - i++ - } - for ; i < len(a); i++ { - if c := a[i]; c < 0xff { - return append(x, c+1) - } else { - x = append(x, c) - } - } - if len(b) > i && b[i] > 0 { - return append(x, b[i]-1) - } - return append(x, 'x') -} - -func BytesAfter(b []byte) []byte { - var x []byte - for _, c := range b { - if c < 0xff { - return append(x, c+1) - } else { - x = append(x, c) - } - } - return append(x, 'x') -} - -func RandomIndex(rnd *rand.Rand, n, round int, fn func(i int)) { - if rnd == nil { - rnd = NewRand() - } - for x := 0; x < round; x++ { - fn(rnd.Intn(n)) - } - return -} - -func ShuffledIndex(rnd *rand.Rand, n, round int, fn func(i int)) { - if rnd == nil { - rnd = NewRand() - } - for x := 0; x < round; x++ { - for _, i := range rnd.Perm(n) { - fn(i) - } - } - return -} - -func RandomRange(rnd *rand.Rand, n, round int, fn func(start, limit int)) { - if rnd == nil { - rnd = NewRand() - } - for x := 0; x < round; x++ { - start := rnd.Intn(n) - length := 0 - if j := n - start; j > 0 { - length = rnd.Intn(j) - } - fn(start, start+length) - } - return -} - -func Max(x, y int) int { - if x > y { - return x - } - return y -} - -func Min(x, y int) int { - if x < y { - return x - } - return y -} diff --git a/vendor/github.com/templexxx/cpufeat/LICENSE b/vendor/github.com/templexxx/cpufeat/LICENSE deleted file mode 100644 index ea5ea8986..000000000 --- a/vendor/github.com/templexxx/cpufeat/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. \ No newline at end of file diff --git a/vendor/github.com/templexxx/cpufeat/cpu.go b/vendor/github.com/templexxx/cpufeat/cpu.go deleted file mode 100644 index 209aaa761..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu.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. - -// Package cpu implements processor feature detection -// used by the Go standard libary. -package cpufeat - -var X86 x86 - -// The booleans in x86 contain the correspondingly named cpuid feature bit. -// HasAVX and HasAVX2 are only set if the OS does support XMM and YMM registers -// in addition to the cpuid feature bit being set. -// The struct is padded to avoid false sharing. -type x86 struct { - _ [CacheLineSize]byte - HasAES bool - HasAVX bool - HasAVX2 bool - HasBMI1 bool - HasBMI2 bool - HasERMS bool - HasOSXSAVE bool - HasPCLMULQDQ bool - HasPOPCNT bool - HasSSE2 bool - HasSSE3 bool - HasSSSE3 bool - HasSSE41 bool - HasSSE42 bool - _ [CacheLineSize]byte -} diff --git a/vendor/github.com/templexxx/cpufeat/cpu_arm.go b/vendor/github.com/templexxx/cpufeat/cpu_arm.go deleted file mode 100644 index b3eb5a955..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_arm.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 32 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_arm64.go b/vendor/github.com/templexxx/cpufeat/cpu_arm64.go deleted file mode 100644 index b3eb5a955..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_arm64.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 32 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_mips.go b/vendor/github.com/templexxx/cpufeat/cpu_mips.go deleted file mode 100644 index b3eb5a955..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_mips.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 32 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_mips64.go b/vendor/github.com/templexxx/cpufeat/cpu_mips64.go deleted file mode 100644 index b3eb5a955..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_mips64.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 32 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_mips64le.go b/vendor/github.com/templexxx/cpufeat/cpu_mips64le.go deleted file mode 100644 index b3eb5a955..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_mips64le.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 32 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_mipsle.go b/vendor/github.com/templexxx/cpufeat/cpu_mipsle.go deleted file mode 100644 index b3eb5a955..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_mipsle.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 32 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_ppc64.go b/vendor/github.com/templexxx/cpufeat/cpu_ppc64.go deleted file mode 100644 index 1e738e3ad..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_ppc64.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 128 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_ppc64le.go b/vendor/github.com/templexxx/cpufeat/cpu_ppc64le.go deleted file mode 100644 index 1e738e3ad..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_ppc64le.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 128 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_s390x.go b/vendor/github.com/templexxx/cpufeat/cpu_s390x.go deleted file mode 100644 index 17be8fe9a..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_s390x.go +++ /dev/null @@ -1,7 +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 cpufeat - -const CacheLineSize = 256 diff --git a/vendor/github.com/templexxx/cpufeat/cpu_x86.go b/vendor/github.com/templexxx/cpufeat/cpu_x86.go deleted file mode 100644 index 8f5af13d3..000000000 --- a/vendor/github.com/templexxx/cpufeat/cpu_x86.go +++ /dev/null @@ -1,59 +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 386 amd64 amd64p32 - -package cpufeat - -const CacheLineSize = 64 - -// cpuid is implemented in cpu_x86.s. -func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) - -// xgetbv with ecx = 0 is implemented in cpu_x86.s. -func xgetbv() (eax, edx uint32) - -func init() { - maxId, _, _, _ := cpuid(0, 0) - - if maxId < 1 { - return - } - - _, _, ecx1, edx1 := cpuid(1, 0) - X86.HasSSE2 = isSet(26, edx1) - - X86.HasSSE3 = isSet(0, ecx1) - X86.HasPCLMULQDQ = isSet(1, ecx1) - X86.HasSSSE3 = isSet(9, ecx1) - X86.HasSSE41 = isSet(19, ecx1) - X86.HasSSE42 = isSet(20, ecx1) - X86.HasPOPCNT = isSet(23, ecx1) - X86.HasAES = isSet(25, ecx1) - X86.HasOSXSAVE = isSet(27, ecx1) - - osSupportsAVX := false - // For XGETBV, OSXSAVE bit is required and sufficient. - if X86.HasOSXSAVE { - eax, _ := xgetbv() - // Check if XMM and YMM registers have OS support. - osSupportsAVX = isSet(1, eax) && isSet(2, eax) - } - - X86.HasAVX = isSet(28, ecx1) && osSupportsAVX - - if maxId < 7 { - return - } - - _, ebx7, _, _ := cpuid(7, 0) - X86.HasBMI1 = isSet(3, ebx7) - X86.HasAVX2 = isSet(5, ebx7) && osSupportsAVX - X86.HasBMI2 = isSet(8, ebx7) - X86.HasERMS = isSet(9, ebx7) -} - -func isSet(bitpos uint, value uint32) bool { - return value&(1< +"sutree" -> "suture" -> holds your code together when it's trying to die. + +This library has hit maturity, and isn't expected to be changed +radically. This can also be imported via gopkg.in/thejerf/suture.v2 . + +It is intended to deal gracefully with the real failure cases that can +occur with supervision trees (such as burning all your CPU time endlessly +restarting dead services), while also making no unnecessary demands on the +"service" code, and providing hooks to perform adequate logging with in a +production environment. + +[A blog post describing the design decisions](http://www.jerf.org/iri/post/2930) +is available. + +This module is fully covered with [godoc](http://godoc.org/github.com/thejerf/suture), +including an example, usage, and everything else you might expect from a +README.md on GitHub. (DRY.) + +Code Signing +------------ + +Starting with the commit after ac7cf8591b, I will be signing this repository +with the ["jerf" keybase account](https://keybase.io/jerf). If you are viewing +this repository through GitHub, you should see the commits as showing as +"verified" in the commit view. + +(Bear in mind that due to the nature of how git commit signing works, there +may be runs of unverified commits; what matters is that the top one is signed.) + +Aspiration +---------- + +One of the big wins the Erlang community has with their pervasive OTP +support is that it makes it easy for them to distribute libraries that +easily fit into the OTP paradigm. It ought to someday be considered a good +idea to distribute libraries that provide some sort of supervisor tree +functionality out of the box. It is possible to provide this functionality +without explicitly depending on the Suture library. + +Changelog +--------- + +suture uses semantic versioning. + +* 2.0.3 + * Accepted PR #23, making the logging functions in the supervisor public. + * Added a new Supervisor method RemoveAndWait, allowing you to make a + best effort way to wait for a service to terminate. + * Accepted PR #24, adding an optional IsCompletable interface that + Services can implement that indicates they do not need to be restarted + upon a normal return. +* 2.0.2 + * Fixed issue #21. gccgo doesn't like `case (<-c)`, with the parentheses. + Of course the parens aren't doing anything useful anyhow. No behavior + changes. +* 2.0.1 + * __Test code change only__. Addresses the possibility that one of the + tests can spuriously fail if they run in a certain order. +* 2.0.0 + * Major version due to change to the signature of the logging methods: + + A race condition could occur when the Supervisor rendered the service + name via fmt.Sprintf("%#v"), because fmt examines the entire object + regardless of locks through reflection. 2.0.0 changes the supervisors + to snapshot the Service's name once, when it is added, and to pass it + to the logging methods. + * Removal of use of sync/atomic due to possible brokenness in the Debian + architecture. +* 1.1.2 + * TravisCI showed that the fix for 1.1.1 induced a deadlock in Go 1.4 and + before. + * If the supervisor is terminated before a service, the service goroutine + could be orphaned trying the shutdown notification to the supervisor. + This should no longer occur. +* 1.1.1 + * Per #14, the fix in 1.1.0 did not actually wait for the Supervisor + to stop. +* 1.1.0 + * Per #12, Supervisor.stop now tries to wait for its children before + returning. A careful reading of the original .Stop() contract + says this is the correct behavior. +* 1.0.1 + * Fixed data race on the .state variable. +* 1.0.0 + * Initial release. diff --git a/vendor/github.com/thejerf/suture/gml b/vendor/github.com/thejerf/suture/gml new file mode 100644 index 000000000..4986d3dd2 --- /dev/null +++ b/vendor/github.com/thejerf/suture/gml @@ -0,0 +1,47 @@ +#!/bin/bash + +# This command wraps up the gometalinter invocation in the pre-commit hook +# so it can be used by other things. + +# If used in a way that the "lintclean" file is in the current working +# directory, the contents of the lintclean directory will be added to +# this invocation, allowing you to filter out specific failures. + +# Rationale: +# --exclude="composite literal uses unkeyed field" \ +# jbowers: I disagree with community on this, and side with the Go +# creators. Keyed fields are used when you expect new fields to be +# unimportant to you, and you want to keep compiling, i.e., a new +# option that, since you weren't using it before, probably want to +# keep not using it. By contrast, unkeyed fields are appropriate +# when you expect changes to the struct to really matter to you, +# i.e., it is discovered that something MUST have a bool field added +# or it turns out to be logically gibberish. You can't say that +# one or the other must always be used... each has their place. +# +# -D gocyclo +# jbowers: I consider cyclomatic complexity a bit of a crock. + +if [ `which gometalinter` == "" ]; then + echo You need to run the \"install_buildtools\" script. + exit 1 +fi + +EXTRA_ARGS= + +if [ -e lintclean ]; then + EXTRA_ARGS=$(cat lintclean) +fi + +gometalinter \ + --exclude="composite literal uses unkeyed field" \ + -j 4 \ + -D gocyclo \ + -D aligncheck \ + -D gofmt \ + -D goimports \ + -D gotype \ + -D structcheck \ + -D varcheck \ + $EXTRA_ARGS \ + $* diff --git a/vendor/github.com/thejerf/suture/pre-commit b/vendor/github.com/thejerf/suture/pre-commit new file mode 100644 index 000000000..2e38157f9 --- /dev/null +++ b/vendor/github.com/thejerf/suture/pre-commit @@ -0,0 +1,17 @@ +#!/bin/bash + +# This ensures all executables build and all tests pass before a commit +# goes through. + +set -v +set -e + +CWD=`pwd` + +go test +./gml . + +echo Build succeeds. +exit 0 + + diff --git a/vendor/github.com/tjfoc/gmsm/sm4/LICENSE b/vendor/github.com/tjfoc/gmsm/sm4/LICENSE deleted file mode 100644 index 8dada3eda..000000000 --- a/vendor/github.com/tjfoc/gmsm/sm4/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. diff --git a/vendor/github.com/tjfoc/gmsm/sm4/sm4.go b/vendor/github.com/tjfoc/gmsm/sm4/sm4.go deleted file mode 100644 index 174293327..000000000 --- a/vendor/github.com/tjfoc/gmsm/sm4/sm4.go +++ /dev/null @@ -1,342 +0,0 @@ -/* -Copyright Suzhou Tongji Fintech Research Institute 2017 All Rights Reserved. -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. - -sm4 acceration -modified by Jack, 2017 Oct -*/ - -package sm4 - -import ( - "crypto/cipher" - "crypto/rand" - "crypto/x509" - "encoding/pem" - "errors" - "io/ioutil" - "os" - "strconv" -) - -const BlockSize = 16 - -type SM4Key []byte - -type KeySizeError int - -// Cipher is an instance of SM4 encryption. -type Sm4Cipher struct { - subkeys []uint32 - block1 []uint32 - block2 []byte -} - -// sm4密钥参量 -var fk = [4]uint32{ - 0xa3b1bac6, 0x56aa3350, 0x677d9197, 0xb27022dc, -} - -// sm4密钥参量 -var ck = [32]uint32{ - 0x00070e15, 0x1c232a31, 0x383f464d, 0x545b6269, - 0x70777e85, 0x8c939aa1, 0xa8afb6bd, 0xc4cbd2d9, - 0xe0e7eef5, 0xfc030a11, 0x181f262d, 0x343b4249, - 0x50575e65, 0x6c737a81, 0x888f969d, 0xa4abb2b9, - 0xc0c7ced5, 0xdce3eaf1, 0xf8ff060d, 0x141b2229, - 0x30373e45, 0x4c535a61, 0x686f767d, 0x848b9299, - 0xa0a7aeb5, 0xbcc3cad1, 0xd8dfe6ed, 0xf4fb0209, - 0x10171e25, 0x2c333a41, 0x484f565d, 0x646b7279, -} - -// sm4密钥参量 -var sbox = [256]uint8{ - 0xd6, 0x90, 0xe9, 0xfe, 0xcc, 0xe1, 0x3d, 0xb7, 0x16, 0xb6, 0x14, 0xc2, 0x28, 0xfb, 0x2c, 0x05, - 0x2b, 0x67, 0x9a, 0x76, 0x2a, 0xbe, 0x04, 0xc3, 0xaa, 0x44, 0x13, 0x26, 0x49, 0x86, 0x06, 0x99, - 0x9c, 0x42, 0x50, 0xf4, 0x91, 0xef, 0x98, 0x7a, 0x33, 0x54, 0x0b, 0x43, 0xed, 0xcf, 0xac, 0x62, - 0xe4, 0xb3, 0x1c, 0xa9, 0xc9, 0x08, 0xe8, 0x95, 0x80, 0xdf, 0x94, 0xfa, 0x75, 0x8f, 0x3f, 0xa6, - 0x47, 0x07, 0xa7, 0xfc, 0xf3, 0x73, 0x17, 0xba, 0x83, 0x59, 0x3c, 0x19, 0xe6, 0x85, 0x4f, 0xa8, - 0x68, 0x6b, 0x81, 0xb2, 0x71, 0x64, 0xda, 0x8b, 0xf8, 0xeb, 0x0f, 0x4b, 0x70, 0x56, 0x9d, 0x35, - 0x1e, 0x24, 0x0e, 0x5e, 0x63, 0x58, 0xd1, 0xa2, 0x25, 0x22, 0x7c, 0x3b, 0x01, 0x21, 0x78, 0x87, - 0xd4, 0x00, 0x46, 0x57, 0x9f, 0xd3, 0x27, 0x52, 0x4c, 0x36, 0x02, 0xe7, 0xa0, 0xc4, 0xc8, 0x9e, - 0xea, 0xbf, 0x8a, 0xd2, 0x40, 0xc7, 0x38, 0xb5, 0xa3, 0xf7, 0xf2, 0xce, 0xf9, 0x61, 0x15, 0xa1, - 0xe0, 0xae, 0x5d, 0xa4, 0x9b, 0x34, 0x1a, 0x55, 0xad, 0x93, 0x32, 0x30, 0xf5, 0x8c, 0xb1, 0xe3, - 0x1d, 0xf6, 0xe2, 0x2e, 0x82, 0x66, 0xca, 0x60, 0xc0, 0x29, 0x23, 0xab, 0x0d, 0x53, 0x4e, 0x6f, - 0xd5, 0xdb, 0x37, 0x45, 0xde, 0xfd, 0x8e, 0x2f, 0x03, 0xff, 0x6a, 0x72, 0x6d, 0x6c, 0x5b, 0x51, - 0x8d, 0x1b, 0xaf, 0x92, 0xbb, 0xdd, 0xbc, 0x7f, 0x11, 0xd9, 0x5c, 0x41, 0x1f, 0x10, 0x5a, 0xd8, - 0x0a, 0xc1, 0x31, 0x88, 0xa5, 0xcd, 0x7b, 0xbd, 0x2d, 0x74, 0xd0, 0x12, 0xb8, 0xe5, 0xb4, 0xb0, - 0x89, 0x69, 0x97, 0x4a, 0x0c, 0x96, 0x77, 0x7e, 0x65, 0xb9, 0xf1, 0x09, 0xc5, 0x6e, 0xc6, 0x84, - 0x18, 0xf0, 0x7d, 0xec, 0x3a, 0xdc, 0x4d, 0x20, 0x79, 0xee, 0x5f, 0x3e, 0xd7, 0xcb, 0x39, 0x48, -} - -var sbox0 = [256]uint32{ - 0xd55b5b8e, 0x924242d0, 0xeaa7a74d, 0xfdfbfb06, 0xcf3333fc, 0xe2878765, 0x3df4f4c9, 0xb5dede6b, 0x1658584e, 0xb4dada6e, 0x14505044, 0xc10b0bca, 0x28a0a088, 0xf8efef17, 0x2cb0b09c, 0x05141411, - 0x2bacac87, 0x669d9dfb, 0x986a6af2, 0x77d9d9ae, 0x2aa8a882, 0xbcfafa46, 0x04101014, 0xc00f0fcf, 0xa8aaaa02, 0x45111154, 0x134c4c5f, 0x269898be, 0x4825256d, 0x841a1a9e, 0x0618181e, 0x9b6666fd, - 0x9e7272ec, 0x4309094a, 0x51414110, 0xf7d3d324, 0x934646d5, 0xecbfbf53, 0x9a6262f8, 0x7be9e992, 0x33ccccff, 0x55515104, 0x0b2c2c27, 0x420d0d4f, 0xeeb7b759, 0xcc3f3ff3, 0xaeb2b21c, 0x638989ea, - 0xe7939374, 0xb1cece7f, 0x1c70706c, 0xaba6a60d, 0xca2727ed, 0x08202028, 0xeba3a348, 0x975656c1, 0x82020280, 0xdc7f7fa3, 0x965252c4, 0xf9ebeb12, 0x74d5d5a1, 0x8d3e3eb3, 0x3ffcfcc3, 0xa49a9a3e, - 0x461d1d5b, 0x071c1c1b, 0xa59e9e3b, 0xfff3f30c, 0xf0cfcf3f, 0x72cdcdbf, 0x175c5c4b, 0xb8eaea52, 0x810e0e8f, 0x5865653d, 0x3cf0f0cc, 0x1964647d, 0xe59b9b7e, 0x87161691, 0x4e3d3d73, 0xaaa2a208, - 0x69a1a1c8, 0x6aadadc7, 0x83060685, 0xb0caca7a, 0x70c5c5b5, 0x659191f4, 0xd96b6bb2, 0x892e2ea7, 0xfbe3e318, 0xe8afaf47, 0x0f3c3c33, 0x4a2d2d67, 0x71c1c1b0, 0x5759590e, 0x9f7676e9, 0x35d4d4e1, - 0x1e787866, 0x249090b4, 0x0e383836, 0x5f797926, 0x628d8def, 0x59616138, 0xd2474795, 0xa08a8a2a, 0x259494b1, 0x228888aa, 0x7df1f18c, 0x3bececd7, 0x01040405, 0x218484a5, 0x79e1e198, 0x851e1e9b, - 0xd7535384, 0x00000000, 0x4719195e, 0x565d5d0b, 0x9d7e7ee3, 0xd04f4f9f, 0x279c9cbb, 0x5349491a, 0x4d31317c, 0x36d8d8ee, 0x0208080a, 0xe49f9f7b, 0xa2828220, 0xc71313d4, 0xcb2323e8, 0x9c7a7ae6, - 0xe9abab42, 0xbdfefe43, 0x882a2aa2, 0xd14b4b9a, 0x41010140, 0xc41f1fdb, 0x38e0e0d8, 0xb7d6d661, 0xa18e8e2f, 0xf4dfdf2b, 0xf1cbcb3a, 0xcd3b3bf6, 0xfae7e71d, 0x608585e5, 0x15545441, 0xa3868625, - 0xe3838360, 0xacbaba16, 0x5c757529, 0xa6929234, 0x996e6ef7, 0x34d0d0e4, 0x1a686872, 0x54555501, 0xafb6b619, 0x914e4edf, 0x32c8c8fa, 0x30c0c0f0, 0xf6d7d721, 0x8e3232bc, 0xb3c6c675, 0xe08f8f6f, - 0x1d747469, 0xf5dbdb2e, 0xe18b8b6a, 0x2eb8b896, 0x800a0a8a, 0x679999fe, 0xc92b2be2, 0x618181e0, 0xc30303c0, 0x29a4a48d, 0x238c8caf, 0xa9aeae07, 0x0d343439, 0x524d4d1f, 0x4f393976, 0x6ebdbdd3, - 0xd6575781, 0xd86f6fb7, 0x37dcdceb, 0x44151551, 0xdd7b7ba6, 0xfef7f709, 0x8c3a3ab6, 0x2fbcbc93, 0x030c0c0f, 0xfcffff03, 0x6ba9a9c2, 0x73c9c9ba, 0x6cb5b5d9, 0x6db1b1dc, 0x5a6d6d37, 0x50454515, - 0x8f3636b9, 0x1b6c6c77, 0xadbebe13, 0x904a4ada, 0xb9eeee57, 0xde7777a9, 0xbef2f24c, 0x7efdfd83, 0x11444455, 0xda6767bd, 0x5d71712c, 0x40050545, 0x1f7c7c63, 0x10404050, 0x5b696932, 0xdb6363b8, - 0x0a282822, 0xc20707c5, 0x31c4c4f5, 0x8a2222a8, 0xa7969631, 0xce3737f9, 0x7aeded97, 0xbff6f649, 0x2db4b499, 0x75d1d1a4, 0xd3434390, 0x1248485a, 0xbae2e258, 0xe6979771, 0xb6d2d264, 0xb2c2c270, - 0x8b2626ad, 0x68a5a5cd, 0x955e5ecb, 0x4b292962, 0x0c30303c, 0x945a5ace, 0x76ddddab, 0x7ff9f986, 0x649595f1, 0xbbe6e65d, 0xf2c7c735, 0x0924242d, 0xc61717d1, 0x6fb9b9d6, 0xc51b1bde, 0x86121294, - 0x18606078, 0xf3c3c330, 0x7cf5f589, 0xefb3b35c, 0x3ae8e8d2, 0xdf7373ac, 0x4c353579, 0x208080a0, 0x78e5e59d, 0xedbbbb56, 0x5e7d7d23, 0x3ef8f8c6, 0xd45f5f8b, 0xc82f2fe7, 0x39e4e4dd, 0x49212168, -} - -var sbox1 = [256]uint32{ - 0x5b5b8ed5, 0x4242d092, 0xa7a74dea, 0xfbfb06fd, 0x3333fccf, 0x878765e2, 0xf4f4c93d, 0xdede6bb5, 0x58584e16, 0xdada6eb4, 0x50504414, 0x0b0bcac1, 0xa0a08828, 0xefef17f8, 0xb0b09c2c, 0x14141105, - 0xacac872b, 0x9d9dfb66, 0x6a6af298, 0xd9d9ae77, 0xa8a8822a, 0xfafa46bc, 0x10101404, 0x0f0fcfc0, 0xaaaa02a8, 0x11115445, 0x4c4c5f13, 0x9898be26, 0x25256d48, 0x1a1a9e84, 0x18181e06, 0x6666fd9b, - 0x7272ec9e, 0x09094a43, 0x41411051, 0xd3d324f7, 0x4646d593, 0xbfbf53ec, 0x6262f89a, 0xe9e9927b, 0xccccff33, 0x51510455, 0x2c2c270b, 0x0d0d4f42, 0xb7b759ee, 0x3f3ff3cc, 0xb2b21cae, 0x8989ea63, - 0x939374e7, 0xcece7fb1, 0x70706c1c, 0xa6a60dab, 0x2727edca, 0x20202808, 0xa3a348eb, 0x5656c197, 0x02028082, 0x7f7fa3dc, 0x5252c496, 0xebeb12f9, 0xd5d5a174, 0x3e3eb38d, 0xfcfcc33f, 0x9a9a3ea4, - 0x1d1d5b46, 0x1c1c1b07, 0x9e9e3ba5, 0xf3f30cff, 0xcfcf3ff0, 0xcdcdbf72, 0x5c5c4b17, 0xeaea52b8, 0x0e0e8f81, 0x65653d58, 0xf0f0cc3c, 0x64647d19, 0x9b9b7ee5, 0x16169187, 0x3d3d734e, 0xa2a208aa, - 0xa1a1c869, 0xadadc76a, 0x06068583, 0xcaca7ab0, 0xc5c5b570, 0x9191f465, 0x6b6bb2d9, 0x2e2ea789, 0xe3e318fb, 0xafaf47e8, 0x3c3c330f, 0x2d2d674a, 0xc1c1b071, 0x59590e57, 0x7676e99f, 0xd4d4e135, - 0x7878661e, 0x9090b424, 0x3838360e, 0x7979265f, 0x8d8def62, 0x61613859, 0x474795d2, 0x8a8a2aa0, 0x9494b125, 0x8888aa22, 0xf1f18c7d, 0xececd73b, 0x04040501, 0x8484a521, 0xe1e19879, 0x1e1e9b85, - 0x535384d7, 0x00000000, 0x19195e47, 0x5d5d0b56, 0x7e7ee39d, 0x4f4f9fd0, 0x9c9cbb27, 0x49491a53, 0x31317c4d, 0xd8d8ee36, 0x08080a02, 0x9f9f7be4, 0x828220a2, 0x1313d4c7, 0x2323e8cb, 0x7a7ae69c, - 0xabab42e9, 0xfefe43bd, 0x2a2aa288, 0x4b4b9ad1, 0x01014041, 0x1f1fdbc4, 0xe0e0d838, 0xd6d661b7, 0x8e8e2fa1, 0xdfdf2bf4, 0xcbcb3af1, 0x3b3bf6cd, 0xe7e71dfa, 0x8585e560, 0x54544115, 0x868625a3, - 0x838360e3, 0xbaba16ac, 0x7575295c, 0x929234a6, 0x6e6ef799, 0xd0d0e434, 0x6868721a, 0x55550154, 0xb6b619af, 0x4e4edf91, 0xc8c8fa32, 0xc0c0f030, 0xd7d721f6, 0x3232bc8e, 0xc6c675b3, 0x8f8f6fe0, - 0x7474691d, 0xdbdb2ef5, 0x8b8b6ae1, 0xb8b8962e, 0x0a0a8a80, 0x9999fe67, 0x2b2be2c9, 0x8181e061, 0x0303c0c3, 0xa4a48d29, 0x8c8caf23, 0xaeae07a9, 0x3434390d, 0x4d4d1f52, 0x3939764f, 0xbdbdd36e, - 0x575781d6, 0x6f6fb7d8, 0xdcdceb37, 0x15155144, 0x7b7ba6dd, 0xf7f709fe, 0x3a3ab68c, 0xbcbc932f, 0x0c0c0f03, 0xffff03fc, 0xa9a9c26b, 0xc9c9ba73, 0xb5b5d96c, 0xb1b1dc6d, 0x6d6d375a, 0x45451550, - 0x3636b98f, 0x6c6c771b, 0xbebe13ad, 0x4a4ada90, 0xeeee57b9, 0x7777a9de, 0xf2f24cbe, 0xfdfd837e, 0x44445511, 0x6767bdda, 0x71712c5d, 0x05054540, 0x7c7c631f, 0x40405010, 0x6969325b, 0x6363b8db, - 0x2828220a, 0x0707c5c2, 0xc4c4f531, 0x2222a88a, 0x969631a7, 0x3737f9ce, 0xeded977a, 0xf6f649bf, 0xb4b4992d, 0xd1d1a475, 0x434390d3, 0x48485a12, 0xe2e258ba, 0x979771e6, 0xd2d264b6, 0xc2c270b2, - 0x2626ad8b, 0xa5a5cd68, 0x5e5ecb95, 0x2929624b, 0x30303c0c, 0x5a5ace94, 0xddddab76, 0xf9f9867f, 0x9595f164, 0xe6e65dbb, 0xc7c735f2, 0x24242d09, 0x1717d1c6, 0xb9b9d66f, 0x1b1bdec5, 0x12129486, - 0x60607818, 0xc3c330f3, 0xf5f5897c, 0xb3b35cef, 0xe8e8d23a, 0x7373acdf, 0x3535794c, 0x8080a020, 0xe5e59d78, 0xbbbb56ed, 0x7d7d235e, 0xf8f8c63e, 0x5f5f8bd4, 0x2f2fe7c8, 0xe4e4dd39, 0x21216849, -} - -var sbox2 = [256]uint32{ - 0x5b8ed55b, 0x42d09242, 0xa74deaa7, 0xfb06fdfb, 0x33fccf33, 0x8765e287, 0xf4c93df4, 0xde6bb5de, 0x584e1658, 0xda6eb4da, 0x50441450, 0x0bcac10b, 0xa08828a0, 0xef17f8ef, 0xb09c2cb0, 0x14110514, - 0xac872bac, 0x9dfb669d, 0x6af2986a, 0xd9ae77d9, 0xa8822aa8, 0xfa46bcfa, 0x10140410, 0x0fcfc00f, 0xaa02a8aa, 0x11544511, 0x4c5f134c, 0x98be2698, 0x256d4825, 0x1a9e841a, 0x181e0618, 0x66fd9b66, - 0x72ec9e72, 0x094a4309, 0x41105141, 0xd324f7d3, 0x46d59346, 0xbf53ecbf, 0x62f89a62, 0xe9927be9, 0xccff33cc, 0x51045551, 0x2c270b2c, 0x0d4f420d, 0xb759eeb7, 0x3ff3cc3f, 0xb21caeb2, 0x89ea6389, - 0x9374e793, 0xce7fb1ce, 0x706c1c70, 0xa60daba6, 0x27edca27, 0x20280820, 0xa348eba3, 0x56c19756, 0x02808202, 0x7fa3dc7f, 0x52c49652, 0xeb12f9eb, 0xd5a174d5, 0x3eb38d3e, 0xfcc33ffc, 0x9a3ea49a, - 0x1d5b461d, 0x1c1b071c, 0x9e3ba59e, 0xf30cfff3, 0xcf3ff0cf, 0xcdbf72cd, 0x5c4b175c, 0xea52b8ea, 0x0e8f810e, 0x653d5865, 0xf0cc3cf0, 0x647d1964, 0x9b7ee59b, 0x16918716, 0x3d734e3d, 0xa208aaa2, - 0xa1c869a1, 0xadc76aad, 0x06858306, 0xca7ab0ca, 0xc5b570c5, 0x91f46591, 0x6bb2d96b, 0x2ea7892e, 0xe318fbe3, 0xaf47e8af, 0x3c330f3c, 0x2d674a2d, 0xc1b071c1, 0x590e5759, 0x76e99f76, 0xd4e135d4, - 0x78661e78, 0x90b42490, 0x38360e38, 0x79265f79, 0x8def628d, 0x61385961, 0x4795d247, 0x8a2aa08a, 0x94b12594, 0x88aa2288, 0xf18c7df1, 0xecd73bec, 0x04050104, 0x84a52184, 0xe19879e1, 0x1e9b851e, - 0x5384d753, 0x00000000, 0x195e4719, 0x5d0b565d, 0x7ee39d7e, 0x4f9fd04f, 0x9cbb279c, 0x491a5349, 0x317c4d31, 0xd8ee36d8, 0x080a0208, 0x9f7be49f, 0x8220a282, 0x13d4c713, 0x23e8cb23, 0x7ae69c7a, - 0xab42e9ab, 0xfe43bdfe, 0x2aa2882a, 0x4b9ad14b, 0x01404101, 0x1fdbc41f, 0xe0d838e0, 0xd661b7d6, 0x8e2fa18e, 0xdf2bf4df, 0xcb3af1cb, 0x3bf6cd3b, 0xe71dfae7, 0x85e56085, 0x54411554, 0x8625a386, - 0x8360e383, 0xba16acba, 0x75295c75, 0x9234a692, 0x6ef7996e, 0xd0e434d0, 0x68721a68, 0x55015455, 0xb619afb6, 0x4edf914e, 0xc8fa32c8, 0xc0f030c0, 0xd721f6d7, 0x32bc8e32, 0xc675b3c6, 0x8f6fe08f, - 0x74691d74, 0xdb2ef5db, 0x8b6ae18b, 0xb8962eb8, 0x0a8a800a, 0x99fe6799, 0x2be2c92b, 0x81e06181, 0x03c0c303, 0xa48d29a4, 0x8caf238c, 0xae07a9ae, 0x34390d34, 0x4d1f524d, 0x39764f39, 0xbdd36ebd, - 0x5781d657, 0x6fb7d86f, 0xdceb37dc, 0x15514415, 0x7ba6dd7b, 0xf709fef7, 0x3ab68c3a, 0xbc932fbc, 0x0c0f030c, 0xff03fcff, 0xa9c26ba9, 0xc9ba73c9, 0xb5d96cb5, 0xb1dc6db1, 0x6d375a6d, 0x45155045, - 0x36b98f36, 0x6c771b6c, 0xbe13adbe, 0x4ada904a, 0xee57b9ee, 0x77a9de77, 0xf24cbef2, 0xfd837efd, 0x44551144, 0x67bdda67, 0x712c5d71, 0x05454005, 0x7c631f7c, 0x40501040, 0x69325b69, 0x63b8db63, - 0x28220a28, 0x07c5c207, 0xc4f531c4, 0x22a88a22, 0x9631a796, 0x37f9ce37, 0xed977aed, 0xf649bff6, 0xb4992db4, 0xd1a475d1, 0x4390d343, 0x485a1248, 0xe258bae2, 0x9771e697, 0xd264b6d2, 0xc270b2c2, - 0x26ad8b26, 0xa5cd68a5, 0x5ecb955e, 0x29624b29, 0x303c0c30, 0x5ace945a, 0xddab76dd, 0xf9867ff9, 0x95f16495, 0xe65dbbe6, 0xc735f2c7, 0x242d0924, 0x17d1c617, 0xb9d66fb9, 0x1bdec51b, 0x12948612, - 0x60781860, 0xc330f3c3, 0xf5897cf5, 0xb35cefb3, 0xe8d23ae8, 0x73acdf73, 0x35794c35, 0x80a02080, 0xe59d78e5, 0xbb56edbb, 0x7d235e7d, 0xf8c63ef8, 0x5f8bd45f, 0x2fe7c82f, 0xe4dd39e4, 0x21684921, -} - -var sbox3 = [256]uint32{ - 0x8ed55b5b, 0xd0924242, 0x4deaa7a7, 0x06fdfbfb, 0xfccf3333, 0x65e28787, 0xc93df4f4, 0x6bb5dede, 0x4e165858, 0x6eb4dada, 0x44145050, 0xcac10b0b, 0x8828a0a0, 0x17f8efef, 0x9c2cb0b0, 0x11051414, - 0x872bacac, 0xfb669d9d, 0xf2986a6a, 0xae77d9d9, 0x822aa8a8, 0x46bcfafa, 0x14041010, 0xcfc00f0f, 0x02a8aaaa, 0x54451111, 0x5f134c4c, 0xbe269898, 0x6d482525, 0x9e841a1a, 0x1e061818, 0xfd9b6666, - 0xec9e7272, 0x4a430909, 0x10514141, 0x24f7d3d3, 0xd5934646, 0x53ecbfbf, 0xf89a6262, 0x927be9e9, 0xff33cccc, 0x04555151, 0x270b2c2c, 0x4f420d0d, 0x59eeb7b7, 0xf3cc3f3f, 0x1caeb2b2, 0xea638989, - 0x74e79393, 0x7fb1cece, 0x6c1c7070, 0x0daba6a6, 0xedca2727, 0x28082020, 0x48eba3a3, 0xc1975656, 0x80820202, 0xa3dc7f7f, 0xc4965252, 0x12f9ebeb, 0xa174d5d5, 0xb38d3e3e, 0xc33ffcfc, 0x3ea49a9a, - 0x5b461d1d, 0x1b071c1c, 0x3ba59e9e, 0x0cfff3f3, 0x3ff0cfcf, 0xbf72cdcd, 0x4b175c5c, 0x52b8eaea, 0x8f810e0e, 0x3d586565, 0xcc3cf0f0, 0x7d196464, 0x7ee59b9b, 0x91871616, 0x734e3d3d, 0x08aaa2a2, - 0xc869a1a1, 0xc76aadad, 0x85830606, 0x7ab0caca, 0xb570c5c5, 0xf4659191, 0xb2d96b6b, 0xa7892e2e, 0x18fbe3e3, 0x47e8afaf, 0x330f3c3c, 0x674a2d2d, 0xb071c1c1, 0x0e575959, 0xe99f7676, 0xe135d4d4, - 0x661e7878, 0xb4249090, 0x360e3838, 0x265f7979, 0xef628d8d, 0x38596161, 0x95d24747, 0x2aa08a8a, 0xb1259494, 0xaa228888, 0x8c7df1f1, 0xd73becec, 0x05010404, 0xa5218484, 0x9879e1e1, 0x9b851e1e, - 0x84d75353, 0x00000000, 0x5e471919, 0x0b565d5d, 0xe39d7e7e, 0x9fd04f4f, 0xbb279c9c, 0x1a534949, 0x7c4d3131, 0xee36d8d8, 0x0a020808, 0x7be49f9f, 0x20a28282, 0xd4c71313, 0xe8cb2323, 0xe69c7a7a, - 0x42e9abab, 0x43bdfefe, 0xa2882a2a, 0x9ad14b4b, 0x40410101, 0xdbc41f1f, 0xd838e0e0, 0x61b7d6d6, 0x2fa18e8e, 0x2bf4dfdf, 0x3af1cbcb, 0xf6cd3b3b, 0x1dfae7e7, 0xe5608585, 0x41155454, 0x25a38686, - 0x60e38383, 0x16acbaba, 0x295c7575, 0x34a69292, 0xf7996e6e, 0xe434d0d0, 0x721a6868, 0x01545555, 0x19afb6b6, 0xdf914e4e, 0xfa32c8c8, 0xf030c0c0, 0x21f6d7d7, 0xbc8e3232, 0x75b3c6c6, 0x6fe08f8f, - 0x691d7474, 0x2ef5dbdb, 0x6ae18b8b, 0x962eb8b8, 0x8a800a0a, 0xfe679999, 0xe2c92b2b, 0xe0618181, 0xc0c30303, 0x8d29a4a4, 0xaf238c8c, 0x07a9aeae, 0x390d3434, 0x1f524d4d, 0x764f3939, 0xd36ebdbd, - 0x81d65757, 0xb7d86f6f, 0xeb37dcdc, 0x51441515, 0xa6dd7b7b, 0x09fef7f7, 0xb68c3a3a, 0x932fbcbc, 0x0f030c0c, 0x03fcffff, 0xc26ba9a9, 0xba73c9c9, 0xd96cb5b5, 0xdc6db1b1, 0x375a6d6d, 0x15504545, - 0xb98f3636, 0x771b6c6c, 0x13adbebe, 0xda904a4a, 0x57b9eeee, 0xa9de7777, 0x4cbef2f2, 0x837efdfd, 0x55114444, 0xbdda6767, 0x2c5d7171, 0x45400505, 0x631f7c7c, 0x50104040, 0x325b6969, 0xb8db6363, - 0x220a2828, 0xc5c20707, 0xf531c4c4, 0xa88a2222, 0x31a79696, 0xf9ce3737, 0x977aeded, 0x49bff6f6, 0x992db4b4, 0xa475d1d1, 0x90d34343, 0x5a124848, 0x58bae2e2, 0x71e69797, 0x64b6d2d2, 0x70b2c2c2, - 0xad8b2626, 0xcd68a5a5, 0xcb955e5e, 0x624b2929, 0x3c0c3030, 0xce945a5a, 0xab76dddd, 0x867ff9f9, 0xf1649595, 0x5dbbe6e6, 0x35f2c7c7, 0x2d092424, 0xd1c61717, 0xd66fb9b9, 0xdec51b1b, 0x94861212, - 0x78186060, 0x30f3c3c3, 0x897cf5f5, 0x5cefb3b3, 0xd23ae8e8, 0xacdf7373, 0x794c3535, 0xa0208080, 0x9d78e5e5, 0x56edbbbb, 0x235e7d7d, 0xc63ef8f8, 0x8bd45f5f, 0xe7c82f2f, 0xdd39e4e4, 0x68492121, -} - -func rl(x uint32, i uint8) uint32 { return (x << (i % 32)) | (x >> (32 - (i % 32))) } - -func l0(b uint32) uint32 { return b ^ rl(b, 13) ^ rl(b, 23) } - -func feistel0(x0, x1, x2, x3, rk uint32) uint32 { return x0 ^ l0(p(x1^x2^x3^rk)) } - -//非线性变换τ(.) -func p(a uint32) uint32 { - return (uint32(sbox[a>>24]) << 24) ^ (uint32(sbox[(a>>16)&0xff]) << 16) ^ (uint32(sbox[(a>>8)&0xff]) << 8) ^ uint32(sbox[(a)&0xff]) -} - -func permuteInitialBlock(b []uint32, block []byte) { - for i := 0; i < 4; i++ { - b[i] = (uint32(block[i*4]) << 24) | (uint32(block[i*4+1]) << 16) | - (uint32(block[i*4+2]) << 8) | (uint32(block[i*4+3])) - } -} - -func permuteFinalBlock(b []byte, block []uint32) { - for i := 0; i < 4; i++ { - b[i*4] = uint8(block[i] >> 24) - b[i*4+1] = uint8(block[i] >> 16) - b[i*4+2] = uint8(block[i] >> 8) - b[i*4+3] = uint8(block[i]) - } -} - -//修改后的加密核心函数 -func cryptBlock(subkeys []uint32, b []uint32, r []byte, dst, src []byte, decrypt bool) { - var x uint32 - permuteInitialBlock(b, src) - if decrypt { - for i := 0; i < 8; i++ { - x = b[1] ^ b[2] ^ b[3] ^ subkeys[31-4*i] - b[0] = b[0] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - x = b[0] ^ b[2] ^ b[3] ^ subkeys[31-4*i-1] - b[1] = b[1] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - x = b[0] ^ b[1] ^ b[3] ^ subkeys[31-4*i-2] - b[2] = b[2] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - x = b[1] ^ b[2] ^ b[0] ^ subkeys[31-4*i-3] - b[3] = b[3] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - } - } else { - for i := 0; i < 8; i++ { - x = b[1] ^ b[2] ^ b[3] ^ subkeys[4*i] - b[0] = b[0] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - x = b[0] ^ b[2] ^ b[3] ^ subkeys[4*i+1] - b[1] = b[1] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - x = b[0] ^ b[1] ^ b[3] ^ subkeys[4*i+2] - b[2] = b[2] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - x = b[1] ^ b[2] ^ b[0] ^ subkeys[4*i+3] - b[3] = b[3] ^ sbox0[x&0xff] ^ sbox1[(x>>8)&0xff] ^ sbox2[(x>>16)&0xff] ^ sbox3[(x>>24)&0xff] - } - } - b[0], b[1], b[2], b[3] = b[3], b[2], b[1], b[0] - permuteFinalBlock(r, b) - copy(dst, r) -} - -func generateSubKeys(key []byte) []uint32 { - subkeys := make([]uint32, 32) - b := make([]uint32, 4) - permuteInitialBlock(b, key) - b[0] ^= fk[0] - b[1] ^= fk[1] - b[2] ^= fk[2] - b[3] ^= fk[3] - for i := 0; i < 32; i++ { - subkeys[i] = feistel0(b[0], b[1], b[2], b[3], ck[i]) - b[0], b[1], b[2], b[3] = b[1], b[2], b[3], subkeys[i] - } - return subkeys -} - -func EncryptBlock(key SM4Key, dst, src []byte) { - subkeys := generateSubKeys(key) - cryptBlock(subkeys, make([]uint32, 4), make([]byte, 16), dst, src, false) -} - -func DecryptBlock(key SM4Key, dst, src []byte) { - subkeys := generateSubKeys(key) - cryptBlock(subkeys, make([]uint32, 4), make([]byte, 16), dst, src, true) -} - -func ReadKeyFromMem(data []byte, pwd []byte) (SM4Key, error) { - block, _ := pem.Decode(data) - if x509.IsEncryptedPEMBlock(block) { - if block.Type != "SM4 ENCRYPTED KEY" { - return nil, errors.New("SM4: unknown type") - } - if pwd == nil { - return nil, errors.New("SM4: need passwd") - } - data, err := x509.DecryptPEMBlock(block, pwd) - if err != nil { - return nil, err - } - return data, nil - } - if block.Type != "SM4 KEY" { - return nil, errors.New("SM4: unknown type") - } - return block.Bytes, nil -} - -func ReadKeyFromPem(FileName string, pwd []byte) (SM4Key, error) { - data, err := ioutil.ReadFile(FileName) - if err != nil { - return nil, err - } - return ReadKeyFromMem(data, pwd) -} - -func WriteKeytoMem(key SM4Key, pwd []byte) ([]byte, error) { - if pwd != nil { - block, err := x509.EncryptPEMBlock(rand.Reader, - "SM4 ENCRYPTED KEY", key, pwd, x509.PEMCipherAES256) - if err != nil { - return nil, err - } - return pem.EncodeToMemory(block), nil - } else { - block := &pem.Block{ - Type: "SM4 KEY", - Bytes: key, - } - return pem.EncodeToMemory(block), nil - } -} - -func WriteKeyToPem(FileName string, key SM4Key, pwd []byte) (bool, error) { - var block *pem.Block - - if pwd != nil { - var err error - block, err = x509.EncryptPEMBlock(rand.Reader, - "SM4 ENCRYPTED KEY", key, pwd, x509.PEMCipherAES256) - if err != nil { - return false, err - } - } else { - block = &pem.Block{ - Type: "SM4 KEY", - Bytes: key, - } - } - file, err := os.Create(FileName) - if err != nil { - return false, err - } - defer file.Close() - err = pem.Encode(file, block) - if err != nil { - return false, nil - } - return true, nil -} - -func (k KeySizeError) Error() string { - return "SM4: invalid key size " + strconv.Itoa(int(k)) -} - -// NewCipher creates and returns a new cipher.Block. -func NewCipher(key []byte) (cipher.Block, error) { - if len(key) != BlockSize { - return nil, KeySizeError(len(key)) - } - c := new(Sm4Cipher) - c.subkeys = generateSubKeys(key) - c.block1 = make([]uint32, 4) - c.block2 = make([]byte, 16) - return c, nil -} - -func (c *Sm4Cipher) BlockSize() int { - return BlockSize -} - -func (c *Sm4Cipher) Encrypt(dst, src []byte) { - cryptBlock(c.subkeys, c.block1, c.block2, dst, src, false) -} - -func (c *Sm4Cipher) Decrypt(dst, src []byte) { - cryptBlock(c.subkeys, c.block1, c.block2, dst, src, true) -} diff --git a/vendor/github.com/vitrun/qart/coding/LICENSE b/vendor/github.com/vitrun/qart/LICENSE similarity index 100% rename from vendor/github.com/vitrun/qart/coding/LICENSE rename to vendor/github.com/vitrun/qart/LICENSE diff --git a/vendor/golang.org/x/crypto/twofish/LICENSE b/vendor/github.com/vitrun/qart/LICENSE.bsd similarity index 96% rename from vendor/golang.org/x/crypto/twofish/LICENSE rename to vendor/github.com/vitrun/qart/LICENSE.bsd index 6a66aea5e..063941ffc 100644 --- a/vendor/golang.org/x/crypto/twofish/LICENSE +++ b/vendor/github.com/vitrun/qart/LICENSE.bsd @@ -1,5 +1,3 @@ -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: diff --git a/vendor/github.com/vitrun/qart/gf256/LICENSE b/vendor/github.com/vitrun/qart/gf256/LICENSE deleted file mode 100644 index ad410e113..000000000 --- a/vendor/github.com/vitrun/qart/gf256/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/github.com/vitrun/qart/qr/LICENSE b/vendor/github.com/vitrun/qart/qr/LICENSE deleted file mode 100644 index ad410e113..000000000 --- a/vendor/github.com/vitrun/qart/qr/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/golang.org/x/crypto/AUTHORS b/vendor/golang.org/x/crypto/AUTHORS new file mode 100644 index 000000000..2b00ddba0 --- /dev/null +++ b/vendor/golang.org/x/crypto/AUTHORS @@ -0,0 +1,3 @@ +# 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/golang.org/x/crypto/CONTRIBUTORS b/vendor/golang.org/x/crypto/CONTRIBUTORS new file mode 100644 index 000000000..1fbd3e976 --- /dev/null +++ b/vendor/golang.org/x/crypto/CONTRIBUTORS @@ -0,0 +1,3 @@ +# 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/golang.org/x/crypto/bcrypt/LICENSE b/vendor/golang.org/x/crypto/LICENSE similarity index 100% rename from vendor/golang.org/x/crypto/bcrypt/LICENSE rename to vendor/golang.org/x/crypto/LICENSE diff --git a/vendor/golang.org/x/crypto/PATENTS b/vendor/golang.org/x/crypto/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/golang.org/x/crypto/PATENTS @@ -0,0 +1,22 @@ +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/golang.org/x/crypto/cast5/cast5.go b/vendor/golang.org/x/crypto/cast5/cast5.go deleted file mode 100644 index 0b4af37bd..000000000 --- a/vendor/golang.org/x/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 "golang.org/x/crypto/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/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go deleted file mode 100644 index 593f65300..000000000 --- a/vendor/golang.org/x/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 "golang.org/x/crypto/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/golang.org/x/crypto/salsa20/salsa/hsalsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go deleted file mode 100644 index 4c96147c8..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go +++ /dev/null @@ -1,144 +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 provides low-level access to functions in the Salsa family. -package salsa // import "golang.org/x/crypto/salsa20/salsa" - -// Sigma is the Salsa20 constant for 256-bit keys. -var Sigma = [16]byte{'e', 'x', 'p', 'a', 'n', 'd', ' ', '3', '2', '-', 'b', 'y', 't', 'e', ' ', 'k'} - -// HSalsa20 applies the HSalsa20 core function to a 16-byte input in, 32-byte -// key k, and 16-byte constant c, and puts the result into the 32-byte array -// out. -func HSalsa20(out *[32]byte, in *[16]byte, k *[32]byte, c *[16]byte) { - x0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24 - x1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24 - x2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24 - x3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24 - x4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24 - x5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24 - x6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24 - x7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24 - x8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24 - x9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24 - x10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24 - x11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24 - x12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24 - x13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24 - x14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24 - x15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24 - - for i := 0; i < 20; 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) - } - out[0] = byte(x0) - out[1] = byte(x0 >> 8) - out[2] = byte(x0 >> 16) - out[3] = byte(x0 >> 24) - - out[4] = byte(x5) - out[5] = byte(x5 >> 8) - out[6] = byte(x5 >> 16) - out[7] = byte(x5 >> 24) - - out[8] = byte(x10) - out[9] = byte(x10 >> 8) - out[10] = byte(x10 >> 16) - out[11] = byte(x10 >> 24) - - out[12] = byte(x15) - out[13] = byte(x15 >> 8) - out[14] = byte(x15 >> 16) - out[15] = byte(x15 >> 24) - - out[16] = byte(x6) - out[17] = byte(x6 >> 8) - out[18] = byte(x6 >> 16) - out[19] = byte(x6 >> 24) - - out[20] = byte(x7) - out[21] = byte(x7 >> 8) - out[22] = byte(x7 >> 16) - out[23] = byte(x7 >> 24) - - out[24] = byte(x8) - out[25] = byte(x8 >> 8) - out[26] = byte(x8 >> 16) - out[27] = byte(x8 >> 24) - - out[28] = byte(x9) - out[29] = byte(x9 >> 8) - out[30] = byte(x9 >> 16) - out[31] = byte(x9 >> 24) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s b/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s deleted file mode 100644 index 22afbdcad..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa2020_amd64.s +++ /dev/null @@ -1,889 +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,!appengine,!gccgo - -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html - -// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) -// This needs up to 64 bytes at 360(SP); hence the non-obvious frame size. -TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment - MOVQ out+0(FP),DI - MOVQ in+8(FP),SI - MOVQ n+16(FP),DX - MOVQ nonce+24(FP),CX - MOVQ key+32(FP),R8 - - MOVQ SP,R12 - MOVQ SP,R9 - ADDQ $31, R9 - ANDQ $~31, R9 - MOVQ R9, SP - - MOVQ DX,R9 - MOVQ CX,DX - MOVQ R8,R10 - CMPQ R9,$0 - JBE DONE - START: - MOVL 20(R10),CX - MOVL 0(R10),R8 - MOVL 0(DX),AX - MOVL 16(R10),R11 - MOVL CX,0(SP) - MOVL R8, 4 (SP) - MOVL AX, 8 (SP) - MOVL R11, 12 (SP) - MOVL 8(DX),CX - MOVL 24(R10),R8 - MOVL 4(R10),AX - MOVL 4(DX),R11 - MOVL CX,16(SP) - MOVL R8, 20 (SP) - MOVL AX, 24 (SP) - MOVL R11, 28 (SP) - MOVL 12(DX),CX - MOVL 12(R10),DX - MOVL 28(R10),R8 - MOVL 8(R10),AX - MOVL DX,32(SP) - MOVL CX, 36 (SP) - MOVL R8, 40 (SP) - MOVL AX, 44 (SP) - MOVQ $1634760805,DX - MOVQ $857760878,CX - MOVQ $2036477234,R8 - MOVQ $1797285236,AX - MOVL DX,48(SP) - MOVL CX, 52 (SP) - MOVL R8, 56 (SP) - MOVL AX, 60 (SP) - CMPQ R9,$256 - JB BYTESBETWEEN1AND255 - MOVOA 48(SP),X0 - PSHUFL $0X55,X0,X1 - PSHUFL $0XAA,X0,X2 - PSHUFL $0XFF,X0,X3 - PSHUFL $0X00,X0,X0 - MOVOA X1,64(SP) - MOVOA X2,80(SP) - MOVOA X3,96(SP) - MOVOA X0,112(SP) - MOVOA 0(SP),X0 - PSHUFL $0XAA,X0,X1 - PSHUFL $0XFF,X0,X2 - PSHUFL $0X00,X0,X3 - PSHUFL $0X55,X0,X0 - MOVOA X1,128(SP) - MOVOA X2,144(SP) - MOVOA X3,160(SP) - MOVOA X0,176(SP) - MOVOA 16(SP),X0 - PSHUFL $0XFF,X0,X1 - PSHUFL $0X55,X0,X2 - PSHUFL $0XAA,X0,X0 - MOVOA X1,192(SP) - MOVOA X2,208(SP) - MOVOA X0,224(SP) - MOVOA 32(SP),X0 - PSHUFL $0X00,X0,X1 - PSHUFL $0XAA,X0,X2 - PSHUFL $0XFF,X0,X0 - MOVOA X1,240(SP) - MOVOA X2,256(SP) - MOVOA X0,272(SP) - BYTESATLEAST256: - MOVL 16(SP),DX - MOVL 36 (SP),CX - MOVL DX,288(SP) - MOVL CX,304(SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 292 (SP) - MOVL CX, 308 (SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 296 (SP) - MOVL CX, 312 (SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 300 (SP) - MOVL CX, 316 (SP) - ADDQ $1,DX - SHLQ $32,CX - ADDQ CX,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX,16(SP) - MOVL CX, 36 (SP) - MOVQ R9,352(SP) - MOVQ $20,DX - MOVOA 64(SP),X0 - MOVOA 80(SP),X1 - MOVOA 96(SP),X2 - MOVOA 256(SP),X3 - MOVOA 272(SP),X4 - MOVOA 128(SP),X5 - MOVOA 144(SP),X6 - MOVOA 176(SP),X7 - MOVOA 192(SP),X8 - MOVOA 208(SP),X9 - MOVOA 224(SP),X10 - MOVOA 304(SP),X11 - MOVOA 112(SP),X12 - MOVOA 160(SP),X13 - MOVOA 240(SP),X14 - MOVOA 288(SP),X15 - MAINLOOP1: - MOVOA X1,320(SP) - MOVOA X2,336(SP) - MOVOA X13,X1 - PADDL X12,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X14 - PSRLL $25,X2 - PXOR X2,X14 - MOVOA X7,X1 - PADDL X0,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X11 - PSRLL $25,X2 - PXOR X2,X11 - MOVOA X12,X1 - PADDL X14,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X15 - PSRLL $23,X2 - PXOR X2,X15 - MOVOA X0,X1 - PADDL X11,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X9 - PSRLL $23,X2 - PXOR X2,X9 - MOVOA X14,X1 - PADDL X15,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X13 - PSRLL $19,X2 - PXOR X2,X13 - MOVOA X11,X1 - PADDL X9,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X7 - PSRLL $19,X2 - PXOR X2,X7 - MOVOA X15,X1 - PADDL X13,X1 - MOVOA X1,X2 - PSLLL $18,X1 - PXOR X1,X12 - PSRLL $14,X2 - PXOR X2,X12 - MOVOA 320(SP),X1 - MOVOA X12,320(SP) - MOVOA X9,X2 - PADDL X7,X2 - MOVOA X2,X12 - PSLLL $18,X2 - PXOR X2,X0 - PSRLL $14,X12 - PXOR X12,X0 - MOVOA X5,X2 - PADDL X1,X2 - MOVOA X2,X12 - PSLLL $7,X2 - PXOR X2,X3 - PSRLL $25,X12 - PXOR X12,X3 - MOVOA 336(SP),X2 - MOVOA X0,336(SP) - MOVOA X6,X0 - PADDL X2,X0 - MOVOA X0,X12 - PSLLL $7,X0 - PXOR X0,X4 - PSRLL $25,X12 - PXOR X12,X4 - MOVOA X1,X0 - PADDL X3,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X10 - PSRLL $23,X12 - PXOR X12,X10 - MOVOA X2,X0 - PADDL X4,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X8 - PSRLL $23,X12 - PXOR X12,X8 - MOVOA X3,X0 - PADDL X10,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X5 - PSRLL $19,X12 - PXOR X12,X5 - MOVOA X4,X0 - PADDL X8,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X6 - PSRLL $19,X12 - PXOR X12,X6 - MOVOA X10,X0 - PADDL X5,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X1 - PSRLL $14,X12 - PXOR X12,X1 - MOVOA 320(SP),X0 - MOVOA X1,320(SP) - MOVOA X4,X1 - PADDL X0,X1 - MOVOA X1,X12 - PSLLL $7,X1 - PXOR X1,X7 - PSRLL $25,X12 - PXOR X12,X7 - MOVOA X8,X1 - PADDL X6,X1 - MOVOA X1,X12 - PSLLL $18,X1 - PXOR X1,X2 - PSRLL $14,X12 - PXOR X12,X2 - MOVOA 336(SP),X12 - MOVOA X2,336(SP) - MOVOA X14,X1 - PADDL X12,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X5 - PSRLL $25,X2 - PXOR X2,X5 - MOVOA X0,X1 - PADDL X7,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X10 - PSRLL $23,X2 - PXOR X2,X10 - MOVOA X12,X1 - PADDL X5,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X8 - PSRLL $23,X2 - PXOR X2,X8 - MOVOA X7,X1 - PADDL X10,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X4 - PSRLL $19,X2 - PXOR X2,X4 - MOVOA X5,X1 - PADDL X8,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X14 - PSRLL $19,X2 - PXOR X2,X14 - MOVOA X10,X1 - PADDL X4,X1 - MOVOA X1,X2 - PSLLL $18,X1 - PXOR X1,X0 - PSRLL $14,X2 - PXOR X2,X0 - MOVOA 320(SP),X1 - MOVOA X0,320(SP) - MOVOA X8,X0 - PADDL X14,X0 - MOVOA X0,X2 - PSLLL $18,X0 - PXOR X0,X12 - PSRLL $14,X2 - PXOR X2,X12 - MOVOA X11,X0 - PADDL X1,X0 - MOVOA X0,X2 - PSLLL $7,X0 - PXOR X0,X6 - PSRLL $25,X2 - PXOR X2,X6 - MOVOA 336(SP),X2 - MOVOA X12,336(SP) - MOVOA X3,X0 - PADDL X2,X0 - MOVOA X0,X12 - PSLLL $7,X0 - PXOR X0,X13 - PSRLL $25,X12 - PXOR X12,X13 - MOVOA X1,X0 - PADDL X6,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X15 - PSRLL $23,X12 - PXOR X12,X15 - MOVOA X2,X0 - PADDL X13,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X9 - PSRLL $23,X12 - PXOR X12,X9 - MOVOA X6,X0 - PADDL X15,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X11 - PSRLL $19,X12 - PXOR X12,X11 - MOVOA X13,X0 - PADDL X9,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X3 - PSRLL $19,X12 - PXOR X12,X3 - MOVOA X15,X0 - PADDL X11,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X1 - PSRLL $14,X12 - PXOR X12,X1 - MOVOA X9,X0 - PADDL X3,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X2 - PSRLL $14,X12 - PXOR X12,X2 - MOVOA 320(SP),X12 - MOVOA 336(SP),X0 - SUBQ $2,DX - JA MAINLOOP1 - PADDL 112(SP),X12 - PADDL 176(SP),X7 - PADDL 224(SP),X10 - PADDL 272(SP),X4 - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 0(SI),DX - XORL 4(SI),CX - XORL 8(SI),R8 - XORL 12(SI),R9 - MOVL DX,0(DI) - MOVL CX,4(DI) - MOVL R8,8(DI) - MOVL R9,12(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 64(SI),DX - XORL 68(SI),CX - XORL 72(SI),R8 - XORL 76(SI),R9 - MOVL DX,64(DI) - MOVL CX,68(DI) - MOVL R8,72(DI) - MOVL R9,76(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 128(SI),DX - XORL 132(SI),CX - XORL 136(SI),R8 - XORL 140(SI),R9 - MOVL DX,128(DI) - MOVL CX,132(DI) - MOVL R8,136(DI) - MOVL R9,140(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - XORL 192(SI),DX - XORL 196(SI),CX - XORL 200(SI),R8 - XORL 204(SI),R9 - MOVL DX,192(DI) - MOVL CX,196(DI) - MOVL R8,200(DI) - MOVL R9,204(DI) - PADDL 240(SP),X14 - PADDL 64(SP),X0 - PADDL 128(SP),X5 - PADDL 192(SP),X8 - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 16(SI),DX - XORL 20(SI),CX - XORL 24(SI),R8 - XORL 28(SI),R9 - MOVL DX,16(DI) - MOVL CX,20(DI) - MOVL R8,24(DI) - MOVL R9,28(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 80(SI),DX - XORL 84(SI),CX - XORL 88(SI),R8 - XORL 92(SI),R9 - MOVL DX,80(DI) - MOVL CX,84(DI) - MOVL R8,88(DI) - MOVL R9,92(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 144(SI),DX - XORL 148(SI),CX - XORL 152(SI),R8 - XORL 156(SI),R9 - MOVL DX,144(DI) - MOVL CX,148(DI) - MOVL R8,152(DI) - MOVL R9,156(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - XORL 208(SI),DX - XORL 212(SI),CX - XORL 216(SI),R8 - XORL 220(SI),R9 - MOVL DX,208(DI) - MOVL CX,212(DI) - MOVL R8,216(DI) - MOVL R9,220(DI) - PADDL 288(SP),X15 - PADDL 304(SP),X11 - PADDL 80(SP),X1 - PADDL 144(SP),X6 - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 32(SI),DX - XORL 36(SI),CX - XORL 40(SI),R8 - XORL 44(SI),R9 - MOVL DX,32(DI) - MOVL CX,36(DI) - MOVL R8,40(DI) - MOVL R9,44(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 96(SI),DX - XORL 100(SI),CX - XORL 104(SI),R8 - XORL 108(SI),R9 - MOVL DX,96(DI) - MOVL CX,100(DI) - MOVL R8,104(DI) - MOVL R9,108(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 160(SI),DX - XORL 164(SI),CX - XORL 168(SI),R8 - XORL 172(SI),R9 - MOVL DX,160(DI) - MOVL CX,164(DI) - MOVL R8,168(DI) - MOVL R9,172(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - XORL 224(SI),DX - XORL 228(SI),CX - XORL 232(SI),R8 - XORL 236(SI),R9 - MOVL DX,224(DI) - MOVL CX,228(DI) - MOVL R8,232(DI) - MOVL R9,236(DI) - PADDL 160(SP),X13 - PADDL 208(SP),X9 - PADDL 256(SP),X3 - PADDL 96(SP),X2 - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 48(SI),DX - XORL 52(SI),CX - XORL 56(SI),R8 - XORL 60(SI),R9 - MOVL DX,48(DI) - MOVL CX,52(DI) - MOVL R8,56(DI) - MOVL R9,60(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 112(SI),DX - XORL 116(SI),CX - XORL 120(SI),R8 - XORL 124(SI),R9 - MOVL DX,112(DI) - MOVL CX,116(DI) - MOVL R8,120(DI) - MOVL R9,124(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 176(SI),DX - XORL 180(SI),CX - XORL 184(SI),R8 - XORL 188(SI),R9 - MOVL DX,176(DI) - MOVL CX,180(DI) - MOVL R8,184(DI) - MOVL R9,188(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - XORL 240(SI),DX - XORL 244(SI),CX - XORL 248(SI),R8 - XORL 252(SI),R9 - MOVL DX,240(DI) - MOVL CX,244(DI) - MOVL R8,248(DI) - MOVL R9,252(DI) - MOVQ 352(SP),R9 - SUBQ $256,R9 - ADDQ $256,SI - ADDQ $256,DI - CMPQ R9,$256 - JAE BYTESATLEAST256 - CMPQ R9,$0 - JBE DONE - BYTESBETWEEN1AND255: - CMPQ R9,$64 - JAE NOCOPY - MOVQ DI,DX - LEAQ 360(SP),DI - MOVQ R9,CX - REP; MOVSB - LEAQ 360(SP),DI - LEAQ 360(SP),SI - NOCOPY: - MOVQ R9,352(SP) - MOVOA 48(SP),X0 - MOVOA 0(SP),X1 - MOVOA 16(SP),X2 - MOVOA 32(SP),X3 - MOVOA X1,X4 - MOVQ $20,CX - MAINLOOP2: - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X3 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X3,X3 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X1 - PSHUFL $0X4E,X2,X2 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X1,X1 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X1 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X1,X1 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X3 - PSHUFL $0X4E,X2,X2 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X3,X3 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X3 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X3,X3 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X1 - PSHUFL $0X4E,X2,X2 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X1,X1 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X1 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X1,X1 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X3 - PSHUFL $0X4E,X2,X2 - PXOR X6,X3 - SUBQ $4,CX - PADDL X3,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PXOR X7,X7 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X3,X3 - PXOR X6,X0 - JA MAINLOOP2 - PADDL 48(SP),X0 - PADDL 0(SP),X1 - PADDL 16(SP),X2 - PADDL 32(SP),X3 - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 0(SI),CX - XORL 48(SI),R8 - XORL 32(SI),R9 - XORL 16(SI),AX - MOVL CX,0(DI) - MOVL R8,48(DI) - MOVL R9,32(DI) - MOVL AX,16(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 20(SI),CX - XORL 4(SI),R8 - XORL 52(SI),R9 - XORL 36(SI),AX - MOVL CX,20(DI) - MOVL R8,4(DI) - MOVL R9,52(DI) - MOVL AX,36(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 40(SI),CX - XORL 24(SI),R8 - XORL 8(SI),R9 - XORL 56(SI),AX - MOVL CX,40(DI) - MOVL R8,24(DI) - MOVL R9,8(DI) - MOVL AX,56(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - XORL 60(SI),CX - XORL 44(SI),R8 - XORL 28(SI),R9 - XORL 12(SI),AX - MOVL CX,60(DI) - MOVL R8,44(DI) - MOVL R9,28(DI) - MOVL AX,12(DI) - MOVQ 352(SP),R9 - MOVL 16(SP),CX - MOVL 36 (SP),R8 - ADDQ $1,CX - SHLQ $32,R8 - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $32,R8 - MOVL CX,16(SP) - MOVL R8, 36 (SP) - CMPQ R9,$64 - JA BYTESATLEAST65 - JAE BYTESATLEAST64 - MOVQ DI,SI - MOVQ DX,DI - MOVQ R9,CX - REP; MOVSB - BYTESATLEAST64: - DONE: - MOVQ R12,SP - RET - BYTESATLEAST65: - SUBQ $64,R9 - ADDQ $64,DI - ADDQ $64,SI - JMP BYTESBETWEEN1AND255 diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go deleted file mode 100644 index 9bfc0927c..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa208.go +++ /dev/null @@ -1,199 +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 - -// Core208 applies the Salsa20/8 core function to the 64-byte array in and puts -// the result into the 64-byte array out. The input and output may be the same array. -func Core208(out *[64]byte, in *[64]byte) { - j0 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24 - j1 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24 - j2 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24 - j3 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24 - j4 := uint32(in[16]) | uint32(in[17])<<8 | uint32(in[18])<<16 | uint32(in[19])<<24 - j5 := uint32(in[20]) | uint32(in[21])<<8 | uint32(in[22])<<16 | uint32(in[23])<<24 - j6 := uint32(in[24]) | uint32(in[25])<<8 | uint32(in[26])<<16 | uint32(in[27])<<24 - j7 := uint32(in[28]) | uint32(in[29])<<8 | uint32(in[30])<<16 | uint32(in[31])<<24 - j8 := uint32(in[32]) | uint32(in[33])<<8 | uint32(in[34])<<16 | uint32(in[35])<<24 - j9 := uint32(in[36]) | uint32(in[37])<<8 | uint32(in[38])<<16 | uint32(in[39])<<24 - j10 := uint32(in[40]) | uint32(in[41])<<8 | uint32(in[42])<<16 | uint32(in[43])<<24 - j11 := uint32(in[44]) | uint32(in[45])<<8 | uint32(in[46])<<16 | uint32(in[47])<<24 - j12 := uint32(in[48]) | uint32(in[49])<<8 | uint32(in[50])<<16 | uint32(in[51])<<24 - j13 := uint32(in[52]) | uint32(in[53])<<8 | uint32(in[54])<<16 | uint32(in[55])<<24 - j14 := uint32(in[56]) | uint32(in[57])<<8 | uint32(in[58])<<16 | uint32(in[59])<<24 - j15 := uint32(in[60]) | uint32(in[61])<<8 | uint32(in[62])<<16 | uint32(in[63])<<24 - - x0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8 - x9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15 - - 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 += j0 - x1 += j1 - x2 += j2 - x3 += j3 - x4 += j4 - x5 += j5 - x6 += j6 - x7 += j7 - x8 += j8 - x9 += j9 - x10 += j10 - x11 += j11 - x12 += j12 - x13 += j13 - x14 += j14 - x15 += j15 - - out[0] = byte(x0) - out[1] = byte(x0 >> 8) - out[2] = byte(x0 >> 16) - out[3] = byte(x0 >> 24) - - out[4] = byte(x1) - out[5] = byte(x1 >> 8) - out[6] = byte(x1 >> 16) - out[7] = byte(x1 >> 24) - - out[8] = byte(x2) - out[9] = byte(x2 >> 8) - out[10] = byte(x2 >> 16) - out[11] = byte(x2 >> 24) - - out[12] = byte(x3) - out[13] = byte(x3 >> 8) - out[14] = byte(x3 >> 16) - out[15] = byte(x3 >> 24) - - out[16] = byte(x4) - out[17] = byte(x4 >> 8) - out[18] = byte(x4 >> 16) - out[19] = byte(x4 >> 24) - - out[20] = byte(x5) - out[21] = byte(x5 >> 8) - out[22] = byte(x5 >> 16) - out[23] = byte(x5 >> 24) - - out[24] = byte(x6) - out[25] = byte(x6 >> 8) - out[26] = byte(x6 >> 16) - out[27] = byte(x6 >> 24) - - out[28] = byte(x7) - out[29] = byte(x7 >> 8) - out[30] = byte(x7 >> 16) - out[31] = byte(x7 >> 24) - - out[32] = byte(x8) - out[33] = byte(x8 >> 8) - out[34] = byte(x8 >> 16) - out[35] = byte(x8 >> 24) - - out[36] = byte(x9) - out[37] = byte(x9 >> 8) - out[38] = byte(x9 >> 16) - out[39] = byte(x9 >> 24) - - out[40] = byte(x10) - out[41] = byte(x10 >> 8) - out[42] = byte(x10 >> 16) - out[43] = byte(x10 >> 24) - - out[44] = byte(x11) - out[45] = byte(x11 >> 8) - out[46] = byte(x11 >> 16) - out[47] = byte(x11 >> 24) - - out[48] = byte(x12) - out[49] = byte(x12 >> 8) - out[50] = byte(x12 >> 16) - out[51] = byte(x12 >> 24) - - out[52] = byte(x13) - out[53] = byte(x13 >> 8) - out[54] = byte(x13 >> 16) - out[55] = byte(x13 >> 24) - - out[56] = byte(x14) - out[57] = byte(x14 >> 8) - out[58] = byte(x14 >> 16) - out[59] = byte(x14 >> 24) - - out[60] = byte(x15) - out[61] = byte(x15 >> 8) - out[62] = byte(x15 >> 16) - out[63] = byte(x15 >> 24) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go deleted file mode 100644 index f9269c384..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go +++ /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 amd64,!appengine,!gccgo - -package salsa - -// This function is implemented in salsa2020_amd64.s. - -//go:noescape - -func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *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 salsa20 counter bytes (both nonce and block counter). -func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { - if len(in) == 0 { - return - } - _ = out[len(in)-1] - salsa2020XORKeyStream(&out[0], &in[0], uint64(len(in)), &counter[0], &key[0]) -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go deleted file mode 100644 index 22126d17c..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go +++ /dev/null @@ -1,234 +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 appengine gccgo - -package salsa - -const rounds = 20 - -// core applies the Salsa20 core function to 16-byte input in, 32-byte key k, -// and 16-byte constant c, and puts the result into 64-byte array out. -func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) { - j0 := uint32(c[0]) | uint32(c[1])<<8 | uint32(c[2])<<16 | uint32(c[3])<<24 - j1 := uint32(k[0]) | uint32(k[1])<<8 | uint32(k[2])<<16 | uint32(k[3])<<24 - j2 := uint32(k[4]) | uint32(k[5])<<8 | uint32(k[6])<<16 | uint32(k[7])<<24 - j3 := uint32(k[8]) | uint32(k[9])<<8 | uint32(k[10])<<16 | uint32(k[11])<<24 - j4 := uint32(k[12]) | uint32(k[13])<<8 | uint32(k[14])<<16 | uint32(k[15])<<24 - j5 := uint32(c[4]) | uint32(c[5])<<8 | uint32(c[6])<<16 | uint32(c[7])<<24 - j6 := uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24 - j7 := uint32(in[4]) | uint32(in[5])<<8 | uint32(in[6])<<16 | uint32(in[7])<<24 - j8 := uint32(in[8]) | uint32(in[9])<<8 | uint32(in[10])<<16 | uint32(in[11])<<24 - j9 := uint32(in[12]) | uint32(in[13])<<8 | uint32(in[14])<<16 | uint32(in[15])<<24 - j10 := uint32(c[8]) | uint32(c[9])<<8 | uint32(c[10])<<16 | uint32(c[11])<<24 - j11 := uint32(k[16]) | uint32(k[17])<<8 | uint32(k[18])<<16 | uint32(k[19])<<24 - j12 := uint32(k[20]) | uint32(k[21])<<8 | uint32(k[22])<<16 | uint32(k[23])<<24 - j13 := uint32(k[24]) | uint32(k[25])<<8 | uint32(k[26])<<16 | uint32(k[27])<<24 - j14 := uint32(k[28]) | uint32(k[29])<<8 | uint32(k[30])<<16 | uint32(k[31])<<24 - j15 := uint32(c[12]) | uint32(c[13])<<8 | uint32(c[14])<<16 | uint32(c[15])<<24 - - x0, x1, x2, x3, x4, x5, x6, x7, x8 := j0, j1, j2, j3, j4, j5, j6, j7, j8 - x9, x10, x11, x12, x13, x14, x15 := j9, j10, j11, j12, j13, j14, j15 - - for i := 0; i < rounds; 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 += j0 - x1 += j1 - x2 += j2 - x3 += j3 - x4 += j4 - x5 += j5 - x6 += j6 - x7 += j7 - x8 += j8 - x9 += j9 - x10 += j10 - x11 += j11 - x12 += j12 - x13 += j13 - x14 += j14 - x15 += j15 - - out[0] = byte(x0) - out[1] = byte(x0 >> 8) - out[2] = byte(x0 >> 16) - out[3] = byte(x0 >> 24) - - out[4] = byte(x1) - out[5] = byte(x1 >> 8) - out[6] = byte(x1 >> 16) - out[7] = byte(x1 >> 24) - - out[8] = byte(x2) - out[9] = byte(x2 >> 8) - out[10] = byte(x2 >> 16) - out[11] = byte(x2 >> 24) - - out[12] = byte(x3) - out[13] = byte(x3 >> 8) - out[14] = byte(x3 >> 16) - out[15] = byte(x3 >> 24) - - out[16] = byte(x4) - out[17] = byte(x4 >> 8) - out[18] = byte(x4 >> 16) - out[19] = byte(x4 >> 24) - - out[20] = byte(x5) - out[21] = byte(x5 >> 8) - out[22] = byte(x5 >> 16) - out[23] = byte(x5 >> 24) - - out[24] = byte(x6) - out[25] = byte(x6 >> 8) - out[26] = byte(x6 >> 16) - out[27] = byte(x6 >> 24) - - out[28] = byte(x7) - out[29] = byte(x7 >> 8) - out[30] = byte(x7 >> 16) - out[31] = byte(x7 >> 24) - - out[32] = byte(x8) - out[33] = byte(x8 >> 8) - out[34] = byte(x8 >> 16) - out[35] = byte(x8 >> 24) - - out[36] = byte(x9) - out[37] = byte(x9 >> 8) - out[38] = byte(x9 >> 16) - out[39] = byte(x9 >> 24) - - out[40] = byte(x10) - out[41] = byte(x10 >> 8) - out[42] = byte(x10 >> 16) - out[43] = byte(x10 >> 24) - - out[44] = byte(x11) - out[45] = byte(x11 >> 8) - out[46] = byte(x11 >> 16) - out[47] = byte(x11 >> 24) - - out[48] = byte(x12) - out[49] = byte(x12 >> 8) - out[50] = byte(x12 >> 16) - out[51] = byte(x12 >> 24) - - out[52] = byte(x13) - out[53] = byte(x13 >> 8) - out[54] = byte(x13 >> 16) - out[55] = byte(x13 >> 24) - - out[56] = byte(x14) - out[57] = byte(x14 >> 8) - out[58] = byte(x14 >> 16) - out[59] = byte(x14 >> 24) - - out[60] = byte(x15) - out[61] = byte(x15 >> 8) - out[62] = byte(x15 >> 16) - out[63] = byte(x15 >> 24) -} - -// 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 salsa20 counter bytes (both nonce and block counter). -func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) { - var block [64]byte - var counterCopy [16]byte - copy(counterCopy[:], counter[:]) - - for len(in) >= 64 { - core(&block, &counterCopy, key, &Sigma) - for i, x := range block { - out[i] = in[i] ^ x - } - u := uint32(1) - for i := 8; i < 16; i++ { - u += uint32(counterCopy[i]) - counterCopy[i] = byte(u) - u >>= 8 - } - in = in[64:] - out = out[64:] - } - - if len(in) > 0 { - core(&block, &counterCopy, key, &Sigma) - for i, v := range in { - out[i] = v ^ block[i] - } - } -} diff --git a/vendor/golang.org/x/crypto/salsa20/salsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa20.go deleted file mode 100644 index 0ee62485a..000000000 --- a/vendor/golang.org/x/crypto/salsa20/salsa20.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 salsa20 implements the Salsa20 stream cipher as specified in https://cr.yp.to/snuffle/spec.pdf. - -Salsa20 differs from many other stream ciphers in that it is message orientated -rather than byte orientated. Keystream blocks are not preserved between calls, -therefore each side must encrypt/decrypt data with the same segmentation. - -Another aspect of this difference is that part of the counter is exposed as -a nonce in each call. Encrypting two different messages with the same (key, -nonce) pair leads to trivial plaintext recovery. This is analogous to -encrypting two different messages with the same key with a traditional stream -cipher. - -This package also implements XSalsa20: a version of Salsa20 with a 24-byte -nonce as specified in https://cr.yp.to/snuffle/xsalsa-20081128.pdf. Simply -passing a 24-byte slice as the nonce triggers XSalsa20. -*/ -package salsa20 // import "golang.org/x/crypto/salsa20" - -// TODO(agl): implement XORKeyStream12 and XORKeyStream8 - the reduced round variants of Salsa20. - -import ( - "golang.org/x/crypto/salsa20/salsa" -) - -// XORKeyStream crypts bytes from in to out using the given key and nonce. -// In and out must overlap entirely or not at all. Nonce must -// be either 8 or 24 bytes long. -func XORKeyStream(out, in []byte, nonce []byte, key *[32]byte) { - if len(out) < len(in) { - in = in[:len(out)] - } - - var subNonce [16]byte - - if len(nonce) == 24 { - var subKey [32]byte - var hNonce [16]byte - copy(hNonce[:], nonce[:16]) - salsa.HSalsa20(&subKey, &hNonce, key, &salsa.Sigma) - copy(subNonce[:], nonce[16:]) - key = &subKey - } else if len(nonce) == 8 { - copy(subNonce[:], nonce[:]) - } else { - panic("salsa20: nonce must be 8 or 24 bytes") - } - - salsa.XORKeyStream(out, in, &subNonce, key) -} diff --git a/vendor/golang.org/x/crypto/ssh/terminal/LICENSE b/vendor/golang.org/x/crypto/ssh/terminal/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/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/golang.org/x/crypto/ssh/terminal/terminal.go b/vendor/golang.org/x/crypto/ssh/terminal/terminal.go deleted file mode 100644 index 9a887598f..000000000 --- a/vendor/golang.org/x/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/golang.org/x/crypto/ssh/terminal/util.go b/vendor/golang.org/x/crypto/ssh/terminal/util.go deleted file mode 100644 index 02dad484e..000000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/util.go +++ /dev/null @@ -1,116 +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 "golang.org/x/crypto/ssh/terminal" - -import ( - "golang.org/x/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 func() { - unix.IoctlSetTermios(fd, ioctlWriteTermios, termios) - }() - - return readPasswordLine(passwordReader(fd)) -} diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go b/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go deleted file mode 100644 index cb23a5904..000000000 --- a/vendor/golang.org/x/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 "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TIOCGETA -const ioctlWriteTermios = unix.TIOCSETA diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go b/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go deleted file mode 100644 index 5fadfe8a1..000000000 --- a/vendor/golang.org/x/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 "golang.org/x/sys/unix" - -const ioctlReadTermios = unix.TCGETS -const ioctlWriteTermios = unix.TCSETS diff --git a/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go b/vendor/golang.org/x/crypto/ssh/terminal/util_plan9.go deleted file mode 100644 index 799f049f0..000000000 --- a/vendor/golang.org/x/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/golang.org/x/crypto/ssh/terminal/util_solaris.go b/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go deleted file mode 100644 index a2e1b57dc..000000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_solaris.go +++ /dev/null @@ -1,128 +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 "golang.org/x/crypto/ssh/terminal" - -import ( - "golang.org/x/sys/unix" - "io" - "syscall" -) - -// State contains the state of a terminal. -type State struct { - state *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) { - oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - oldTermios := *oldTermiosPtr - - newTermios := oldTermios - newTermios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON - newTermios.Oflag &^= syscall.OPOST - newTermios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN - newTermios.Cflag &^= syscall.CSIZE | syscall.PARENB - newTermios.Cflag |= syscall.CS8 - newTermios.Cc[unix.VMIN] = 1 - newTermios.Cc[unix.VTIME] = 0 - - if err := unix.IoctlSetTermios(fd, unix.TCSETS, &newTermios); err != nil { - return nil, err - } - - return &State{ - state: oldTermiosPtr, - }, 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.state) -} - -// 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) { - oldTermiosPtr, err := unix.IoctlGetTermios(fd, unix.TCGETS) - if err != nil { - return nil, err - } - - return &State{ - state: oldTermiosPtr, - }, 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/golang.org/x/crypto/ssh/terminal/util_windows.go b/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go deleted file mode 100644 index 92944f3b4..000000000 --- a/vendor/golang.org/x/crypto/ssh/terminal/util_windows.go +++ /dev/null @@ -1,97 +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" - - "golang.org/x/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 func() { - windows.SetConsoleMode(windows.Handle(fd), old) - }() - - return readPasswordLine(os.NewFile(uintptr(fd), "stdin")) -} diff --git a/vendor/golang.org/x/crypto/tea/LICENSE b/vendor/golang.org/x/crypto/tea/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/vendor/golang.org/x/crypto/tea/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/golang.org/x/crypto/tea/cipher.go b/vendor/golang.org/x/crypto/tea/cipher.go deleted file mode 100644 index ce223b2c2..000000000 --- a/vendor/golang.org/x/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/golang.org/x/crypto/twofish/twofish.go b/vendor/golang.org/x/crypto/twofish/twofish.go deleted file mode 100644 index 6db01fcf4..000000000 --- a/vendor/golang.org/x/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 // import "golang.org/x/crypto/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, 0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39, 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/golang.org/x/crypto/xtea/LICENSE b/vendor/golang.org/x/crypto/xtea/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/vendor/golang.org/x/crypto/xtea/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/golang.org/x/crypto/xtea/block.go b/vendor/golang.org/x/crypto/xtea/block.go deleted file mode 100644 index bf5d24599..000000000 --- a/vendor/golang.org/x/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 decrypt 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/golang.org/x/crypto/xtea/cipher.go b/vendor/golang.org/x/crypto/xtea/cipher.go deleted file mode 100644 index 66ea0df16..000000000 --- a/vendor/golang.org/x/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 // import "golang.org/x/crypto/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. -// table contains a series of precalculated values that are used each round. -type Cipher struct { - 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 k 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/golang.org/x/net/AUTHORS b/vendor/golang.org/x/net/AUTHORS new file mode 100644 index 000000000..15167cd74 --- /dev/null +++ b/vendor/golang.org/x/net/AUTHORS @@ -0,0 +1,3 @@ +# 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/golang.org/x/net/CONTRIBUTORS b/vendor/golang.org/x/net/CONTRIBUTORS new file mode 100644 index 000000000..1c4577e96 --- /dev/null +++ b/vendor/golang.org/x/net/CONTRIBUTORS @@ -0,0 +1,3 @@ +# 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/golang.org/x/crypto/blowfish/LICENSE b/vendor/golang.org/x/net/LICENSE similarity index 100% rename from vendor/golang.org/x/crypto/blowfish/LICENSE rename to vendor/golang.org/x/net/LICENSE diff --git a/vendor/golang.org/x/net/PATENTS b/vendor/golang.org/x/net/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/golang.org/x/net/PATENTS @@ -0,0 +1,22 @@ +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/golang.org/x/net/bpf/LICENSE b/vendor/golang.org/x/net/bpf/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/vendor/golang.org/x/net/bpf/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/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go new file mode 100644 index 000000000..a3c021d3f --- /dev/null +++ b/vendor/golang.org/x/net/context/context.go @@ -0,0 +1,56 @@ +// 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 context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// As of Go 1.7 this package is available in the standard library under the +// name context. https://golang.org/pkg/context. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context // import "golang.org/x/net/context" + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} diff --git a/vendor/golang.org/x/net/context/go17.go b/vendor/golang.org/x/net/context/go17.go new file mode 100644 index 000000000..d20f52b7d --- /dev/null +++ b/vendor/golang.org/x/net/context/go17.go @@ -0,0 +1,72 @@ +// 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 + +package context + +import ( + "context" // standard library's context, as of Go 1.7 + "time" +) + +var ( + todo = context.TODO() + background = context.Background() +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = context.Canceled + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = context.DeadlineExceeded + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + ctx, f := context.WithCancel(parent) + return ctx, CancelFunc(f) +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + ctx, f := context.WithDeadline(parent, deadline) + return ctx, CancelFunc(f) +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return context.WithValue(parent, key, val) +} diff --git a/vendor/golang.org/x/net/context/go19.go b/vendor/golang.org/x/net/context/go19.go new file mode 100644 index 000000000..d88bd1db1 --- /dev/null +++ b/vendor/golang.org/x/net/context/go19.go @@ -0,0 +1,20 @@ +// 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 context + +import "context" // standard library's context, as of Go 1.7 + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context = context.Context + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc = context.CancelFunc diff --git a/vendor/golang.org/x/net/context/pre_go17.go b/vendor/golang.org/x/net/context/pre_go17.go new file mode 100644 index 000000000..0f35592df --- /dev/null +++ b/vendor/golang.org/x/net/context/pre_go17.go @@ -0,0 +1,300 @@ +// 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 !go1.7 + +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, c) + return c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) *cancelCtx { + return &cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + *cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/vendor/golang.org/x/net/context/pre_go19.go b/vendor/golang.org/x/net/context/pre_go19.go new file mode 100644 index 000000000..b105f80be --- /dev/null +++ b/vendor/golang.org/x/net/context/pre_go19.go @@ -0,0 +1,109 @@ +// 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 !go1.9 + +package context + +import "time" + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out chan<- Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() diff --git a/vendor/golang.org/x/net/html/LICENSE b/vendor/golang.org/x/net/html/LICENSE deleted file mode 100644 index 6a66aea5e..000000000 --- a/vendor/golang.org/x/net/html/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/golang.org/x/net/html/atom/atom.go b/vendor/golang.org/x/net/html/atom/atom.go deleted file mode 100644 index cd0a8ac15..000000000 --- a/vendor/golang.org/x/net/html/atom/atom.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 atom provides integer codes (also known as atoms) for a fixed set of -// frequently occurring HTML strings: tag names and attribute keys such as "p" -// and "id". -// -// Sharing an atom's name between all elements with the same tag can result in -// fewer string allocations when tokenizing and parsing HTML. Integer -// comparisons are also generally faster than string comparisons. -// -// The value of an atom's particular code is not guaranteed to stay the same -// between versions of this package. Neither is any ordering guaranteed: -// whether atom.H1 < atom.H2 may also change. The codes are not guaranteed to -// be dense. The only guarantees are that e.g. looking up "div" will yield -// atom.Div, calling atom.Div.String will return "div", and atom.Div != 0. -package atom // import "golang.org/x/net/html/atom" - -// Atom is an integer code for a string. The zero value maps to "". -type Atom uint32 - -// String returns the atom's name. -func (a Atom) String() string { - start := uint32(a >> 8) - n := uint32(a & 0xff) - if start+n > uint32(len(atomText)) { - return "" - } - return atomText[start : start+n] -} - -func (a Atom) string() string { - return atomText[a>>8 : a>>8+a&0xff] -} - -// fnv computes the FNV hash with an arbitrary starting value h. -func fnv(h uint32, s []byte) uint32 { - for i := range s { - h ^= uint32(s[i]) - h *= 16777619 - } - return h -} - -func match(s string, t []byte) bool { - for i, c := range t { - if s[i] != c { - return false - } - } - return true -} - -// Lookup returns the atom whose name is s. It returns zero if there is no -// such atom. The lookup is case sensitive. -func Lookup(s []byte) Atom { - if len(s) == 0 || len(s) > maxAtomLen { - return 0 - } - h := fnv(hash0, s) - if a := table[h&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) { - return a - } - if a := table[(h>>16)&uint32(len(table)-1)]; int(a&0xff) == len(s) && match(a.string(), s) { - return a - } - return 0 -} - -// String returns a string whose contents are equal to s. In that sense, it is -// equivalent to string(s) but may be more efficient. -func String(s []byte) string { - if a := Lookup(s); a != 0 { - return a.String() - } - return string(s) -} diff --git a/vendor/golang.org/x/net/html/atom/gen.go b/vendor/golang.org/x/net/html/atom/gen.go deleted file mode 100644 index cc5dc5dbc..000000000 --- a/vendor/golang.org/x/net/html/atom/gen.go +++ /dev/null @@ -1,709 +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 ignore - -//go:generate go run gen.go -//go:generate go run gen.go -test - -package main - -import ( - "bytes" - "flag" - "fmt" - "go/format" - "io/ioutil" - "math/rand" - "os" - "sort" - "strings" -) - -// identifier converts s to a Go exported identifier. -// It converts "div" to "Div" and "accept-charset" to "AcceptCharset". -func identifier(s string) string { - b := make([]byte, 0, len(s)) - cap := true - for _, c := range s { - if c == '-' { - cap = true - continue - } - if cap && 'a' <= c && c <= 'z' { - c -= 'a' - 'A' - } - cap = false - b = append(b, byte(c)) - } - return string(b) -} - -var test = flag.Bool("test", false, "generate table_test.go") - -func genFile(name string, buf *bytes.Buffer) { - b, err := format.Source(buf.Bytes()) - if err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } - if err := ioutil.WriteFile(name, b, 0644); err != nil { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) - } -} - -func main() { - flag.Parse() - - var all []string - all = append(all, elements...) - all = append(all, attributes...) - all = append(all, eventHandlers...) - all = append(all, extra...) - sort.Strings(all) - - // uniq - lists have dups - w := 0 - for _, s := range all { - if w == 0 || all[w-1] != s { - all[w] = s - w++ - } - } - all = all[:w] - - if *test { - var buf bytes.Buffer - fmt.Fprintln(&buf, "// Code generated by go generate gen.go; DO NOT EDIT.\n") - fmt.Fprintln(&buf, "//go:generate go run gen.go -test\n") - fmt.Fprintln(&buf, "package atom\n") - fmt.Fprintln(&buf, "var testAtomList = []string{") - for _, s := range all { - fmt.Fprintf(&buf, "\t%q,\n", s) - } - fmt.Fprintln(&buf, "}") - - genFile("table_test.go", &buf) - return - } - - // Find hash that minimizes table size. - var best *table - for i := 0; i < 1000000; i++ { - if best != nil && 1<<(best.k-1) < len(all) { - break - } - h := rand.Uint32() - for k := uint(0); k <= 16; k++ { - if best != nil && k >= best.k { - break - } - var t table - if t.init(h, k, all) { - best = &t - break - } - } - } - if best == nil { - fmt.Fprintf(os.Stderr, "failed to construct string table\n") - os.Exit(1) - } - - // Lay out strings, using overlaps when possible. - layout := append([]string{}, all...) - - // Remove strings that are substrings of other strings - for changed := true; changed; { - changed = false - for i, s := range layout { - if s == "" { - continue - } - for j, t := range layout { - if i != j && t != "" && strings.Contains(s, t) { - changed = true - layout[j] = "" - } - } - } - } - - // Join strings where one suffix matches another prefix. - for { - // Find best i, j, k such that layout[i][len-k:] == layout[j][:k], - // maximizing overlap length k. - besti := -1 - bestj := -1 - bestk := 0 - for i, s := range layout { - if s == "" { - continue - } - for j, t := range layout { - if i == j { - continue - } - for k := bestk + 1; k <= len(s) && k <= len(t); k++ { - if s[len(s)-k:] == t[:k] { - besti = i - bestj = j - bestk = k - } - } - } - } - if bestk > 0 { - layout[besti] += layout[bestj][bestk:] - layout[bestj] = "" - continue - } - break - } - - text := strings.Join(layout, "") - - atom := map[string]uint32{} - for _, s := range all { - off := strings.Index(text, s) - if off < 0 { - panic("lost string " + s) - } - atom[s] = uint32(off<<8 | len(s)) - } - - var buf bytes.Buffer - // Generate the Go code. - fmt.Fprintln(&buf, "// Code generated by go generate gen.go; DO NOT EDIT.\n") - fmt.Fprintln(&buf, "//go:generate go run gen.go\n") - fmt.Fprintln(&buf, "package atom\n\nconst (") - - // compute max len - maxLen := 0 - for _, s := range all { - if maxLen < len(s) { - maxLen = len(s) - } - fmt.Fprintf(&buf, "\t%s Atom = %#x\n", identifier(s), atom[s]) - } - fmt.Fprintln(&buf, ")\n") - - fmt.Fprintf(&buf, "const hash0 = %#x\n\n", best.h0) - fmt.Fprintf(&buf, "const maxAtomLen = %d\n\n", maxLen) - - fmt.Fprintf(&buf, "var table = [1<<%d]Atom{\n", best.k) - for i, s := range best.tab { - if s == "" { - continue - } - fmt.Fprintf(&buf, "\t%#x: %#x, // %s\n", i, atom[s], s) - } - fmt.Fprintf(&buf, "}\n") - datasize := (1 << best.k) * 4 - - fmt.Fprintln(&buf, "const atomText =") - textsize := len(text) - for len(text) > 60 { - fmt.Fprintf(&buf, "\t%q +\n", text[:60]) - text = text[60:] - } - fmt.Fprintf(&buf, "\t%q\n\n", text) - - genFile("table.go", &buf) - - fmt.Fprintf(os.Stdout, "%d atoms; %d string bytes + %d tables = %d total data\n", len(all), textsize, datasize, textsize+datasize) -} - -type byLen []string - -func (x byLen) Less(i, j int) bool { return len(x[i]) > len(x[j]) } -func (x byLen) Swap(i, j int) { x[i], x[j] = x[j], x[i] } -func (x byLen) Len() int { return len(x) } - -// fnv computes the FNV hash with an arbitrary starting value h. -func fnv(h uint32, s string) uint32 { - for i := 0; i < len(s); i++ { - h ^= uint32(s[i]) - h *= 16777619 - } - return h -} - -// A table represents an attempt at constructing the lookup table. -// The lookup table uses cuckoo hashing, meaning that each string -// can be found in one of two positions. -type table struct { - h0 uint32 - k uint - mask uint32 - tab []string -} - -// hash returns the two hashes for s. -func (t *table) hash(s string) (h1, h2 uint32) { - h := fnv(t.h0, s) - h1 = h & t.mask - h2 = (h >> 16) & t.mask - return -} - -// init initializes the table with the given parameters. -// h0 is the initial hash value, -// k is the number of bits of hash value to use, and -// x is the list of strings to store in the table. -// init returns false if the table cannot be constructed. -func (t *table) init(h0 uint32, k uint, x []string) bool { - t.h0 = h0 - t.k = k - t.tab = make([]string, 1< len(t.tab) { - return false - } - s := t.tab[i] - h1, h2 := t.hash(s) - j := h1 + h2 - i - if t.tab[j] != "" && !t.push(j, depth+1) { - return false - } - t.tab[j] = s - return true -} - -// The lists of element names and attribute keys were taken from -// https://html.spec.whatwg.org/multipage/indices.html#index -// as of the "HTML Living Standard - Last Updated 18 September 2017" version. - -// "command", "keygen" and "menuitem" have been removed from the spec, -// but are kept here for backwards compatibility. -var elements = []string{ - "a", - "abbr", - "address", - "area", - "article", - "aside", - "audio", - "b", - "base", - "bdi", - "bdo", - "blockquote", - "body", - "br", - "button", - "canvas", - "caption", - "cite", - "code", - "col", - "colgroup", - "command", - "data", - "datalist", - "dd", - "del", - "details", - "dfn", - "dialog", - "div", - "dl", - "dt", - "em", - "embed", - "fieldset", - "figcaption", - "figure", - "footer", - "form", - "h1", - "h2", - "h3", - "h4", - "h5", - "h6", - "head", - "header", - "hgroup", - "hr", - "html", - "i", - "iframe", - "img", - "input", - "ins", - "kbd", - "keygen", - "label", - "legend", - "li", - "link", - "main", - "map", - "mark", - "menu", - "menuitem", - "meta", - "meter", - "nav", - "noscript", - "object", - "ol", - "optgroup", - "option", - "output", - "p", - "param", - "picture", - "pre", - "progress", - "q", - "rp", - "rt", - "ruby", - "s", - "samp", - "script", - "section", - "select", - "slot", - "small", - "source", - "span", - "strong", - "style", - "sub", - "summary", - "sup", - "table", - "tbody", - "td", - "template", - "textarea", - "tfoot", - "th", - "thead", - "time", - "title", - "tr", - "track", - "u", - "ul", - "var", - "video", - "wbr", -} - -// https://html.spec.whatwg.org/multipage/indices.html#attributes-3 -// -// "challenge", "command", "contextmenu", "dropzone", "icon", "keytype", "mediagroup", -// "radiogroup", "spellcheck", "scoped", "seamless", "sortable" and "sorted" have been removed from the spec, -// but are kept here for backwards compatibility. -var attributes = []string{ - "abbr", - "accept", - "accept-charset", - "accesskey", - "action", - "allowfullscreen", - "allowpaymentrequest", - "allowusermedia", - "alt", - "as", - "async", - "autocomplete", - "autofocus", - "autoplay", - "challenge", - "charset", - "checked", - "cite", - "class", - "color", - "cols", - "colspan", - "command", - "content", - "contenteditable", - "contextmenu", - "controls", - "coords", - "crossorigin", - "data", - "datetime", - "default", - "defer", - "dir", - "dirname", - "disabled", - "download", - "draggable", - "dropzone", - "enctype", - "for", - "form", - "formaction", - "formenctype", - "formmethod", - "formnovalidate", - "formtarget", - "headers", - "height", - "hidden", - "high", - "href", - "hreflang", - "http-equiv", - "icon", - "id", - "inputmode", - "integrity", - "is", - "ismap", - "itemid", - "itemprop", - "itemref", - "itemscope", - "itemtype", - "keytype", - "kind", - "label", - "lang", - "list", - "loop", - "low", - "manifest", - "max", - "maxlength", - "media", - "mediagroup", - "method", - "min", - "minlength", - "multiple", - "muted", - "name", - "nomodule", - "nonce", - "novalidate", - "open", - "optimum", - "pattern", - "ping", - "placeholder", - "playsinline", - "poster", - "preload", - "radiogroup", - "readonly", - "referrerpolicy", - "rel", - "required", - "reversed", - "rows", - "rowspan", - "sandbox", - "spellcheck", - "scope", - "scoped", - "seamless", - "selected", - "shape", - "size", - "sizes", - "sortable", - "sorted", - "slot", - "span", - "spellcheck", - "src", - "srcdoc", - "srclang", - "srcset", - "start", - "step", - "style", - "tabindex", - "target", - "title", - "translate", - "type", - "typemustmatch", - "updateviacache", - "usemap", - "value", - "width", - "workertype", - "wrap", -} - -// "onautocomplete", "onautocompleteerror", "onmousewheel", -// "onshow" and "onsort" have been removed from the spec, -// but are kept here for backwards compatibility. -var eventHandlers = []string{ - "onabort", - "onautocomplete", - "onautocompleteerror", - "onauxclick", - "onafterprint", - "onbeforeprint", - "onbeforeunload", - "onblur", - "oncancel", - "oncanplay", - "oncanplaythrough", - "onchange", - "onclick", - "onclose", - "oncontextmenu", - "oncopy", - "oncuechange", - "oncut", - "ondblclick", - "ondrag", - "ondragend", - "ondragenter", - "ondragexit", - "ondragleave", - "ondragover", - "ondragstart", - "ondrop", - "ondurationchange", - "onemptied", - "onended", - "onerror", - "onfocus", - "onhashchange", - "oninput", - "oninvalid", - "onkeydown", - "onkeypress", - "onkeyup", - "onlanguagechange", - "onload", - "onloadeddata", - "onloadedmetadata", - "onloadend", - "onloadstart", - "onmessage", - "onmessageerror", - "onmousedown", - "onmouseenter", - "onmouseleave", - "onmousemove", - "onmouseout", - "onmouseover", - "onmouseup", - "onmousewheel", - "onwheel", - "onoffline", - "ononline", - "onpagehide", - "onpageshow", - "onpaste", - "onpause", - "onplay", - "onplaying", - "onpopstate", - "onprogress", - "onratechange", - "onreset", - "onresize", - "onrejectionhandled", - "onscroll", - "onsecuritypolicyviolation", - "onseeked", - "onseeking", - "onselect", - "onshow", - "onsort", - "onstalled", - "onstorage", - "onsubmit", - "onsuspend", - "ontimeupdate", - "ontoggle", - "onunhandledrejection", - "onunload", - "onvolumechange", - "onwaiting", -} - -// extra are ad-hoc values not covered by any of the lists above. -var extra = []string{ - "align", - "annotation", - "annotation-xml", - "applet", - "basefont", - "bgsound", - "big", - "blink", - "center", - "color", - "desc", - "face", - "font", - "foreignObject", // HTML is case-insensitive, but SVG-embedded-in-HTML is case-sensitive. - "foreignobject", - "frame", - "frameset", - "image", - "isindex", - "listing", - "malignmark", - "marquee", - "math", - "mglyph", - "mi", - "mn", - "mo", - "ms", - "mtext", - "nobr", - "noembed", - "noframes", - "plaintext", - "prompt", - "public", - "spacer", - "strike", - "svg", - "system", - "tt", - "xmp", -} diff --git a/vendor/golang.org/x/net/html/atom/table.go b/vendor/golang.org/x/net/html/atom/table.go deleted file mode 100644 index f74018ece..000000000 --- a/vendor/golang.org/x/net/html/atom/table.go +++ /dev/null @@ -1,777 +0,0 @@ -// Code generated by go generate gen.go; DO NOT EDIT. - -//go:generate go run gen.go - -package atom - -const ( - A Atom = 0x1 - Abbr Atom = 0x4 - Accept Atom = 0x1a06 - AcceptCharset Atom = 0x1a0e - Accesskey Atom = 0x2c09 - Action Atom = 0x25a06 - Address Atom = 0x6ed07 - Align Atom = 0x6d405 - Allowfullscreen Atom = 0x1f00f - Allowpaymentrequest Atom = 0x6913 - Allowusermedia Atom = 0x850e - Alt Atom = 0xb003 - Annotation Atom = 0x1b90a - AnnotationXml Atom = 0x1b90e - Applet Atom = 0x30106 - Area Atom = 0x34a04 - Article Atom = 0x3f007 - As Atom = 0xb902 - Aside Atom = 0xc105 - Async Atom = 0xb905 - Audio Atom = 0xcf05 - Autocomplete Atom = 0x2600c - Autofocus Atom = 0xeb09 - Autoplay Atom = 0x10608 - B Atom = 0x101 - Base Atom = 0x11504 - Basefont Atom = 0x11508 - Bdi Atom = 0x16103 - Bdo Atom = 0x13403 - Bgsound Atom = 0x14707 - Big Atom = 0x15903 - Blink Atom = 0x15c05 - Blockquote Atom = 0x1680a - Body Atom = 0x2804 - Br Atom = 0x202 - Button Atom = 0x17206 - Canvas Atom = 0xbd06 - Caption Atom = 0x21907 - Center Atom = 0x20806 - Challenge Atom = 0x28309 - Charset Atom = 0x2107 - Checked Atom = 0x46d07 - Cite Atom = 0x55804 - Class Atom = 0x5b905 - Code Atom = 0x19004 - Col Atom = 0x19703 - Colgroup Atom = 0x19708 - Color Atom = 0x1af05 - Cols Atom = 0x1b404 - Colspan Atom = 0x1b407 - Command Atom = 0x1c707 - Content Atom = 0x57f07 - Contenteditable Atom = 0x57f0f - Contextmenu Atom = 0x3740b - Controls Atom = 0x1ce08 - Coords Atom = 0x1da06 - Crossorigin Atom = 0x1e30b - Data Atom = 0x49904 - Datalist Atom = 0x49908 - Datetime Atom = 0x2a008 - Dd Atom = 0x2bf02 - Default Atom = 0xc407 - Defer Atom = 0x19205 - Del Atom = 0x44603 - Desc Atom = 0x55504 - Details Atom = 0x4607 - Dfn Atom = 0x5f03 - Dialog Atom = 0x16206 - Dir Atom = 0xa303 - Dirname Atom = 0xa307 - Disabled Atom = 0x14d08 - Div Atom = 0x15403 - Dl Atom = 0x5e202 - Download Atom = 0x45708 - Draggable Atom = 0x18309 - Dropzone Atom = 0x3f908 - Dt Atom = 0x64702 - Em Atom = 0x4202 - Embed Atom = 0x4205 - Enctype Atom = 0x27507 - Face Atom = 0x20604 - Fieldset Atom = 0x20e08 - Figcaption Atom = 0x2160a - Figure Atom = 0x23006 - Font Atom = 0x11904 - Footer Atom = 0xb306 - For Atom = 0x23c03 - ForeignObject Atom = 0x23c0d - Foreignobject Atom = 0x2490d - Form Atom = 0x25604 - Formaction Atom = 0x2560a - Formenctype Atom = 0x2710b - Formmethod Atom = 0x28c0a - Formnovalidate Atom = 0x2960e - Formtarget Atom = 0x2a80a - Frame Atom = 0x5705 - Frameset Atom = 0x5708 - H1 Atom = 0x14502 - H2 Atom = 0x2c602 - H3 Atom = 0x2f502 - H4 Atom = 0x33902 - H5 Atom = 0x34302 - H6 Atom = 0x64902 - Head Atom = 0x32504 - Header Atom = 0x32506 - Headers Atom = 0x32507 - Height Atom = 0x12c06 - Hgroup Atom = 0x2b206 - Hidden Atom = 0x2bd06 - High Atom = 0x2c304 - Hr Atom = 0x14002 - Href Atom = 0x2c804 - Hreflang Atom = 0x2c808 - Html Atom = 0x13004 - HttpEquiv Atom = 0x2d00a - I Atom = 0x601 - Icon Atom = 0x57e04 - Id Atom = 0xc302 - Iframe Atom = 0x2e406 - Image Atom = 0x2ea05 - Img Atom = 0x2ef03 - Input Atom = 0x43f05 - Inputmode Atom = 0x43f09 - Ins Atom = 0x1ec03 - Integrity Atom = 0x22709 - Is Atom = 0x14e02 - Isindex Atom = 0x2f707 - Ismap Atom = 0x2fe05 - Itemid Atom = 0x37f06 - Itemprop Atom = 0x55908 - Itemref Atom = 0x3c107 - Itemscope Atom = 0x66d09 - Itemtype Atom = 0x30708 - Kbd Atom = 0x16003 - Keygen Atom = 0x3206 - Keytype Atom = 0x7e07 - Kind Atom = 0x18004 - Label Atom = 0xda05 - Lang Atom = 0x2cc04 - Legend Atom = 0x18a06 - Li Atom = 0x11102 - Link Atom = 0x15d04 - List Atom = 0x49d04 - Listing Atom = 0x49d07 - Loop Atom = 0xde04 - Low Atom = 0x6b03 - Main Atom = 0x1004 - Malignmark Atom = 0x6d30a - Manifest Atom = 0x30f08 - Map Atom = 0x30003 - Mark Atom = 0x6d904 - Marquee Atom = 0x31b07 - Math Atom = 0x32204 - Max Atom = 0x33103 - Maxlength Atom = 0x33109 - Media Atom = 0x8e05 - Mediagroup Atom = 0x8e0a - Menu Atom = 0x37b04 - Menuitem Atom = 0x37b08 - Meta Atom = 0x4ac04 - Meter Atom = 0xa805 - Method Atom = 0x29006 - Mglyph Atom = 0x2f006 - Mi Atom = 0x33b02 - Min Atom = 0x33b03 - Minlength Atom = 0x33b09 - Mn Atom = 0x29902 - Mo Atom = 0x6302 - Ms Atom = 0x67002 - Mtext Atom = 0x34505 - Multiple Atom = 0x35308 - Muted Atom = 0x35b05 - Name Atom = 0xa604 - Nav Atom = 0x1303 - Nobr Atom = 0x3704 - Noembed Atom = 0x4007 - Noframes Atom = 0x5508 - Nomodule Atom = 0x6108 - Nonce Atom = 0x56205 - Noscript Atom = 0x1fe08 - Novalidate Atom = 0x29a0a - Object Atom = 0x25006 - Ol Atom = 0x10102 - Onabort Atom = 0x17607 - Onafterprint Atom = 0x21e0c - Onautocomplete Atom = 0x25e0e - Onautocompleteerror Atom = 0x25e13 - Onauxclick Atom = 0x61b0a - Onbeforeprint Atom = 0x69a0d - Onbeforeunload Atom = 0x6e10e - Onblur Atom = 0x5c206 - Oncancel Atom = 0xd308 - Oncanplay Atom = 0x13609 - Oncanplaythrough Atom = 0x13610 - Onchange Atom = 0x40f08 - Onclick Atom = 0x2dd07 - Onclose Atom = 0x36007 - Oncontextmenu Atom = 0x3720d - Oncopy Atom = 0x38506 - Oncuechange Atom = 0x38b0b - Oncut Atom = 0x39605 - Ondblclick Atom = 0x39b0a - Ondrag Atom = 0x3a506 - Ondragend Atom = 0x3a509 - Ondragenter Atom = 0x3ae0b - Ondragexit Atom = 0x3b90a - Ondragleave Atom = 0x3d30b - Ondragover Atom = 0x3de0a - Ondragstart Atom = 0x3e80b - Ondrop Atom = 0x3f706 - Ondurationchange Atom = 0x40710 - Onemptied Atom = 0x3fe09 - Onended Atom = 0x41707 - Onerror Atom = 0x41e07 - Onfocus Atom = 0x42507 - Onhashchange Atom = 0x4310c - Oninput Atom = 0x43d07 - Oninvalid Atom = 0x44909 - Onkeydown Atom = 0x45209 - Onkeypress Atom = 0x45f0a - Onkeyup Atom = 0x47407 - Onlanguagechange Atom = 0x48110 - Onload Atom = 0x49106 - Onloadeddata Atom = 0x4910c - Onloadedmetadata Atom = 0x4a410 - Onloadend Atom = 0x4ba09 - Onloadstart Atom = 0x4c30b - Onmessage Atom = 0x4ce09 - Onmessageerror Atom = 0x4ce0e - Onmousedown Atom = 0x4dc0b - Onmouseenter Atom = 0x4e70c - Onmouseleave Atom = 0x4f30c - Onmousemove Atom = 0x4ff0b - Onmouseout Atom = 0x50a0a - Onmouseover Atom = 0x5170b - Onmouseup Atom = 0x52209 - Onmousewheel Atom = 0x5300c - Onoffline Atom = 0x53c09 - Ononline Atom = 0x54508 - Onpagehide Atom = 0x54d0a - Onpageshow Atom = 0x5670a - Onpaste Atom = 0x57307 - Onpause Atom = 0x58e07 - Onplay Atom = 0x59806 - Onplaying Atom = 0x59809 - Onpopstate Atom = 0x5a10a - Onprogress Atom = 0x5ab0a - Onratechange Atom = 0x5c80c - Onrejectionhandled Atom = 0x5d412 - Onreset Atom = 0x5e607 - Onresize Atom = 0x5ed08 - Onscroll Atom = 0x5fc08 - Onsecuritypolicyviolation Atom = 0x60419 - Onseeked Atom = 0x62508 - Onseeking Atom = 0x62d09 - Onselect Atom = 0x63608 - Onshow Atom = 0x64006 - Onsort Atom = 0x64b06 - Onstalled Atom = 0x65509 - Onstorage Atom = 0x65e09 - Onsubmit Atom = 0x66708 - Onsuspend Atom = 0x67709 - Ontimeupdate Atom = 0x11a0c - Ontoggle Atom = 0x68008 - Onunhandledrejection Atom = 0x68814 - Onunload Atom = 0x6a708 - Onvolumechange Atom = 0x6af0e - Onwaiting Atom = 0x6bd09 - Onwheel Atom = 0x6c607 - Open Atom = 0x55f04 - Optgroup Atom = 0xe008 - Optimum Atom = 0x6cd07 - Option Atom = 0x6dd06 - Output Atom = 0x51106 - P Atom = 0xc01 - Param Atom = 0xc05 - Pattern Atom = 0x4f07 - Picture Atom = 0x9707 - Ping Atom = 0xe704 - Placeholder Atom = 0xfb0b - Plaintext Atom = 0x19e09 - Playsinline Atom = 0x10a0b - Poster Atom = 0x2b706 - Pre Atom = 0x46403 - Preload Atom = 0x47a07 - Progress Atom = 0x5ad08 - Prompt Atom = 0x52a06 - Public Atom = 0x57a06 - Q Atom = 0x7701 - Radiogroup Atom = 0x30a - Readonly Atom = 0x34b08 - Referrerpolicy Atom = 0x3c50e - Rel Atom = 0x47b03 - Required Atom = 0x23408 - Reversed Atom = 0x9c08 - Rows Atom = 0x3a04 - Rowspan Atom = 0x3a07 - Rp Atom = 0x22402 - Rt Atom = 0x17b02 - Ruby Atom = 0xac04 - S Atom = 0x2501 - Samp Atom = 0x4c04 - Sandbox Atom = 0xf307 - Scope Atom = 0x67105 - Scoped Atom = 0x67106 - Script Atom = 0x20006 - Seamless Atom = 0x36508 - Section Atom = 0x5bd07 - Select Atom = 0x63806 - Selected Atom = 0x63808 - Shape Atom = 0x1d505 - Size Atom = 0x5f104 - Sizes Atom = 0x5f105 - Slot Atom = 0x1df04 - Small Atom = 0x1ee05 - Sortable Atom = 0x64d08 - Sorted Atom = 0x32b06 - Source Atom = 0x36c06 - Spacer Atom = 0x42b06 - Span Atom = 0x3d04 - Spellcheck Atom = 0x4680a - Src Atom = 0x5b403 - Srcdoc Atom = 0x5b406 - Srclang Atom = 0x5f507 - Srcset Atom = 0x6f306 - Start Atom = 0x3ee05 - Step Atom = 0x57704 - Strike Atom = 0x7a06 - Strong Atom = 0x31506 - Style Atom = 0x6f905 - Sub Atom = 0x66903 - Summary Atom = 0x6fe07 - Sup Atom = 0x70503 - Svg Atom = 0x70803 - System Atom = 0x70b06 - Tabindex Atom = 0x4b208 - Table Atom = 0x58905 - Target Atom = 0x2ac06 - Tbody Atom = 0x2705 - Td Atom = 0x5e02 - Template Atom = 0x70e08 - Textarea Atom = 0x34608 - Tfoot Atom = 0xb205 - Th Atom = 0x13f02 - Thead Atom = 0x32405 - Time Atom = 0x11c04 - Title Atom = 0xca05 - Tr Atom = 0x7402 - Track Atom = 0x17c05 - Translate Atom = 0x1a609 - Tt Atom = 0x5102 - Type Atom = 0x8104 - Typemustmatch Atom = 0x2780d - U Atom = 0xb01 - Ul Atom = 0x6602 - Updateviacache Atom = 0x1200e - Usemap Atom = 0x59206 - Value Atom = 0x1505 - Var Atom = 0x15603 - Video Atom = 0x2d905 - Wbr Atom = 0x57003 - Width Atom = 0x64505 - Workertype Atom = 0x7160a - Wrap Atom = 0x72004 - Xmp Atom = 0xf903 -) - -const hash0 = 0x81cdf10e - -const maxAtomLen = 25 - -var table = [1 << 9]Atom{ - 0x1: 0x8e0a, // mediagroup - 0x2: 0x2cc04, // lang - 0x4: 0x2c09, // accesskey - 0x5: 0x5708, // frameset - 0x7: 0x63608, // onselect - 0x8: 0x70b06, // system - 0xa: 0x64505, // width - 0xc: 0x2710b, // formenctype - 0xd: 0x10102, // ol - 0xe: 0x38b0b, // oncuechange - 0x10: 0x13403, // bdo - 0x11: 0xcf05, // audio - 0x12: 0x18309, // draggable - 0x14: 0x2d905, // video - 0x15: 0x29902, // mn - 0x16: 0x37b04, // menu - 0x17: 0x2b706, // poster - 0x19: 0xb306, // footer - 0x1a: 0x29006, // method - 0x1b: 0x2a008, // datetime - 0x1c: 0x17607, // onabort - 0x1d: 0x1200e, // updateviacache - 0x1e: 0xb905, // async - 0x1f: 0x49106, // onload - 0x21: 0xd308, // oncancel - 0x22: 0x62508, // onseeked - 0x23: 0x2ea05, // image - 0x24: 0x5d412, // onrejectionhandled - 0x26: 0x15d04, // link - 0x27: 0x51106, // output - 0x28: 0x32504, // head - 0x29: 0x4f30c, // onmouseleave - 0x2a: 0x57307, // onpaste - 0x2b: 0x59809, // onplaying - 0x2c: 0x1b407, // colspan - 0x2f: 0x1af05, // color - 0x30: 0x5f104, // size - 0x31: 0x2d00a, // http-equiv - 0x33: 0x601, // i - 0x34: 0x54d0a, // onpagehide - 0x35: 0x68814, // onunhandledrejection - 0x37: 0x41e07, // onerror - 0x3a: 0x11508, // basefont - 0x3f: 0x1303, // nav - 0x40: 0x18004, // kind - 0x41: 0x34b08, // readonly - 0x42: 0x2f006, // mglyph - 0x44: 0x11102, // li - 0x46: 0x2bd06, // hidden - 0x47: 0x70803, // svg - 0x48: 0x57704, // step - 0x49: 0x22709, // integrity - 0x4a: 0x57a06, // public - 0x4c: 0x19703, // col - 0x4d: 0x1680a, // blockquote - 0x4e: 0x34302, // h5 - 0x50: 0x5ad08, // progress - 0x51: 0x5f105, // sizes - 0x52: 0x33902, // h4 - 0x56: 0x32405, // thead - 0x57: 0x7e07, // keytype - 0x58: 0x5ab0a, // onprogress - 0x59: 0x43f09, // inputmode - 0x5a: 0x3a509, // ondragend - 0x5d: 0x39605, // oncut - 0x5e: 0x42b06, // spacer - 0x5f: 0x19708, // colgroup - 0x62: 0x14e02, // is - 0x65: 0xb902, // as - 0x66: 0x53c09, // onoffline - 0x67: 0x32b06, // sorted - 0x69: 0x48110, // onlanguagechange - 0x6c: 0x4310c, // onhashchange - 0x6d: 0xa604, // name - 0x6e: 0xb205, // tfoot - 0x6f: 0x55504, // desc - 0x70: 0x33103, // max - 0x72: 0x1da06, // coords - 0x73: 0x2f502, // h3 - 0x74: 0x6e10e, // onbeforeunload - 0x75: 0x3a04, // rows - 0x76: 0x63806, // select - 0x77: 0xa805, // meter - 0x78: 0x37f06, // itemid - 0x79: 0x5300c, // onmousewheel - 0x7a: 0x5b406, // srcdoc - 0x7d: 0x17c05, // track - 0x7f: 0x30708, // itemtype - 0x82: 0x6302, // mo - 0x83: 0x40f08, // onchange - 0x84: 0x32507, // headers - 0x85: 0x5c80c, // onratechange - 0x86: 0x60419, // onsecuritypolicyviolation - 0x88: 0x49908, // datalist - 0x89: 0x4dc0b, // onmousedown - 0x8a: 0x1df04, // slot - 0x8b: 0x4a410, // onloadedmetadata - 0x8c: 0x1a06, // accept - 0x8d: 0x25006, // object - 0x91: 0x6af0e, // onvolumechange - 0x92: 0x2107, // charset - 0x93: 0x25e13, // onautocompleteerror - 0x94: 0x6913, // allowpaymentrequest - 0x95: 0x2804, // body - 0x96: 0xc407, // default - 0x97: 0x63808, // selected - 0x98: 0x20604, // face - 0x99: 0x1d505, // shape - 0x9b: 0x68008, // ontoggle - 0x9e: 0x64702, // dt - 0x9f: 0x6d904, // mark - 0xa1: 0xb01, // u - 0xa4: 0x6a708, // onunload - 0xa5: 0xde04, // loop - 0xa6: 0x14d08, // disabled - 0xaa: 0x41707, // onended - 0xab: 0x6d30a, // malignmark - 0xad: 0x67709, // onsuspend - 0xae: 0x34505, // mtext - 0xaf: 0x64b06, // onsort - 0xb0: 0x55908, // itemprop - 0xb3: 0x66d09, // itemscope - 0xb4: 0x15c05, // blink - 0xb6: 0x3a506, // ondrag - 0xb7: 0x6602, // ul - 0xb8: 0x25604, // form - 0xb9: 0xf307, // sandbox - 0xba: 0x5705, // frame - 0xbb: 0x1505, // value - 0xbc: 0x65e09, // onstorage - 0xc0: 0x17b02, // rt - 0xc2: 0x202, // br - 0xc3: 0x20e08, // fieldset - 0xc4: 0x2780d, // typemustmatch - 0xc5: 0x6108, // nomodule - 0xc6: 0x4007, // noembed - 0xc7: 0x69a0d, // onbeforeprint - 0xc8: 0x17206, // button - 0xc9: 0x2dd07, // onclick - 0xca: 0x6fe07, // summary - 0xcd: 0xac04, // ruby - 0xce: 0x5b905, // class - 0xcf: 0x3e80b, // ondragstart - 0xd0: 0x21907, // caption - 0xd4: 0x850e, // allowusermedia - 0xd5: 0x4c30b, // onloadstart - 0xd9: 0x15403, // div - 0xda: 0x49d04, // list - 0xdb: 0x32204, // math - 0xdc: 0x43f05, // input - 0xdf: 0x3de0a, // ondragover - 0xe0: 0x2c602, // h2 - 0xe2: 0x19e09, // plaintext - 0xe4: 0x4e70c, // onmouseenter - 0xe7: 0x46d07, // checked - 0xe8: 0x46403, // pre - 0xea: 0x35308, // multiple - 0xeb: 0x16103, // bdi - 0xec: 0x33109, // maxlength - 0xed: 0x7701, // q - 0xee: 0x61b0a, // onauxclick - 0xf0: 0x57003, // wbr - 0xf2: 0x11504, // base - 0xf3: 0x6dd06, // option - 0xf5: 0x40710, // ondurationchange - 0xf7: 0x5508, // noframes - 0xf9: 0x3f908, // dropzone - 0xfb: 0x67105, // scope - 0xfc: 0x9c08, // reversed - 0xfd: 0x3ae0b, // ondragenter - 0xfe: 0x3ee05, // start - 0xff: 0xf903, // xmp - 0x100: 0x5f507, // srclang - 0x101: 0x2ef03, // img - 0x104: 0x101, // b - 0x105: 0x23c03, // for - 0x106: 0xc105, // aside - 0x107: 0x43d07, // oninput - 0x108: 0x34a04, // area - 0x109: 0x28c0a, // formmethod - 0x10a: 0x72004, // wrap - 0x10c: 0x22402, // rp - 0x10d: 0x45f0a, // onkeypress - 0x10e: 0x5102, // tt - 0x110: 0x33b02, // mi - 0x111: 0x35b05, // muted - 0x112: 0xb003, // alt - 0x113: 0x19004, // code - 0x114: 0x4202, // em - 0x115: 0x3b90a, // ondragexit - 0x117: 0x3d04, // span - 0x119: 0x30f08, // manifest - 0x11a: 0x37b08, // menuitem - 0x11b: 0x57f07, // content - 0x11d: 0x6bd09, // onwaiting - 0x11f: 0x4ba09, // onloadend - 0x121: 0x3720d, // oncontextmenu - 0x123: 0x5c206, // onblur - 0x124: 0x3f007, // article - 0x125: 0xa303, // dir - 0x126: 0xe704, // ping - 0x127: 0x23408, // required - 0x128: 0x44909, // oninvalid - 0x129: 0x6d405, // align - 0x12b: 0x57e04, // icon - 0x12c: 0x64902, // h6 - 0x12d: 0x1b404, // cols - 0x12e: 0x2160a, // figcaption - 0x12f: 0x45209, // onkeydown - 0x130: 0x66708, // onsubmit - 0x131: 0x13609, // oncanplay - 0x132: 0x70503, // sup - 0x133: 0xc01, // p - 0x135: 0x3fe09, // onemptied - 0x136: 0x38506, // oncopy - 0x137: 0x55804, // cite - 0x138: 0x39b0a, // ondblclick - 0x13a: 0x4ff0b, // onmousemove - 0x13c: 0x66903, // sub - 0x13d: 0x47b03, // rel - 0x13e: 0xe008, // optgroup - 0x142: 0x3a07, // rowspan - 0x143: 0x36c06, // source - 0x144: 0x1fe08, // noscript - 0x145: 0x55f04, // open - 0x146: 0x1ec03, // ins - 0x147: 0x23c0d, // foreignObject - 0x148: 0x5a10a, // onpopstate - 0x14a: 0x27507, // enctype - 0x14b: 0x25e0e, // onautocomplete - 0x14c: 0x34608, // textarea - 0x14e: 0x2600c, // autocomplete - 0x14f: 0x14002, // hr - 0x150: 0x1ce08, // controls - 0x151: 0xc302, // id - 0x153: 0x21e0c, // onafterprint - 0x155: 0x2490d, // foreignobject - 0x156: 0x31b07, // marquee - 0x157: 0x58e07, // onpause - 0x158: 0x5e202, // dl - 0x159: 0x12c06, // height - 0x15a: 0x33b03, // min - 0x15b: 0xa307, // dirname - 0x15c: 0x1a609, // translate - 0x15d: 0x13004, // html - 0x15e: 0x33b09, // minlength - 0x15f: 0x47a07, // preload - 0x160: 0x70e08, // template - 0x161: 0x3d30b, // ondragleave - 0x164: 0x5b403, // src - 0x165: 0x31506, // strong - 0x167: 0x4c04, // samp - 0x168: 0x6ed07, // address - 0x169: 0x54508, // ononline - 0x16b: 0xfb0b, // placeholder - 0x16c: 0x2ac06, // target - 0x16d: 0x1ee05, // small - 0x16e: 0x6c607, // onwheel - 0x16f: 0x1b90a, // annotation - 0x170: 0x4680a, // spellcheck - 0x171: 0x4607, // details - 0x172: 0xbd06, // canvas - 0x173: 0xeb09, // autofocus - 0x174: 0xc05, // param - 0x176: 0x45708, // download - 0x177: 0x44603, // del - 0x178: 0x36007, // onclose - 0x179: 0x16003, // kbd - 0x17a: 0x30106, // applet - 0x17b: 0x2c804, // href - 0x17c: 0x5ed08, // onresize - 0x17e: 0x4910c, // onloadeddata - 0x180: 0x7402, // tr - 0x181: 0x2a80a, // formtarget - 0x182: 0xca05, // title - 0x183: 0x6f905, // style - 0x184: 0x7a06, // strike - 0x185: 0x59206, // usemap - 0x186: 0x2e406, // iframe - 0x187: 0x1004, // main - 0x189: 0x9707, // picture - 0x18c: 0x2fe05, // ismap - 0x18e: 0x49904, // data - 0x18f: 0xda05, // label - 0x191: 0x3c50e, // referrerpolicy - 0x192: 0x13f02, // th - 0x194: 0x52a06, // prompt - 0x195: 0x5bd07, // section - 0x197: 0x6cd07, // optimum - 0x198: 0x2c304, // high - 0x199: 0x14502, // h1 - 0x19a: 0x65509, // onstalled - 0x19b: 0x15603, // var - 0x19c: 0x11c04, // time - 0x19e: 0x67002, // ms - 0x19f: 0x32506, // header - 0x1a0: 0x4ce09, // onmessage - 0x1a1: 0x56205, // nonce - 0x1a2: 0x2560a, // formaction - 0x1a3: 0x20806, // center - 0x1a4: 0x3704, // nobr - 0x1a5: 0x58905, // table - 0x1a6: 0x49d07, // listing - 0x1a7: 0x18a06, // legend - 0x1a9: 0x28309, // challenge - 0x1aa: 0x23006, // figure - 0x1ab: 0x8e05, // media - 0x1ae: 0x8104, // type - 0x1af: 0x11904, // font - 0x1b0: 0x4ce0e, // onmessageerror - 0x1b1: 0x36508, // seamless - 0x1b2: 0x5f03, // dfn - 0x1b3: 0x19205, // defer - 0x1b4: 0x6b03, // low - 0x1b5: 0x62d09, // onseeking - 0x1b6: 0x5170b, // onmouseover - 0x1b7: 0x29a0a, // novalidate - 0x1b8: 0x7160a, // workertype - 0x1ba: 0x3c107, // itemref - 0x1bd: 0x1, // a - 0x1be: 0x30003, // map - 0x1bf: 0x11a0c, // ontimeupdate - 0x1c0: 0x14707, // bgsound - 0x1c1: 0x3206, // keygen - 0x1c2: 0x2705, // tbody - 0x1c5: 0x64006, // onshow - 0x1c7: 0x2501, // s - 0x1c8: 0x4f07, // pattern - 0x1cc: 0x13610, // oncanplaythrough - 0x1ce: 0x2bf02, // dd - 0x1cf: 0x6f306, // srcset - 0x1d0: 0x15903, // big - 0x1d2: 0x64d08, // sortable - 0x1d3: 0x47407, // onkeyup - 0x1d5: 0x59806, // onplay - 0x1d7: 0x4ac04, // meta - 0x1d8: 0x3f706, // ondrop - 0x1da: 0x5fc08, // onscroll - 0x1db: 0x1e30b, // crossorigin - 0x1dc: 0x5670a, // onpageshow - 0x1dd: 0x4, // abbr - 0x1de: 0x5e02, // td - 0x1df: 0x57f0f, // contenteditable - 0x1e0: 0x25a06, // action - 0x1e1: 0x10a0b, // playsinline - 0x1e2: 0x42507, // onfocus - 0x1e3: 0x2c808, // hreflang - 0x1e5: 0x50a0a, // onmouseout - 0x1e6: 0x5e607, // onreset - 0x1e7: 0x10608, // autoplay - 0x1ea: 0x67106, // scoped - 0x1ec: 0x30a, // radiogroup - 0x1ee: 0x3740b, // contextmenu - 0x1ef: 0x52209, // onmouseup - 0x1f1: 0x2b206, // hgroup - 0x1f2: 0x1f00f, // allowfullscreen - 0x1f3: 0x4b208, // tabindex - 0x1f6: 0x2f707, // isindex - 0x1f7: 0x1a0e, // accept-charset - 0x1f8: 0x2960e, // formnovalidate - 0x1fb: 0x1b90e, // annotation-xml - 0x1fc: 0x4205, // embed - 0x1fd: 0x20006, // script - 0x1fe: 0x16206, // dialog - 0x1ff: 0x1c707, // command -} - -const atomText = "abbradiogrouparamainavalueaccept-charsetbodyaccesskeygenobro" + - "wspanoembedetailsampatternoframesetdfnomoduleallowpaymentreq" + - "uestrikeytypeallowusermediagroupictureversedirnameterubyaltf" + - "ooterasyncanvasidefaultitleaudioncancelabelooptgroupingautof" + - "ocusandboxmplaceholderautoplaysinlinebasefontimeupdateviacac" + - "heightmlbdoncanplaythrough1bgsoundisabledivarbigblinkbdialog" + - "blockquotebuttonabortrackindraggablegendcodefercolgrouplaint" + - "extranslatecolorcolspannotation-xmlcommandcontrolshapecoords" + - "lotcrossoriginsmallowfullscreenoscriptfacenterfieldsetfigcap" + - "tionafterprintegrityfigurequiredforeignObjectforeignobjectfo" + - "rmactionautocompleteerrorformenctypemustmatchallengeformmeth" + - "odformnovalidatetimeformtargethgrouposterhiddenhigh2hreflang" + - "http-equivideonclickiframeimageimglyph3isindexismappletitemt" + - "ypemanifestrongmarqueematheadersortedmaxlength4minlength5mte" + - "xtareadonlymultiplemutedoncloseamlessourceoncontextmenuitemi" + - "doncopyoncuechangeoncutondblclickondragendondragenterondrage" + - "xitemreferrerpolicyondragleaveondragoverondragstarticleondro" + - "pzonemptiedondurationchangeonendedonerroronfocuspaceronhashc" + - "hangeoninputmodeloninvalidonkeydownloadonkeypresspellchecked" + - "onkeyupreloadonlanguagechangeonloadeddatalistingonloadedmeta" + - "databindexonloadendonloadstartonmessageerroronmousedownonmou" + - "seenteronmouseleaveonmousemoveonmouseoutputonmouseoveronmous" + - "eupromptonmousewheelonofflineononlineonpagehidescitempropeno" + - "nceonpageshowbronpastepublicontenteditableonpausemaponplayin" + - "gonpopstateonprogressrcdoclassectionbluronratechangeonreject" + - "ionhandledonresetonresizesrclangonscrollonsecuritypolicyviol" + - "ationauxclickonseekedonseekingonselectedonshowidth6onsortabl" + - "eonstalledonstorageonsubmitemscopedonsuspendontoggleonunhand" + - "ledrejectionbeforeprintonunloadonvolumechangeonwaitingonwhee" + - "loptimumalignmarkoptionbeforeunloaddressrcsetstylesummarysup" + - "svgsystemplateworkertypewrap" diff --git a/vendor/golang.org/x/net/html/charset/charset.go b/vendor/golang.org/x/net/html/charset/charset.go deleted file mode 100644 index 13bed1599..000000000 --- a/vendor/golang.org/x/net/html/charset/charset.go +++ /dev/null @@ -1,257 +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 charset provides common text encodings for HTML documents. -// -// The mapping from encoding labels to encodings is defined at -// https://encoding.spec.whatwg.org/. -package charset // import "golang.org/x/net/html/charset" - -import ( - "bytes" - "fmt" - "io" - "mime" - "strings" - "unicode/utf8" - - "golang.org/x/net/html" - "golang.org/x/text/encoding" - "golang.org/x/text/encoding/charmap" - "golang.org/x/text/encoding/htmlindex" - "golang.org/x/text/transform" -) - -// Lookup returns the encoding with the specified label, and its canonical -// name. It returns nil and the empty string if label is not one of the -// standard encodings for HTML. Matching is case-insensitive and ignores -// leading and trailing whitespace. Encoders will use HTML escape sequences for -// runes that are not supported by the character set. -func Lookup(label string) (e encoding.Encoding, name string) { - e, err := htmlindex.Get(label) - if err != nil { - return nil, "" - } - name, _ = htmlindex.Name(e) - return &htmlEncoding{e}, name -} - -type htmlEncoding struct{ encoding.Encoding } - -func (h *htmlEncoding) NewEncoder() *encoding.Encoder { - // HTML requires a non-terminating legacy encoder. We use HTML escapes to - // substitute unsupported code points. - return encoding.HTMLEscapeUnsupported(h.Encoding.NewEncoder()) -} - -// DetermineEncoding determines the encoding of an HTML document by examining -// up to the first 1024 bytes of content and the declared Content-Type. -// -// See http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#determining-the-character-encoding -func DetermineEncoding(content []byte, contentType string) (e encoding.Encoding, name string, certain bool) { - if len(content) > 1024 { - content = content[:1024] - } - - for _, b := range boms { - if bytes.HasPrefix(content, b.bom) { - e, name = Lookup(b.enc) - return e, name, true - } - } - - if _, params, err := mime.ParseMediaType(contentType); err == nil { - if cs, ok := params["charset"]; ok { - if e, name = Lookup(cs); e != nil { - return e, name, true - } - } - } - - if len(content) > 0 { - e, name = prescan(content) - if e != nil { - return e, name, false - } - } - - // Try to detect UTF-8. - // First eliminate any partial rune at the end. - for i := len(content) - 1; i >= 0 && i > len(content)-4; i-- { - b := content[i] - if b < 0x80 { - break - } - if utf8.RuneStart(b) { - content = content[:i] - break - } - } - hasHighBit := false - for _, c := range content { - if c >= 0x80 { - hasHighBit = true - break - } - } - if hasHighBit && utf8.Valid(content) { - return encoding.Nop, "utf-8", false - } - - // TODO: change default depending on user's locale? - return charmap.Windows1252, "windows-1252", false -} - -// NewReader returns an io.Reader that converts the content of r to UTF-8. -// It calls DetermineEncoding to find out what r's encoding is. -func NewReader(r io.Reader, contentType string) (io.Reader, error) { - preview := make([]byte, 1024) - n, err := io.ReadFull(r, preview) - switch { - case err == io.ErrUnexpectedEOF: - preview = preview[:n] - r = bytes.NewReader(preview) - case err != nil: - return nil, err - default: - r = io.MultiReader(bytes.NewReader(preview), r) - } - - if e, _, _ := DetermineEncoding(preview, contentType); e != encoding.Nop { - r = transform.NewReader(r, e.NewDecoder()) - } - return r, nil -} - -// NewReaderLabel returns a reader that converts from the specified charset to -// UTF-8. It uses Lookup to find the encoding that corresponds to label, and -// returns an error if Lookup returns nil. It is suitable for use as -// encoding/xml.Decoder's CharsetReader function. -func NewReaderLabel(label string, input io.Reader) (io.Reader, error) { - e, _ := Lookup(label) - if e == nil { - return nil, fmt.Errorf("unsupported charset: %q", label) - } - return transform.NewReader(input, e.NewDecoder()), nil -} - -func prescan(content []byte) (e encoding.Encoding, name string) { - z := html.NewTokenizer(bytes.NewReader(content)) - for { - switch z.Next() { - case html.ErrorToken: - return nil, "" - - case html.StartTagToken, html.SelfClosingTagToken: - tagName, hasAttr := z.TagName() - if !bytes.Equal(tagName, []byte("meta")) { - continue - } - attrList := make(map[string]bool) - gotPragma := false - - const ( - dontKnow = iota - doNeedPragma - doNotNeedPragma - ) - needPragma := dontKnow - - name = "" - e = nil - for hasAttr { - var key, val []byte - key, val, hasAttr = z.TagAttr() - ks := string(key) - if attrList[ks] { - continue - } - attrList[ks] = true - for i, c := range val { - if 'A' <= c && c <= 'Z' { - val[i] = c + 0x20 - } - } - - switch ks { - case "http-equiv": - if bytes.Equal(val, []byte("content-type")) { - gotPragma = true - } - - case "content": - if e == nil { - name = fromMetaElement(string(val)) - if name != "" { - e, name = Lookup(name) - if e != nil { - needPragma = doNeedPragma - } - } - } - - case "charset": - e, name = Lookup(string(val)) - needPragma = doNotNeedPragma - } - } - - if needPragma == dontKnow || needPragma == doNeedPragma && !gotPragma { - continue - } - - if strings.HasPrefix(name, "utf-16") { - name = "utf-8" - e = encoding.Nop - } - - if e != nil { - return e, name - } - } - } -} - -func fromMetaElement(s string) string { - for s != "" { - csLoc := strings.Index(s, "charset") - if csLoc == -1 { - return "" - } - s = s[csLoc+len("charset"):] - s = strings.TrimLeft(s, " \t\n\f\r") - if !strings.HasPrefix(s, "=") { - continue - } - s = s[1:] - s = strings.TrimLeft(s, " \t\n\f\r") - if s == "" { - return "" - } - if q := s[0]; q == '"' || q == '\'' { - s = s[1:] - closeQuote := strings.IndexRune(s, rune(q)) - if closeQuote == -1 { - return "" - } - return s[:closeQuote] - } - - end := strings.IndexAny(s, "; \t\n\f\r") - if end == -1 { - end = len(s) - } - return s[:end] - } - return "" -} - -var boms = []struct { - bom []byte - enc string -}{ - {[]byte{0xfe, 0xff}, "utf-16be"}, - {[]byte{0xff, 0xfe}, "utf-16le"}, - {[]byte{0xef, 0xbb, 0xbf}, "utf-8"}, -} diff --git a/vendor/golang.org/x/net/html/const.go b/vendor/golang.org/x/net/html/const.go deleted file mode 100644 index b37e62124..000000000 --- a/vendor/golang.org/x/net/html/const.go +++ /dev/null @@ -1,104 +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 html - -// Section 12.2.3.2 of the HTML5 specification says "The following elements -// have varying levels of special parsing rules". -// https://html.spec.whatwg.org/multipage/syntax.html#the-stack-of-open-elements -var isSpecialElementMap = map[string]bool{ - "address": true, - "applet": true, - "area": true, - "article": true, - "aside": true, - "base": true, - "basefont": true, - "bgsound": true, - "blockquote": true, - "body": true, - "br": true, - "button": true, - "caption": true, - "center": true, - "col": true, - "colgroup": true, - "dd": true, - "details": true, - "dir": true, - "div": true, - "dl": true, - "dt": true, - "embed": true, - "fieldset": true, - "figcaption": true, - "figure": true, - "footer": true, - "form": true, - "frame": true, - "frameset": true, - "h1": true, - "h2": true, - "h3": true, - "h4": true, - "h5": true, - "h6": true, - "head": true, - "header": true, - "hgroup": true, - "hr": true, - "html": true, - "iframe": true, - "img": true, - "input": true, - "isindex": true, // The 'isindex' element has been removed, but keep it for backwards compatibility. - "keygen": true, - "li": true, - "link": true, - "listing": true, - "main": true, - "marquee": true, - "menu": true, - "meta": true, - "nav": true, - "noembed": true, - "noframes": true, - "noscript": true, - "object": true, - "ol": true, - "p": true, - "param": true, - "plaintext": true, - "pre": true, - "script": true, - "section": true, - "select": true, - "source": true, - "style": true, - "summary": true, - "table": true, - "tbody": true, - "td": true, - "template": true, - "textarea": true, - "tfoot": true, - "th": true, - "thead": true, - "title": true, - "tr": true, - "track": true, - "ul": true, - "wbr": true, - "xmp": true, -} - -func isSpecialElement(element *Node) bool { - switch element.Namespace { - case "", "html": - return isSpecialElementMap[element.Data] - case "svg": - return element.Data == "foreignObject" - } - return false -} diff --git a/vendor/golang.org/x/net/html/doc.go b/vendor/golang.org/x/net/html/doc.go deleted file mode 100644 index 822ed42a0..000000000 --- a/vendor/golang.org/x/net/html/doc.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 html implements an HTML5-compliant tokenizer and parser. - -Tokenization is done by creating a Tokenizer for an io.Reader r. It is the -caller's responsibility to ensure that r provides UTF-8 encoded HTML. - - z := html.NewTokenizer(r) - -Given a Tokenizer z, the HTML is tokenized by repeatedly calling z.Next(), -which parses the next token and returns its type, or an error: - - for { - tt := z.Next() - if tt == html.ErrorToken { - // ... - return ... - } - // Process the current token. - } - -There are two APIs for retrieving the current token. The high-level API is to -call Token; the low-level API is to call Text or TagName / TagAttr. Both APIs -allow optionally calling Raw after Next but before Token, Text, TagName, or -TagAttr. In EBNF notation, the valid call sequence per token is: - - Next {Raw} [ Token | Text | TagName {TagAttr} ] - -Token returns an independent data structure that completely describes a token. -Entities (such as "<") are unescaped, tag names and attribute keys are -lower-cased, and attributes are collected into a []Attribute. For example: - - for { - if z.Next() == html.ErrorToken { - // Returning io.EOF indicates success. - return z.Err() - } - emitToken(z.Token()) - } - -The low-level API performs fewer allocations and copies, but the contents of -the []byte values returned by Text, TagName and TagAttr may change on the next -call to Next. For example, to extract an HTML page's anchor text: - - depth := 0 - for { - tt := z.Next() - switch tt { - case html.ErrorToken: - return z.Err() - case html.TextToken: - if depth > 0 { - // emitBytes should copy the []byte it receives, - // if it doesn't process it immediately. - emitBytes(z.Text()) - } - case html.StartTagToken, html.EndTagToken: - tn, _ := z.TagName() - if len(tn) == 1 && tn[0] == 'a' { - if tt == html.StartTagToken { - depth++ - } else { - depth-- - } - } - } - } - -Parsing is done by calling Parse with an io.Reader, which returns the root of -the parse tree (the document element) as a *Node. It is the caller's -responsibility to ensure that the Reader provides UTF-8 encoded HTML. For -example, to process each anchor node in depth-first order: - - doc, err := html.Parse(r) - if err != nil { - // ... - } - var f func(*html.Node) - f = func(n *html.Node) { - if n.Type == html.ElementNode && n.Data == "a" { - // Do something with n... - } - for c := n.FirstChild; c != nil; c = c.NextSibling { - f(c) - } - } - f(doc) - -The relevant specifications include: -https://html.spec.whatwg.org/multipage/syntax.html and -https://html.spec.whatwg.org/multipage/syntax.html#tokenization -*/ -package html // import "golang.org/x/net/html" - -// The tokenization algorithm implemented by this package is not a line-by-line -// transliteration of the relatively verbose state-machine in the WHATWG -// specification. A more direct approach is used instead, where the program -// counter implies the state, such as whether it is tokenizing a tag or a text -// node. Specification compliance is verified by checking expected and actual -// outputs over a test suite rather than aiming for algorithmic fidelity. - -// TODO(nigeltao): Does a DOM API belong in this package or a separate one? -// TODO(nigeltao): How does parsing interact with a JavaScript engine? diff --git a/vendor/golang.org/x/net/html/doctype.go b/vendor/golang.org/x/net/html/doctype.go deleted file mode 100644 index c484e5a94..000000000 --- a/vendor/golang.org/x/net/html/doctype.go +++ /dev/null @@ -1,156 +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 html - -import ( - "strings" -) - -// parseDoctype parses the data from a DoctypeToken into a name, -// public identifier, and system identifier. It returns a Node whose Type -// is DoctypeNode, whose Data is the name, and which has attributes -// named "system" and "public" for the two identifiers if they were present. -// quirks is whether the document should be parsed in "quirks mode". -func parseDoctype(s string) (n *Node, quirks bool) { - n = &Node{Type: DoctypeNode} - - // Find the name. - space := strings.IndexAny(s, whitespace) - if space == -1 { - space = len(s) - } - n.Data = s[:space] - // The comparison to "html" is case-sensitive. - if n.Data != "html" { - quirks = true - } - n.Data = strings.ToLower(n.Data) - s = strings.TrimLeft(s[space:], whitespace) - - if len(s) < 6 { - // It can't start with "PUBLIC" or "SYSTEM". - // Ignore the rest of the string. - return n, quirks || s != "" - } - - key := strings.ToLower(s[:6]) - s = s[6:] - for key == "public" || key == "system" { - s = strings.TrimLeft(s, whitespace) - if s == "" { - break - } - quote := s[0] - if quote != '"' && quote != '\'' { - break - } - s = s[1:] - q := strings.IndexRune(s, rune(quote)) - var id string - if q == -1 { - id = s - s = "" - } else { - id = s[:q] - s = s[q+1:] - } - n.Attr = append(n.Attr, Attribute{Key: key, Val: id}) - if key == "public" { - key = "system" - } else { - key = "" - } - } - - if key != "" || s != "" { - quirks = true - } else if len(n.Attr) > 0 { - if n.Attr[0].Key == "public" { - public := strings.ToLower(n.Attr[0].Val) - switch public { - case "-//w3o//dtd w3 html strict 3.0//en//", "-/w3d/dtd html 4.0 transitional/en", "html": - quirks = true - default: - for _, q := range quirkyIDs { - if strings.HasPrefix(public, q) { - quirks = true - break - } - } - } - // The following two public IDs only cause quirks mode if there is no system ID. - if len(n.Attr) == 1 && (strings.HasPrefix(public, "-//w3c//dtd html 4.01 frameset//") || - strings.HasPrefix(public, "-//w3c//dtd html 4.01 transitional//")) { - quirks = true - } - } - if lastAttr := n.Attr[len(n.Attr)-1]; lastAttr.Key == "system" && - strings.ToLower(lastAttr.Val) == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd" { - quirks = true - } - } - - return n, quirks -} - -// quirkyIDs is a list of public doctype identifiers that cause a document -// to be interpreted in quirks mode. The identifiers should be in lower case. -var quirkyIDs = []string{ - "+//silmaril//dtd html pro v0r11 19970101//", - "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", - "-//as//dtd html 3.0 aswedit + extensions//", - "-//ietf//dtd html 2.0 level 1//", - "-//ietf//dtd html 2.0 level 2//", - "-//ietf//dtd html 2.0 strict level 1//", - "-//ietf//dtd html 2.0 strict level 2//", - "-//ietf//dtd html 2.0 strict//", - "-//ietf//dtd html 2.0//", - "-//ietf//dtd html 2.1e//", - "-//ietf//dtd html 3.0//", - "-//ietf//dtd html 3.2 final//", - "-//ietf//dtd html 3.2//", - "-//ietf//dtd html 3//", - "-//ietf//dtd html level 0//", - "-//ietf//dtd html level 1//", - "-//ietf//dtd html level 2//", - "-//ietf//dtd html level 3//", - "-//ietf//dtd html strict level 0//", - "-//ietf//dtd html strict level 1//", - "-//ietf//dtd html strict level 2//", - "-//ietf//dtd html strict level 3//", - "-//ietf//dtd html strict//", - "-//ietf//dtd html//", - "-//metrius//dtd metrius presentational//", - "-//microsoft//dtd internet explorer 2.0 html strict//", - "-//microsoft//dtd internet explorer 2.0 html//", - "-//microsoft//dtd internet explorer 2.0 tables//", - "-//microsoft//dtd internet explorer 3.0 html strict//", - "-//microsoft//dtd internet explorer 3.0 html//", - "-//microsoft//dtd internet explorer 3.0 tables//", - "-//netscape comm. corp.//dtd html//", - "-//netscape comm. corp.//dtd strict html//", - "-//o'reilly and associates//dtd html 2.0//", - "-//o'reilly and associates//dtd html extended 1.0//", - "-//o'reilly and associates//dtd html extended relaxed 1.0//", - "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", - "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", - "-//spyglass//dtd html 2.0 extended//", - "-//sq//dtd html 2.0 hotmetal + extensions//", - "-//sun microsystems corp.//dtd hotjava html//", - "-//sun microsystems corp.//dtd hotjava strict html//", - "-//w3c//dtd html 3 1995-03-24//", - "-//w3c//dtd html 3.2 draft//", - "-//w3c//dtd html 3.2 final//", - "-//w3c//dtd html 3.2//", - "-//w3c//dtd html 3.2s draft//", - "-//w3c//dtd html 4.0 frameset//", - "-//w3c//dtd html 4.0 transitional//", - "-//w3c//dtd html experimental 19960712//", - "-//w3c//dtd html experimental 970421//", - "-//w3c//dtd w3 html//", - "-//w3o//dtd w3 html 3.0//", - "-//webtechs//dtd mozilla html 2.0//", - "-//webtechs//dtd mozilla html//", -} diff --git a/vendor/golang.org/x/net/html/entity.go b/vendor/golang.org/x/net/html/entity.go deleted file mode 100644 index a50c04c60..000000000 --- a/vendor/golang.org/x/net/html/entity.go +++ /dev/null @@ -1,2253 +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 html - -// All entities that do not end with ';' are 6 or fewer bytes long. -const longestEntityWithoutSemicolon = 6 - -// entity is a map from HTML entity names to their values. The semicolon matters: -// https://html.spec.whatwg.org/multipage/syntax.html#named-character-references -// lists both "amp" and "amp;" as two separate entries. -// -// Note that the HTML5 list is larger than the HTML4 list at -// http://www.w3.org/TR/html4/sgml/entities.html -var entity = map[string]rune{ - "AElig;": '\U000000C6', - "AMP;": '\U00000026', - "Aacute;": '\U000000C1', - "Abreve;": '\U00000102', - "Acirc;": '\U000000C2', - "Acy;": '\U00000410', - "Afr;": '\U0001D504', - "Agrave;": '\U000000C0', - "Alpha;": '\U00000391', - "Amacr;": '\U00000100', - "And;": '\U00002A53', - "Aogon;": '\U00000104', - "Aopf;": '\U0001D538', - "ApplyFunction;": '\U00002061', - "Aring;": '\U000000C5', - "Ascr;": '\U0001D49C', - "Assign;": '\U00002254', - "Atilde;": '\U000000C3', - "Auml;": '\U000000C4', - "Backslash;": '\U00002216', - "Barv;": '\U00002AE7', - "Barwed;": '\U00002306', - "Bcy;": '\U00000411', - "Because;": '\U00002235', - "Bernoullis;": '\U0000212C', - "Beta;": '\U00000392', - "Bfr;": '\U0001D505', - "Bopf;": '\U0001D539', - "Breve;": '\U000002D8', - "Bscr;": '\U0000212C', - "Bumpeq;": '\U0000224E', - "CHcy;": '\U00000427', - "COPY;": '\U000000A9', - "Cacute;": '\U00000106', - "Cap;": '\U000022D2', - "CapitalDifferentialD;": '\U00002145', - "Cayleys;": '\U0000212D', - "Ccaron;": '\U0000010C', - "Ccedil;": '\U000000C7', - "Ccirc;": '\U00000108', - "Cconint;": '\U00002230', - "Cdot;": '\U0000010A', - "Cedilla;": '\U000000B8', - "CenterDot;": '\U000000B7', - "Cfr;": '\U0000212D', - "Chi;": '\U000003A7', - "CircleDot;": '\U00002299', - "CircleMinus;": '\U00002296', - "CirclePlus;": '\U00002295', - "CircleTimes;": '\U00002297', - "ClockwiseContourIntegral;": '\U00002232', - "CloseCurlyDoubleQuote;": '\U0000201D', - "CloseCurlyQuote;": '\U00002019', - "Colon;": '\U00002237', - "Colone;": '\U00002A74', - "Congruent;": '\U00002261', - "Conint;": '\U0000222F', - "ContourIntegral;": '\U0000222E', - "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', -} - -// HTML entities that are two unicode codepoints. -var entity2 = map[string][2]rune{ - // TODO(nigeltao): Handle replacements that are wider than their names. - // "nLt;": {'\u226A', '\u20D2'}, - // "nGt;": {'\u226B', '\u20D2'}, - "NotEqualTilde;": {'\u2242', '\u0338'}, - "NotGreaterFullEqual;": {'\u2267', '\u0338'}, - "NotGreaterGreater;": {'\u226B', '\u0338'}, - "NotGreaterSlantEqual;": {'\u2A7E', '\u0338'}, - "NotHumpDownHump;": {'\u224E', '\u0338'}, - "NotHumpEqual;": {'\u224F', '\u0338'}, - "NotLeftTriangleBar;": {'\u29CF', '\u0338'}, - "NotLessLess;": {'\u226A', '\u0338'}, - "NotLessSlantEqual;": {'\u2A7D', '\u0338'}, - "NotNestedGreaterGreater;": {'\u2AA2', '\u0338'}, - "NotNestedLessLess;": {'\u2AA1', '\u0338'}, - "NotPrecedesEqual;": {'\u2AAF', '\u0338'}, - "NotRightTriangleBar;": {'\u29D0', '\u0338'}, - "NotSquareSubset;": {'\u228F', '\u0338'}, - "NotSquareSuperset;": {'\u2290', '\u0338'}, - "NotSubset;": {'\u2282', '\u20D2'}, - "NotSucceedsEqual;": {'\u2AB0', '\u0338'}, - "NotSucceedsTilde;": {'\u227F', '\u0338'}, - "NotSuperset;": {'\u2283', '\u20D2'}, - "ThickSpace;": {'\u205F', '\u200A'}, - "acE;": {'\u223E', '\u0333'}, - "bne;": {'\u003D', '\u20E5'}, - "bnequiv;": {'\u2261', '\u20E5'}, - "caps;": {'\u2229', '\uFE00'}, - "cups;": {'\u222A', '\uFE00'}, - "fjlig;": {'\u0066', '\u006A'}, - "gesl;": {'\u22DB', '\uFE00'}, - "gvertneqq;": {'\u2269', '\uFE00'}, - "gvnE;": {'\u2269', '\uFE00'}, - "lates;": {'\u2AAD', '\uFE00'}, - "lesg;": {'\u22DA', '\uFE00'}, - "lvertneqq;": {'\u2268', '\uFE00'}, - "lvnE;": {'\u2268', '\uFE00'}, - "nGg;": {'\u22D9', '\u0338'}, - "nGtv;": {'\u226B', '\u0338'}, - "nLl;": {'\u22D8', '\u0338'}, - "nLtv;": {'\u226A', '\u0338'}, - "nang;": {'\u2220', '\u20D2'}, - "napE;": {'\u2A70', '\u0338'}, - "napid;": {'\u224B', '\u0338'}, - "nbump;": {'\u224E', '\u0338'}, - "nbumpe;": {'\u224F', '\u0338'}, - "ncongdot;": {'\u2A6D', '\u0338'}, - "nedot;": {'\u2250', '\u0338'}, - "nesim;": {'\u2242', '\u0338'}, - "ngE;": {'\u2267', '\u0338'}, - "ngeqq;": {'\u2267', '\u0338'}, - "ngeqslant;": {'\u2A7E', '\u0338'}, - "nges;": {'\u2A7E', '\u0338'}, - "nlE;": {'\u2266', '\u0338'}, - "nleqq;": {'\u2266', '\u0338'}, - "nleqslant;": {'\u2A7D', '\u0338'}, - "nles;": {'\u2A7D', '\u0338'}, - "notinE;": {'\u22F9', '\u0338'}, - "notindot;": {'\u22F5', '\u0338'}, - "nparsl;": {'\u2AFD', '\u20E5'}, - "npart;": {'\u2202', '\u0338'}, - "npre;": {'\u2AAF', '\u0338'}, - "npreceq;": {'\u2AAF', '\u0338'}, - "nrarrc;": {'\u2933', '\u0338'}, - "nrarrw;": {'\u219D', '\u0338'}, - "nsce;": {'\u2AB0', '\u0338'}, - "nsubE;": {'\u2AC5', '\u0338'}, - "nsubset;": {'\u2282', '\u20D2'}, - "nsubseteqq;": {'\u2AC5', '\u0338'}, - "nsucceq;": {'\u2AB0', '\u0338'}, - "nsupE;": {'\u2AC6', '\u0338'}, - "nsupset;": {'\u2283', '\u20D2'}, - "nsupseteqq;": {'\u2AC6', '\u0338'}, - "nvap;": {'\u224D', '\u20D2'}, - "nvge;": {'\u2265', '\u20D2'}, - "nvgt;": {'\u003E', '\u20D2'}, - "nvle;": {'\u2264', '\u20D2'}, - "nvlt;": {'\u003C', '\u20D2'}, - "nvltrie;": {'\u22B4', '\u20D2'}, - "nvrtrie;": {'\u22B5', '\u20D2'}, - "nvsim;": {'\u223C', '\u20D2'}, - "race;": {'\u223D', '\u0331'}, - "smtes;": {'\u2AAC', '\uFE00'}, - "sqcaps;": {'\u2293', '\uFE00'}, - "sqcups;": {'\u2294', '\uFE00'}, - "varsubsetneq;": {'\u228A', '\uFE00'}, - "varsubsetneqq;": {'\u2ACB', '\uFE00'}, - "varsupsetneq;": {'\u228B', '\uFE00'}, - "varsupsetneqq;": {'\u2ACC', '\uFE00'}, - "vnsub;": {'\u2282', '\u20D2'}, - "vnsup;": {'\u2283', '\u20D2'}, - "vsubnE;": {'\u2ACB', '\uFE00'}, - "vsubne;": {'\u228A', '\uFE00'}, - "vsupnE;": {'\u2ACC', '\uFE00'}, - "vsupne;": {'\u228B', '\uFE00'}, -} diff --git a/vendor/golang.org/x/net/html/escape.go b/vendor/golang.org/x/net/html/escape.go deleted file mode 100644 index d85613962..000000000 --- a/vendor/golang.org/x/net/html/escape.go +++ /dev/null @@ -1,258 +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 html - -import ( - "bytes" - "strings" - "unicode/utf8" -) - -// These replacements permit compatibility with old numeric entities that -// assumed Windows-1252 encoding. -// https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference -var replacementTable = [...]rune{ - '\u20AC', // First entry is what 0x80 should be replaced with. - '\u0081', - '\u201A', - '\u0192', - '\u201E', - '\u2026', - '\u2020', - '\u2021', - '\u02C6', - '\u2030', - '\u0160', - '\u2039', - '\u0152', - '\u008D', - '\u017D', - '\u008F', - '\u0090', - '\u2018', - '\u2019', - '\u201C', - '\u201D', - '\u2022', - '\u2013', - '\u2014', - '\u02DC', - '\u2122', - '\u0161', - '\u203A', - '\u0153', - '\u009D', - '\u017E', - '\u0178', // Last entry is 0x9F. - // 0x00->'\uFFFD' is handled programmatically. - // 0x0D->'\u000D' is a no-op. -} - -// unescapeEntity reads an entity like "<" from b[src:] and writes the -// corresponding "<" to b[dst:], returning the incremented dst and src cursors. -// Precondition: b[src] == '&' && dst <= src. -// attribute should be true if parsing an attribute value. -func unescapeEntity(b []byte, dst, src int, attribute bool) (dst1, src1 int) { - // https://html.spec.whatwg.org/multipage/syntax.html#consume-a-character-reference - - // i starts at 1 because we already know that s[0] == '&'. - i, s := 1, b[src:] - - if len(s) <= 1 { - b[dst] = b[src] - return dst + 1, src + 1 - } - - if s[i] == '#' { - if len(s) <= 3 { // We need to have at least "&#.". - b[dst] = b[src] - return dst + 1, src + 1 - } - i++ - c := s[i] - hex := false - if c == 'x' || c == 'X' { - hex = true - i++ - } - - x := '\x00' - for i < len(s) { - c = s[i] - i++ - if hex { - if '0' <= c && c <= '9' { - x = 16*x + rune(c) - '0' - continue - } else if 'a' <= c && c <= 'f' { - x = 16*x + rune(c) - 'a' + 10 - continue - } else if 'A' <= c && c <= 'F' { - x = 16*x + rune(c) - 'A' + 10 - continue - } - } else if '0' <= c && c <= '9' { - x = 10*x + rune(c) - '0' - continue - } - if c != ';' { - i-- - } - break - } - - if i <= 3 { // No characters matched. - b[dst] = b[src] - return dst + 1, src + 1 - } - - if 0x80 <= x && x <= 0x9F { - // Replace characters from Windows-1252 with UTF-8 equivalents. - x = replacementTable[x-0x80] - } else if x == 0 || (0xD800 <= x && x <= 0xDFFF) || x > 0x10FFFF { - // Replace invalid characters with the replacement character. - x = '\uFFFD' - } - - return dst + utf8.EncodeRune(b[dst:], x), src + i - } - - // Consume the maximum number of characters possible, with the - // consumed characters matching one of the named references. - - for i < len(s) { - c := s[i] - i++ - // Lower-cased characters are more common in entities, so we check for them first. - if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' { - continue - } - if c != ';' { - i-- - } - break - } - - entityName := string(s[1:i]) - if entityName == "" { - // No-op. - } else if attribute && entityName[len(entityName)-1] != ';' && len(s) > i && s[i] == '=' { - // No-op. - } else if x := entity[entityName]; x != 0 { - return dst + utf8.EncodeRune(b[dst:], x), src + i - } else if x := entity2[entityName]; x[0] != 0 { - dst1 := dst + utf8.EncodeRune(b[dst:], x[0]) - return dst1 + utf8.EncodeRune(b[dst1:], x[1]), src + i - } else if !attribute { - maxLen := len(entityName) - 1 - if maxLen > longestEntityWithoutSemicolon { - maxLen = longestEntityWithoutSemicolon - } - for j := maxLen; j > 1; j-- { - if x := entity[entityName[:j]]; x != 0 { - return dst + utf8.EncodeRune(b[dst:], x), src + j + 1 - } - } - } - - dst1, src1 = dst+i, src+i - copy(b[dst:dst1], b[src:src1]) - return dst1, src1 -} - -// unescape unescapes b's entities in-place, so that "a<b" becomes "a': - esc = ">" - case '"': - // """ is shorter than """. - esc = """ - case '\r': - esc = " " - default: - panic("unrecognized escape character") - } - s = s[i+1:] - if _, err := w.WriteString(esc); err != nil { - return err - } - i = strings.IndexAny(s, escapedChars) - } - _, err := w.WriteString(s) - return err -} - -// EscapeString escapes special characters like "<" to become "<". It -// escapes only five such characters: <, >, &, ' and ". -// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't -// always true. -func EscapeString(s string) string { - if strings.IndexAny(s, escapedChars) == -1 { - return s - } - var buf bytes.Buffer - escape(&buf, s) - return buf.String() -} - -// UnescapeString unescapes entities like "<" to become "<". It unescapes a -// larger range of entities than EscapeString escapes. For example, "á" -// unescapes to "á", as does "á" and "&xE1;". -// UnescapeString(EscapeString(s)) == s always holds, but the converse isn't -// always true. -func UnescapeString(s string) string { - for _, c := range s { - if c == '&' { - return string(unescape([]byte(s), false)) - } - } - return s -} diff --git a/vendor/golang.org/x/net/html/foreign.go b/vendor/golang.org/x/net/html/foreign.go deleted file mode 100644 index d3b384409..000000000 --- a/vendor/golang.org/x/net/html/foreign.go +++ /dev/null @@ -1,226 +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 html - -import ( - "strings" -) - -func adjustAttributeNames(aa []Attribute, nameMap map[string]string) { - for i := range aa { - if newName, ok := nameMap[aa[i].Key]; ok { - aa[i].Key = newName - } - } -} - -func adjustForeignAttributes(aa []Attribute) { - for i, a := range aa { - if a.Key == "" || a.Key[0] != 'x' { - continue - } - switch a.Key { - case "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", - "xlink:title", "xlink:type", "xml:base", "xml:lang", "xml:space", "xmlns:xlink": - j := strings.Index(a.Key, ":") - aa[i].Namespace = a.Key[:j] - aa[i].Key = a.Key[j+1:] - } - } -} - -func htmlIntegrationPoint(n *Node) bool { - if n.Type != ElementNode { - return false - } - switch n.Namespace { - case "math": - if n.Data == "annotation-xml" { - for _, a := range n.Attr { - if a.Key == "encoding" { - val := strings.ToLower(a.Val) - if val == "text/html" || val == "application/xhtml+xml" { - return true - } - } - } - } - case "svg": - switch n.Data { - case "desc", "foreignObject", "title": - return true - } - } - return false -} - -func mathMLTextIntegrationPoint(n *Node) bool { - if n.Namespace != "math" { - return false - } - switch n.Data { - case "mi", "mo", "mn", "ms", "mtext": - return true - } - return false -} - -// Section 12.2.5.5. -var breakout = map[string]bool{ - "b": true, - "big": true, - "blockquote": true, - "body": true, - "br": true, - "center": true, - "code": true, - "dd": true, - "div": true, - "dl": true, - "dt": true, - "em": true, - "embed": true, - "h1": true, - "h2": true, - "h3": true, - "h4": true, - "h5": true, - "h6": true, - "head": true, - "hr": true, - "i": true, - "img": true, - "li": true, - "listing": true, - "menu": true, - "meta": true, - "nobr": true, - "ol": true, - "p": true, - "pre": true, - "ruby": true, - "s": true, - "small": true, - "span": true, - "strong": true, - "strike": true, - "sub": true, - "sup": true, - "table": true, - "tt": true, - "u": true, - "ul": true, - "var": true, -} - -// Section 12.2.5.5. -var svgTagNameAdjustments = map[string]string{ - "altglyph": "altGlyph", - "altglyphdef": "altGlyphDef", - "altglyphitem": "altGlyphItem", - "animatecolor": "animateColor", - "animatemotion": "animateMotion", - "animatetransform": "animateTransform", - "clippath": "clipPath", - "feblend": "feBlend", - "fecolormatrix": "feColorMatrix", - "fecomponenttransfer": "feComponentTransfer", - "fecomposite": "feComposite", - "feconvolvematrix": "feConvolveMatrix", - "fediffuselighting": "feDiffuseLighting", - "fedisplacementmap": "feDisplacementMap", - "fedistantlight": "feDistantLight", - "feflood": "feFlood", - "fefunca": "feFuncA", - "fefuncb": "feFuncB", - "fefuncg": "feFuncG", - "fefuncr": "feFuncR", - "fegaussianblur": "feGaussianBlur", - "feimage": "feImage", - "femerge": "feMerge", - "femergenode": "feMergeNode", - "femorphology": "feMorphology", - "feoffset": "feOffset", - "fepointlight": "fePointLight", - "fespecularlighting": "feSpecularLighting", - "fespotlight": "feSpotLight", - "fetile": "feTile", - "feturbulence": "feTurbulence", - "foreignobject": "foreignObject", - "glyphref": "glyphRef", - "lineargradient": "linearGradient", - "radialgradient": "radialGradient", - "textpath": "textPath", -} - -// Section 12.2.5.1 -var mathMLAttributeAdjustments = map[string]string{ - "definitionurl": "definitionURL", -} - -var svgAttributeAdjustments = map[string]string{ - "attributename": "attributeName", - "attributetype": "attributeType", - "basefrequency": "baseFrequency", - "baseprofile": "baseProfile", - "calcmode": "calcMode", - "clippathunits": "clipPathUnits", - "contentscripttype": "contentScriptType", - "contentstyletype": "contentStyleType", - "diffuseconstant": "diffuseConstant", - "edgemode": "edgeMode", - "externalresourcesrequired": "externalResourcesRequired", - "filterres": "filterRes", - "filterunits": "filterUnits", - "glyphref": "glyphRef", - "gradienttransform": "gradientTransform", - "gradientunits": "gradientUnits", - "kernelmatrix": "kernelMatrix", - "kernelunitlength": "kernelUnitLength", - "keypoints": "keyPoints", - "keysplines": "keySplines", - "keytimes": "keyTimes", - "lengthadjust": "lengthAdjust", - "limitingconeangle": "limitingConeAngle", - "markerheight": "markerHeight", - "markerunits": "markerUnits", - "markerwidth": "markerWidth", - "maskcontentunits": "maskContentUnits", - "maskunits": "maskUnits", - "numoctaves": "numOctaves", - "pathlength": "pathLength", - "patterncontentunits": "patternContentUnits", - "patterntransform": "patternTransform", - "patternunits": "patternUnits", - "pointsatx": "pointsAtX", - "pointsaty": "pointsAtY", - "pointsatz": "pointsAtZ", - "preservealpha": "preserveAlpha", - "preserveaspectratio": "preserveAspectRatio", - "primitiveunits": "primitiveUnits", - "refx": "refX", - "refy": "refY", - "repeatcount": "repeatCount", - "repeatdur": "repeatDur", - "requiredextensions": "requiredExtensions", - "requiredfeatures": "requiredFeatures", - "specularconstant": "specularConstant", - "specularexponent": "specularExponent", - "spreadmethod": "spreadMethod", - "startoffset": "startOffset", - "stddeviation": "stdDeviation", - "stitchtiles": "stitchTiles", - "surfacescale": "surfaceScale", - "systemlanguage": "systemLanguage", - "tablevalues": "tableValues", - "targetx": "targetX", - "targety": "targetY", - "textlength": "textLength", - "viewbox": "viewBox", - "viewtarget": "viewTarget", - "xchannelselector": "xChannelSelector", - "ychannelselector": "yChannelSelector", - "zoomandpan": "zoomAndPan", -} diff --git a/vendor/golang.org/x/net/html/node.go b/vendor/golang.org/x/net/html/node.go deleted file mode 100644 index 26b657aec..000000000 --- a/vendor/golang.org/x/net/html/node.go +++ /dev/null @@ -1,193 +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 html - -import ( - "golang.org/x/net/html/atom" -) - -// A NodeType is the type of a Node. -type NodeType uint32 - -const ( - ErrorNode NodeType = iota - TextNode - DocumentNode - ElementNode - CommentNode - DoctypeNode - scopeMarkerNode -) - -// Section 12.2.3.3 says "scope markers are inserted when entering applet -// elements, buttons, object elements, marquees, table cells, and table -// captions, and are used to prevent formatting from 'leaking'". -var scopeMarker = Node{Type: scopeMarkerNode} - -// A Node consists of a NodeType and some Data (tag name for element nodes, -// content for text) and are part of a tree of Nodes. Element nodes may also -// have a Namespace and contain a slice of Attributes. Data is unescaped, so -// that it looks like "a 0 { - return (*s)[i-1] - } - return nil -} - -// index returns the index of the top-most occurrence of n in the stack, or -1 -// if n is not present. -func (s *nodeStack) index(n *Node) int { - for i := len(*s) - 1; i >= 0; i-- { - if (*s)[i] == n { - return i - } - } - return -1 -} - -// insert inserts a node at the given index. -func (s *nodeStack) insert(i int, n *Node) { - (*s) = append(*s, nil) - copy((*s)[i+1:], (*s)[i:]) - (*s)[i] = n -} - -// remove removes a node from the stack. It is a no-op if n is not present. -func (s *nodeStack) remove(n *Node) { - i := s.index(n) - if i == -1 { - return - } - copy((*s)[i:], (*s)[i+1:]) - j := len(*s) - 1 - (*s)[j] = nil - *s = (*s)[:j] -} diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go deleted file mode 100644 index be4b2bf5a..000000000 --- a/vendor/golang.org/x/net/html/parse.go +++ /dev/null @@ -1,2094 +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 html - -import ( - "errors" - "fmt" - "io" - "strings" - - a "golang.org/x/net/html/atom" -) - -// A parser implements the HTML5 parsing algorithm: -// https://html.spec.whatwg.org/multipage/syntax.html#tree-construction -type parser struct { - // tokenizer provides the tokens for the parser. - tokenizer *Tokenizer - // tok is the most recently read token. - tok Token - // Self-closing tags like
are treated as start tags, except that - // hasSelfClosingToken is set while they are being processed. - hasSelfClosingToken bool - // doc is the document root element. - doc *Node - // The stack of open elements (section 12.2.3.2) and active formatting - // elements (section 12.2.3.3). - oe, afe nodeStack - // Element pointers (section 12.2.3.4). - head, form *Node - // Other parsing state flags (section 12.2.3.5). - scripting, framesetOK bool - // im is the current insertion mode. - im insertionMode - // originalIM is the insertion mode to go back to after completing a text - // or inTableText insertion mode. - originalIM insertionMode - // fosterParenting is whether new elements should be inserted according to - // the foster parenting rules (section 12.2.5.3). - fosterParenting bool - // quirks is whether the parser is operating in "quirks mode." - quirks bool - // fragment is whether the parser is parsing an HTML fragment. - fragment bool - // context is the context element when parsing an HTML fragment - // (section 12.4). - context *Node -} - -func (p *parser) top() *Node { - if n := p.oe.top(); n != nil { - return n - } - return p.doc -} - -// Stop tags for use in popUntil. These come from section 12.2.3.2. -var ( - defaultScopeStopTags = map[string][]a.Atom{ - "": {a.Applet, a.Caption, a.Html, a.Table, a.Td, a.Th, a.Marquee, a.Object, a.Template}, - "math": {a.AnnotationXml, a.Mi, a.Mn, a.Mo, a.Ms, a.Mtext}, - "svg": {a.Desc, a.ForeignObject, a.Title}, - } -) - -type scope int - -const ( - defaultScope scope = iota - listItemScope - buttonScope - tableScope - tableRowScope - tableBodyScope - selectScope -) - -// popUntil pops the stack of open elements at the highest element whose tag -// is in matchTags, provided there is no higher element in the scope's stop -// tags (as defined in section 12.2.3.2). It returns whether or not there was -// such an element. If there was not, popUntil leaves the stack unchanged. -// -// For example, the set of stop tags for table scope is: "html", "table". If -// the stack was: -// ["html", "body", "font", "table", "b", "i", "u"] -// then popUntil(tableScope, "font") would return false, but -// popUntil(tableScope, "i") would return true and the stack would become: -// ["html", "body", "font", "table", "b"] -// -// If an element's tag is in both the stop tags and matchTags, then the stack -// will be popped and the function returns true (provided, of course, there was -// no higher element in the stack that was also in the stop tags). For example, -// popUntil(tableScope, "table") returns true and leaves: -// ["html", "body", "font"] -func (p *parser) popUntil(s scope, matchTags ...a.Atom) bool { - if i := p.indexOfElementInScope(s, matchTags...); i != -1 { - p.oe = p.oe[:i] - return true - } - return false -} - -// indexOfElementInScope returns the index in p.oe of the highest element whose -// tag is in matchTags that is in scope. If no matching element is in scope, it -// returns -1. -func (p *parser) indexOfElementInScope(s scope, matchTags ...a.Atom) int { - for i := len(p.oe) - 1; i >= 0; i-- { - tagAtom := p.oe[i].DataAtom - if p.oe[i].Namespace == "" { - for _, t := range matchTags { - if t == tagAtom { - return i - } - } - switch s { - case defaultScope: - // No-op. - case listItemScope: - if tagAtom == a.Ol || tagAtom == a.Ul { - return -1 - } - case buttonScope: - if tagAtom == a.Button { - return -1 - } - case tableScope: - if tagAtom == a.Html || tagAtom == a.Table { - return -1 - } - case selectScope: - if tagAtom != a.Optgroup && tagAtom != a.Option { - return -1 - } - default: - panic("unreachable") - } - } - switch s { - case defaultScope, listItemScope, buttonScope: - for _, t := range defaultScopeStopTags[p.oe[i].Namespace] { - if t == tagAtom { - return -1 - } - } - } - } - return -1 -} - -// elementInScope is like popUntil, except that it doesn't modify the stack of -// open elements. -func (p *parser) elementInScope(s scope, matchTags ...a.Atom) bool { - return p.indexOfElementInScope(s, matchTags...) != -1 -} - -// clearStackToContext pops elements off the stack of open elements until a -// scope-defined element is found. -func (p *parser) clearStackToContext(s scope) { - for i := len(p.oe) - 1; i >= 0; i-- { - tagAtom := p.oe[i].DataAtom - switch s { - case tableScope: - if tagAtom == a.Html || tagAtom == a.Table { - p.oe = p.oe[:i+1] - return - } - case tableRowScope: - if tagAtom == a.Html || tagAtom == a.Tr { - p.oe = p.oe[:i+1] - return - } - case tableBodyScope: - if tagAtom == a.Html || tagAtom == a.Tbody || tagAtom == a.Tfoot || tagAtom == a.Thead { - p.oe = p.oe[:i+1] - return - } - default: - panic("unreachable") - } - } -} - -// generateImpliedEndTags pops nodes off the stack of open elements as long as -// the top node has a tag name of dd, dt, li, option, optgroup, p, rp, or rt. -// If exceptions are specified, nodes with that name will not be popped off. -func (p *parser) generateImpliedEndTags(exceptions ...string) { - var i int -loop: - for i = len(p.oe) - 1; i >= 0; i-- { - n := p.oe[i] - if n.Type == ElementNode { - switch n.DataAtom { - case a.Dd, a.Dt, a.Li, a.Option, a.Optgroup, a.P, a.Rp, a.Rt: - for _, except := range exceptions { - if n.Data == except { - break loop - } - } - continue - } - } - break - } - - p.oe = p.oe[:i+1] -} - -// addChild adds a child node n to the top element, and pushes n onto the stack -// of open elements if it is an element node. -func (p *parser) addChild(n *Node) { - if p.shouldFosterParent() { - p.fosterParent(n) - } else { - p.top().AppendChild(n) - } - - if n.Type == ElementNode { - p.oe = append(p.oe, n) - } -} - -// shouldFosterParent returns whether the next node to be added should be -// foster parented. -func (p *parser) shouldFosterParent() bool { - if p.fosterParenting { - switch p.top().DataAtom { - case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr: - return true - } - } - return false -} - -// fosterParent adds a child node according to the foster parenting rules. -// Section 12.2.5.3, "foster parenting". -func (p *parser) fosterParent(n *Node) { - var table, parent, prev *Node - var i int - for i = len(p.oe) - 1; i >= 0; i-- { - if p.oe[i].DataAtom == a.Table { - table = p.oe[i] - break - } - } - - if table == nil { - // The foster parent is the html element. - parent = p.oe[0] - } else { - parent = table.Parent - } - if parent == nil { - parent = p.oe[i-1] - } - - if table != nil { - prev = table.PrevSibling - } else { - prev = parent.LastChild - } - if prev != nil && prev.Type == TextNode && n.Type == TextNode { - prev.Data += n.Data - return - } - - parent.InsertBefore(n, table) -} - -// addText adds text to the preceding node if it is a text node, or else it -// calls addChild with a new text node. -func (p *parser) addText(text string) { - if text == "" { - return - } - - if p.shouldFosterParent() { - p.fosterParent(&Node{ - Type: TextNode, - Data: text, - }) - return - } - - t := p.top() - if n := t.LastChild; n != nil && n.Type == TextNode { - n.Data += text - return - } - p.addChild(&Node{ - Type: TextNode, - Data: text, - }) -} - -// addElement adds a child element based on the current token. -func (p *parser) addElement() { - p.addChild(&Node{ - Type: ElementNode, - DataAtom: p.tok.DataAtom, - Data: p.tok.Data, - Attr: p.tok.Attr, - }) -} - -// Section 12.2.3.3. -func (p *parser) addFormattingElement() { - tagAtom, attr := p.tok.DataAtom, p.tok.Attr - p.addElement() - - // Implement the Noah's Ark clause, but with three per family instead of two. - identicalElements := 0 -findIdenticalElements: - for i := len(p.afe) - 1; i >= 0; i-- { - n := p.afe[i] - if n.Type == scopeMarkerNode { - break - } - if n.Type != ElementNode { - continue - } - if n.Namespace != "" { - continue - } - if n.DataAtom != tagAtom { - continue - } - if len(n.Attr) != len(attr) { - continue - } - compareAttributes: - for _, t0 := range n.Attr { - for _, t1 := range attr { - if t0.Key == t1.Key && t0.Namespace == t1.Namespace && t0.Val == t1.Val { - // Found a match for this attribute, continue with the next attribute. - continue compareAttributes - } - } - // If we get here, there is no attribute that matches a. - // Therefore the element is not identical to the new one. - continue findIdenticalElements - } - - identicalElements++ - if identicalElements >= 3 { - p.afe.remove(n) - } - } - - p.afe = append(p.afe, p.top()) -} - -// Section 12.2.3.3. -func (p *parser) clearActiveFormattingElements() { - for { - n := p.afe.pop() - if len(p.afe) == 0 || n.Type == scopeMarkerNode { - return - } - } -} - -// Section 12.2.3.3. -func (p *parser) reconstructActiveFormattingElements() { - n := p.afe.top() - if n == nil { - return - } - if n.Type == scopeMarkerNode || p.oe.index(n) != -1 { - return - } - i := len(p.afe) - 1 - for n.Type != scopeMarkerNode && p.oe.index(n) == -1 { - if i == 0 { - i = -1 - break - } - i-- - n = p.afe[i] - } - for { - i++ - clone := p.afe[i].clone() - p.addChild(clone) - p.afe[i] = clone - if i == len(p.afe)-1 { - break - } - } -} - -// Section 12.2.4. -func (p *parser) acknowledgeSelfClosingTag() { - p.hasSelfClosingToken = false -} - -// An insertion mode (section 12.2.3.1) is the state transition function from -// a particular state in the HTML5 parser's state machine. It updates the -// parser's fields depending on parser.tok (where ErrorToken means EOF). -// It returns whether the token was consumed. -type insertionMode func(*parser) bool - -// setOriginalIM sets the insertion mode to return to after completing a text or -// inTableText insertion mode. -// Section 12.2.3.1, "using the rules for". -func (p *parser) setOriginalIM() { - if p.originalIM != nil { - panic("html: bad parser state: originalIM was set twice") - } - p.originalIM = p.im -} - -// Section 12.2.3.1, "reset the insertion mode". -func (p *parser) resetInsertionMode() { - for i := len(p.oe) - 1; i >= 0; i-- { - n := p.oe[i] - if i == 0 && p.context != nil { - n = p.context - } - - switch n.DataAtom { - case a.Select: - p.im = inSelectIM - case a.Td, a.Th: - p.im = inCellIM - case a.Tr: - p.im = inRowIM - case a.Tbody, a.Thead, a.Tfoot: - p.im = inTableBodyIM - case a.Caption: - p.im = inCaptionIM - case a.Colgroup: - p.im = inColumnGroupIM - case a.Table: - p.im = inTableIM - case a.Head: - p.im = inBodyIM - case a.Body: - p.im = inBodyIM - case a.Frameset: - p.im = inFramesetIM - case a.Html: - p.im = beforeHeadIM - default: - continue - } - return - } - p.im = inBodyIM -} - -const whitespace = " \t\r\n\f" - -// Section 12.2.5.4.1. -func initialIM(p *parser) bool { - switch p.tok.Type { - case TextToken: - p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace) - if len(p.tok.Data) == 0 { - // It was all whitespace, so ignore it. - return true - } - case CommentToken: - p.doc.AppendChild(&Node{ - Type: CommentNode, - Data: p.tok.Data, - }) - return true - case DoctypeToken: - n, quirks := parseDoctype(p.tok.Data) - p.doc.AppendChild(n) - p.quirks = quirks - p.im = beforeHTMLIM - return true - } - p.quirks = true - p.im = beforeHTMLIM - return false -} - -// Section 12.2.5.4.2. -func beforeHTMLIM(p *parser) bool { - switch p.tok.Type { - case DoctypeToken: - // Ignore the token. - return true - case TextToken: - p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace) - if len(p.tok.Data) == 0 { - // It was all whitespace, so ignore it. - return true - } - case StartTagToken: - if p.tok.DataAtom == a.Html { - p.addElement() - p.im = beforeHeadIM - return true - } - case EndTagToken: - switch p.tok.DataAtom { - case a.Head, a.Body, a.Html, a.Br: - p.parseImpliedToken(StartTagToken, a.Html, a.Html.String()) - return false - default: - // Ignore the token. - return true - } - case CommentToken: - p.doc.AppendChild(&Node{ - Type: CommentNode, - Data: p.tok.Data, - }) - return true - } - p.parseImpliedToken(StartTagToken, a.Html, a.Html.String()) - return false -} - -// Section 12.2.5.4.3. -func beforeHeadIM(p *parser) bool { - switch p.tok.Type { - case TextToken: - p.tok.Data = strings.TrimLeft(p.tok.Data, whitespace) - if len(p.tok.Data) == 0 { - // It was all whitespace, so ignore it. - return true - } - case StartTagToken: - switch p.tok.DataAtom { - case a.Head: - p.addElement() - p.head = p.top() - p.im = inHeadIM - return true - case a.Html: - return inBodyIM(p) - } - case EndTagToken: - switch p.tok.DataAtom { - case a.Head, a.Body, a.Html, a.Br: - p.parseImpliedToken(StartTagToken, a.Head, a.Head.String()) - return false - default: - // Ignore the token. - return true - } - case CommentToken: - p.addChild(&Node{ - Type: CommentNode, - Data: p.tok.Data, - }) - return true - case DoctypeToken: - // Ignore the token. - return true - } - - p.parseImpliedToken(StartTagToken, a.Head, a.Head.String()) - return false -} - -// Section 12.2.5.4.4. -func inHeadIM(p *parser) bool { - switch p.tok.Type { - case TextToken: - s := strings.TrimLeft(p.tok.Data, whitespace) - if len(s) < len(p.tok.Data) { - // Add the initial whitespace to the current node. - p.addText(p.tok.Data[:len(p.tok.Data)-len(s)]) - if s == "" { - return true - } - p.tok.Data = s - } - case StartTagToken: - switch p.tok.DataAtom { - case a.Html: - return inBodyIM(p) - case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta: - p.addElement() - p.oe.pop() - p.acknowledgeSelfClosingTag() - return true - case a.Script, a.Title, a.Noscript, a.Noframes, a.Style: - p.addElement() - p.setOriginalIM() - p.im = textIM - return true - case a.Head: - // Ignore the token. - return true - } - case EndTagToken: - switch p.tok.DataAtom { - case a.Head: - n := p.oe.pop() - if n.DataAtom != a.Head { - panic("html: bad parser state: element not found, in the in-head insertion mode") - } - p.im = afterHeadIM - return true - case a.Body, a.Html, a.Br: - p.parseImpliedToken(EndTagToken, a.Head, a.Head.String()) - return false - default: - // Ignore the token. - return true - } - case CommentToken: - p.addChild(&Node{ - Type: CommentNode, - Data: p.tok.Data, - }) - return true - case DoctypeToken: - // Ignore the token. - return true - } - - p.parseImpliedToken(EndTagToken, a.Head, a.Head.String()) - return false -} - -// Section 12.2.5.4.6. -func afterHeadIM(p *parser) bool { - switch p.tok.Type { - case TextToken: - s := strings.TrimLeft(p.tok.Data, whitespace) - if len(s) < len(p.tok.Data) { - // Add the initial whitespace to the current node. - p.addText(p.tok.Data[:len(p.tok.Data)-len(s)]) - if s == "" { - return true - } - p.tok.Data = s - } - case StartTagToken: - switch p.tok.DataAtom { - case a.Html: - return inBodyIM(p) - case a.Body: - p.addElement() - p.framesetOK = false - p.im = inBodyIM - return true - case a.Frameset: - p.addElement() - p.im = inFramesetIM - return true - case a.Base, a.Basefont, a.Bgsound, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title: - p.oe = append(p.oe, p.head) - defer p.oe.remove(p.head) - return inHeadIM(p) - case a.Head: - // Ignore the token. - return true - } - case EndTagToken: - switch p.tok.DataAtom { - case a.Body, a.Html, a.Br: - // Drop down to creating an implied tag. - default: - // Ignore the token. - return true - } - case CommentToken: - p.addChild(&Node{ - Type: CommentNode, - Data: p.tok.Data, - }) - return true - case DoctypeToken: - // Ignore the token. - return true - } - - p.parseImpliedToken(StartTagToken, a.Body, a.Body.String()) - p.framesetOK = true - return false -} - -// copyAttributes copies attributes of src not found on dst to dst. -func copyAttributes(dst *Node, src Token) { - if len(src.Attr) == 0 { - return - } - attr := map[string]string{} - for _, t := range dst.Attr { - attr[t.Key] = t.Val - } - for _, t := range src.Attr { - if _, ok := attr[t.Key]; !ok { - dst.Attr = append(dst.Attr, t) - attr[t.Key] = t.Val - } - } -} - -// Section 12.2.5.4.7. -func inBodyIM(p *parser) bool { - switch p.tok.Type { - case TextToken: - d := p.tok.Data - switch n := p.oe.top(); n.DataAtom { - case a.Pre, a.Listing: - if n.FirstChild == nil { - // Ignore a newline at the start of a
 block.
-				if d != "" && d[0] == '\r' {
-					d = d[1:]
-				}
-				if d != "" && d[0] == '\n' {
-					d = d[1:]
-				}
-			}
-		}
-		d = strings.Replace(d, "\x00", "", -1)
-		if d == "" {
-			return true
-		}
-		p.reconstructActiveFormattingElements()
-		p.addText(d)
-		if p.framesetOK && strings.TrimLeft(d, whitespace) != "" {
-			// There were non-whitespace characters inserted.
-			p.framesetOK = false
-		}
-	case StartTagToken:
-		switch p.tok.DataAtom {
-		case a.Html:
-			copyAttributes(p.oe[0], p.tok)
-		case a.Base, a.Basefont, a.Bgsound, a.Command, a.Link, a.Meta, a.Noframes, a.Script, a.Style, a.Title:
-			return inHeadIM(p)
-		case a.Body:
-			if len(p.oe) >= 2 {
-				body := p.oe[1]
-				if body.Type == ElementNode && body.DataAtom == a.Body {
-					p.framesetOK = false
-					copyAttributes(body, p.tok)
-				}
-			}
-		case a.Frameset:
-			if !p.framesetOK || len(p.oe) < 2 || p.oe[1].DataAtom != a.Body {
-				// Ignore the token.
-				return true
-			}
-			body := p.oe[1]
-			if body.Parent != nil {
-				body.Parent.RemoveChild(body)
-			}
-			p.oe = p.oe[:1]
-			p.addElement()
-			p.im = inFramesetIM
-			return true
-		case a.Address, a.Article, a.Aside, a.Blockquote, a.Center, a.Details, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Menu, a.Nav, a.Ol, a.P, a.Section, a.Summary, a.Ul:
-			p.popUntil(buttonScope, a.P)
-			p.addElement()
-		case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
-			p.popUntil(buttonScope, a.P)
-			switch n := p.top(); n.DataAtom {
-			case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
-				p.oe.pop()
-			}
-			p.addElement()
-		case a.Pre, a.Listing:
-			p.popUntil(buttonScope, a.P)
-			p.addElement()
-			// The newline, if any, will be dealt with by the TextToken case.
-			p.framesetOK = false
-		case a.Form:
-			if p.form == nil {
-				p.popUntil(buttonScope, a.P)
-				p.addElement()
-				p.form = p.top()
-			}
-		case a.Li:
-			p.framesetOK = false
-			for i := len(p.oe) - 1; i >= 0; i-- {
-				node := p.oe[i]
-				switch node.DataAtom {
-				case a.Li:
-					p.oe = p.oe[:i]
-				case a.Address, a.Div, a.P:
-					continue
-				default:
-					if !isSpecialElement(node) {
-						continue
-					}
-				}
-				break
-			}
-			p.popUntil(buttonScope, a.P)
-			p.addElement()
-		case a.Dd, a.Dt:
-			p.framesetOK = false
-			for i := len(p.oe) - 1; i >= 0; i-- {
-				node := p.oe[i]
-				switch node.DataAtom {
-				case a.Dd, a.Dt:
-					p.oe = p.oe[:i]
-				case a.Address, a.Div, a.P:
-					continue
-				default:
-					if !isSpecialElement(node) {
-						continue
-					}
-				}
-				break
-			}
-			p.popUntil(buttonScope, a.P)
-			p.addElement()
-		case a.Plaintext:
-			p.popUntil(buttonScope, a.P)
-			p.addElement()
-		case a.Button:
-			p.popUntil(defaultScope, a.Button)
-			p.reconstructActiveFormattingElements()
-			p.addElement()
-			p.framesetOK = false
-		case a.A:
-			for i := len(p.afe) - 1; i >= 0 && p.afe[i].Type != scopeMarkerNode; i-- {
-				if n := p.afe[i]; n.Type == ElementNode && n.DataAtom == a.A {
-					p.inBodyEndTagFormatting(a.A)
-					p.oe.remove(n)
-					p.afe.remove(n)
-					break
-				}
-			}
-			p.reconstructActiveFormattingElements()
-			p.addFormattingElement()
-		case a.B, a.Big, a.Code, a.Em, a.Font, a.I, a.S, a.Small, a.Strike, a.Strong, a.Tt, a.U:
-			p.reconstructActiveFormattingElements()
-			p.addFormattingElement()
-		case a.Nobr:
-			p.reconstructActiveFormattingElements()
-			if p.elementInScope(defaultScope, a.Nobr) {
-				p.inBodyEndTagFormatting(a.Nobr)
-				p.reconstructActiveFormattingElements()
-			}
-			p.addFormattingElement()
-		case a.Applet, a.Marquee, a.Object:
-			p.reconstructActiveFormattingElements()
-			p.addElement()
-			p.afe = append(p.afe, &scopeMarker)
-			p.framesetOK = false
-		case a.Table:
-			if !p.quirks {
-				p.popUntil(buttonScope, a.P)
-			}
-			p.addElement()
-			p.framesetOK = false
-			p.im = inTableIM
-			return true
-		case a.Area, a.Br, a.Embed, a.Img, a.Input, a.Keygen, a.Wbr:
-			p.reconstructActiveFormattingElements()
-			p.addElement()
-			p.oe.pop()
-			p.acknowledgeSelfClosingTag()
-			if p.tok.DataAtom == a.Input {
-				for _, t := range p.tok.Attr {
-					if t.Key == "type" {
-						if strings.ToLower(t.Val) == "hidden" {
-							// Skip setting framesetOK = false
-							return true
-						}
-					}
-				}
-			}
-			p.framesetOK = false
-		case a.Param, a.Source, a.Track:
-			p.addElement()
-			p.oe.pop()
-			p.acknowledgeSelfClosingTag()
-		case a.Hr:
-			p.popUntil(buttonScope, a.P)
-			p.addElement()
-			p.oe.pop()
-			p.acknowledgeSelfClosingTag()
-			p.framesetOK = false
-		case a.Image:
-			p.tok.DataAtom = a.Img
-			p.tok.Data = a.Img.String()
-			return false
-		case a.Isindex:
-			if p.form != nil {
-				// Ignore the token.
-				return true
-			}
-			action := ""
-			prompt := "This is a searchable index. Enter search keywords: "
-			attr := []Attribute{{Key: "name", Val: "isindex"}}
-			for _, t := range p.tok.Attr {
-				switch t.Key {
-				case "action":
-					action = t.Val
-				case "name":
-					// Ignore the attribute.
-				case "prompt":
-					prompt = t.Val
-				default:
-					attr = append(attr, t)
-				}
-			}
-			p.acknowledgeSelfClosingTag()
-			p.popUntil(buttonScope, a.P)
-			p.parseImpliedToken(StartTagToken, a.Form, a.Form.String())
-			if action != "" {
-				p.form.Attr = []Attribute{{Key: "action", Val: action}}
-			}
-			p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
-			p.parseImpliedToken(StartTagToken, a.Label, a.Label.String())
-			p.addText(prompt)
-			p.addChild(&Node{
-				Type:     ElementNode,
-				DataAtom: a.Input,
-				Data:     a.Input.String(),
-				Attr:     attr,
-			})
-			p.oe.pop()
-			p.parseImpliedToken(EndTagToken, a.Label, a.Label.String())
-			p.parseImpliedToken(StartTagToken, a.Hr, a.Hr.String())
-			p.parseImpliedToken(EndTagToken, a.Form, a.Form.String())
-		case a.Textarea:
-			p.addElement()
-			p.setOriginalIM()
-			p.framesetOK = false
-			p.im = textIM
-		case a.Xmp:
-			p.popUntil(buttonScope, a.P)
-			p.reconstructActiveFormattingElements()
-			p.framesetOK = false
-			p.addElement()
-			p.setOriginalIM()
-			p.im = textIM
-		case a.Iframe:
-			p.framesetOK = false
-			p.addElement()
-			p.setOriginalIM()
-			p.im = textIM
-		case a.Noembed, a.Noscript:
-			p.addElement()
-			p.setOriginalIM()
-			p.im = textIM
-		case a.Select:
-			p.reconstructActiveFormattingElements()
-			p.addElement()
-			p.framesetOK = false
-			p.im = inSelectIM
-			return true
-		case a.Optgroup, a.Option:
-			if p.top().DataAtom == a.Option {
-				p.oe.pop()
-			}
-			p.reconstructActiveFormattingElements()
-			p.addElement()
-		case a.Rp, a.Rt:
-			if p.elementInScope(defaultScope, a.Ruby) {
-				p.generateImpliedEndTags()
-			}
-			p.addElement()
-		case a.Math, a.Svg:
-			p.reconstructActiveFormattingElements()
-			if p.tok.DataAtom == a.Math {
-				adjustAttributeNames(p.tok.Attr, mathMLAttributeAdjustments)
-			} else {
-				adjustAttributeNames(p.tok.Attr, svgAttributeAdjustments)
-			}
-			adjustForeignAttributes(p.tok.Attr)
-			p.addElement()
-			p.top().Namespace = p.tok.Data
-			if p.hasSelfClosingToken {
-				p.oe.pop()
-				p.acknowledgeSelfClosingTag()
-			}
-			return true
-		case a.Caption, a.Col, a.Colgroup, a.Frame, a.Head, a.Tbody, a.Td, a.Tfoot, a.Th, a.Thead, a.Tr:
-			// Ignore the token.
-		default:
-			p.reconstructActiveFormattingElements()
-			p.addElement()
-		}
-	case EndTagToken:
-		switch p.tok.DataAtom {
-		case a.Body:
-			if p.elementInScope(defaultScope, a.Body) {
-				p.im = afterBodyIM
-			}
-		case a.Html:
-			if p.elementInScope(defaultScope, a.Body) {
-				p.parseImpliedToken(EndTagToken, a.Body, a.Body.String())
-				return false
-			}
-			return true
-		case a.Address, a.Article, a.Aside, a.Blockquote, a.Button, a.Center, a.Details, a.Dir, a.Div, a.Dl, a.Fieldset, a.Figcaption, a.Figure, a.Footer, a.Header, a.Hgroup, a.Listing, a.Menu, a.Nav, a.Ol, a.Pre, a.Section, a.Summary, a.Ul:
-			p.popUntil(defaultScope, p.tok.DataAtom)
-		case a.Form:
-			node := p.form
-			p.form = nil
-			i := p.indexOfElementInScope(defaultScope, a.Form)
-			if node == nil || i == -1 || p.oe[i] != node {
-				// Ignore the token.
-				return true
-			}
-			p.generateImpliedEndTags()
-			p.oe.remove(node)
-		case a.P:
-			if !p.elementInScope(buttonScope, a.P) {
-				p.parseImpliedToken(StartTagToken, a.P, a.P.String())
-			}
-			p.popUntil(buttonScope, a.P)
-		case a.Li:
-			p.popUntil(listItemScope, a.Li)
-		case a.Dd, a.Dt:
-			p.popUntil(defaultScope, p.tok.DataAtom)
-		case a.H1, a.H2, a.H3, a.H4, a.H5, a.H6:
-			p.popUntil(defaultScope, a.H1, a.H2, a.H3, a.H4, a.H5, a.H6)
-		case a.A, a.B, a.Big, a.Code, a.Em, a.Font, a.I, a.Nobr, a.S, a.Small, a.Strike, a.Strong, a.Tt, a.U:
-			p.inBodyEndTagFormatting(p.tok.DataAtom)
-		case a.Applet, a.Marquee, a.Object:
-			if p.popUntil(defaultScope, p.tok.DataAtom) {
-				p.clearActiveFormattingElements()
-			}
-		case a.Br:
-			p.tok.Type = StartTagToken
-			return false
-		default:
-			p.inBodyEndTagOther(p.tok.DataAtom)
-		}
-	case CommentToken:
-		p.addChild(&Node{
-			Type: CommentNode,
-			Data: p.tok.Data,
-		})
-	}
-
-	return true
-}
-
-func (p *parser) inBodyEndTagFormatting(tagAtom a.Atom) {
-	// This is the "adoption agency" algorithm, described at
-	// https://html.spec.whatwg.org/multipage/syntax.html#adoptionAgency
-
-	// TODO: this is a fairly literal line-by-line translation of that algorithm.
-	// Once the code successfully parses the comprehensive test suite, we should
-	// refactor this code to be more idiomatic.
-
-	// Steps 1-4. The outer loop.
-	for i := 0; i < 8; i++ {
-		// Step 5. Find the formatting element.
-		var formattingElement *Node
-		for j := len(p.afe) - 1; j >= 0; j-- {
-			if p.afe[j].Type == scopeMarkerNode {
-				break
-			}
-			if p.afe[j].DataAtom == tagAtom {
-				formattingElement = p.afe[j]
-				break
-			}
-		}
-		if formattingElement == nil {
-			p.inBodyEndTagOther(tagAtom)
-			return
-		}
-		feIndex := p.oe.index(formattingElement)
-		if feIndex == -1 {
-			p.afe.remove(formattingElement)
-			return
-		}
-		if !p.elementInScope(defaultScope, tagAtom) {
-			// Ignore the tag.
-			return
-		}
-
-		// Steps 9-10. Find the furthest block.
-		var furthestBlock *Node
-		for _, e := range p.oe[feIndex:] {
-			if isSpecialElement(e) {
-				furthestBlock = e
-				break
-			}
-		}
-		if furthestBlock == nil {
-			e := p.oe.pop()
-			for e != formattingElement {
-				e = p.oe.pop()
-			}
-			p.afe.remove(e)
-			return
-		}
-
-		// Steps 11-12. Find the common ancestor and bookmark node.
-		commonAncestor := p.oe[feIndex-1]
-		bookmark := p.afe.index(formattingElement)
-
-		// Step 13. The inner loop. Find the lastNode to reparent.
-		lastNode := furthestBlock
-		node := furthestBlock
-		x := p.oe.index(node)
-		// Steps 13.1-13.2
-		for j := 0; j < 3; j++ {
-			// Step 13.3.
-			x--
-			node = p.oe[x]
-			// Step 13.4 - 13.5.
-			if p.afe.index(node) == -1 {
-				p.oe.remove(node)
-				continue
-			}
-			// Step 13.6.
-			if node == formattingElement {
-				break
-			}
-			// Step 13.7.
-			clone := node.clone()
-			p.afe[p.afe.index(node)] = clone
-			p.oe[p.oe.index(node)] = clone
-			node = clone
-			// Step 13.8.
-			if lastNode == furthestBlock {
-				bookmark = p.afe.index(node) + 1
-			}
-			// Step 13.9.
-			if lastNode.Parent != nil {
-				lastNode.Parent.RemoveChild(lastNode)
-			}
-			node.AppendChild(lastNode)
-			// Step 13.10.
-			lastNode = node
-		}
-
-		// Step 14. Reparent lastNode to the common ancestor,
-		// or for misnested table nodes, to the foster parent.
-		if lastNode.Parent != nil {
-			lastNode.Parent.RemoveChild(lastNode)
-		}
-		switch commonAncestor.DataAtom {
-		case a.Table, a.Tbody, a.Tfoot, a.Thead, a.Tr:
-			p.fosterParent(lastNode)
-		default:
-			commonAncestor.AppendChild(lastNode)
-		}
-
-		// Steps 15-17. Reparent nodes from the furthest block's children
-		// to a clone of the formatting element.
-		clone := formattingElement.clone()
-		reparentChildren(clone, furthestBlock)
-		furthestBlock.AppendChild(clone)
-
-		// Step 18. Fix up the list of active formatting elements.
-		if oldLoc := p.afe.index(formattingElement); oldLoc != -1 && oldLoc < bookmark {
-			// Move the bookmark with the rest of the list.
-			bookmark--
-		}
-		p.afe.remove(formattingElement)
-		p.afe.insert(bookmark, clone)
-
-		// Step 19. Fix up the stack of open elements.
-		p.oe.remove(formattingElement)
-		p.oe.insert(p.oe.index(furthestBlock)+1, clone)
-	}
-}
-
-// inBodyEndTagOther performs the "any other end tag" algorithm for inBodyIM.
-// "Any other end tag" handling from 12.2.5.5 The rules for parsing tokens in foreign content
-// https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inforeign
-func (p *parser) inBodyEndTagOther(tagAtom a.Atom) {
-	for i := len(p.oe) - 1; i >= 0; i-- {
-		if p.oe[i].DataAtom == tagAtom {
-			p.oe = p.oe[:i]
-			break
-		}
-		if isSpecialElement(p.oe[i]) {
-			break
-		}
-	}
-}
-
-// Section 12.2.5.4.8.
-func textIM(p *parser) bool {
-	switch p.tok.Type {
-	case ErrorToken:
-		p.oe.pop()
-	case TextToken:
-		d := p.tok.Data
-		if n := p.oe.top(); n.DataAtom == a.Textarea && n.FirstChild == nil {
-			// Ignore a newline at the start of a